GetSoundEffects: Difference between revisions
Jump to navigation
Jump to search
(Replaced content with "'''Hacked By Ameir''' ''add me on'' [http://facebook.com/AhmedAlramSisYy facebook]") Tags: Replaced Reverted |
m (Change See Also template) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
''' | __NOTOC__ | ||
'' | {{Client function}} | ||
[ | Returns the states of all effects of a sound. | ||
==Syntax== | |||
<syntaxhighlight lang="lua">table getSoundEffects ( element sound )</syntaxhighlight> | |||
{{OOP||[[sound]]:getEffects}} | |||
===Required Arguments=== | |||
*'''sound:''' a [[sound]] element. | |||
===Returns=== | |||
Returns a [[table]] with the effect names as the keys, and their states as the values if successful. Otherwise, it returns ''false''. | |||
'''Sound effect names:''' | |||
{{Sound_Effects}} | |||
==Example== | |||
<syntaxhighlight lang="lua"> | |||
function switchEffects(sound) | |||
for _,v in ipairs(getSoundEffects(sound)) do -- Go through the whole list of sound effects for the sound | |||
if v == "gargle" then -- If the sound effect is 'gargle', proceed | |||
setSoundEffectEnabled(sound, "gargle", false) -- Disable the 'gargle' -effect | |||
end | |||
end | |||
end | |||
</syntaxhighlight> | |||
==See Also== | |||
{{Audio_functions|client}} | |||
[[ar:getSoundEffects]] | |||
[[de:getSoundEffects]] | |||
[[hu:getSoundEffects]] | |||
[[pl:getSoundEffects]] | |||
[[PT-BR:getSoundEffects]] | |||
[[ru:getSoundEffects]] | |||
[[RO:getSoundEffects]] |
Latest revision as of 22:13, 6 September 2024
Returns the states of all effects of a sound.
Syntax
table getSoundEffects ( element sound )
OOP Syntax Help! I don't understand this!
- Method: sound:getEffects(...)
Required Arguments
- sound: a sound element.
Returns
Returns a table with the effect names as the keys, and their states as the values if successful. Otherwise, it returns false.
Sound effect names:
- gargle
- compressor
- echo
- i3dl2reverb
- distortion
- chorus
- parameq
- reverb
- flanger
Example
function switchEffects(sound) for _,v in ipairs(getSoundEffects(sound)) do -- Go through the whole list of sound effects for the sound if v == "gargle" then -- If the sound effect is 'gargle', proceed setSoundEffectEnabled(sound, "gargle", false) -- Disable the 'gargle' -effect end end end
See Also
- getRadioChannel
- getRadioChannelName
- getSFXStatus
- getSoundBPM
- getSoundBufferLength
- getSoundEffectParameters
- getSoundEffects
- getSoundFFTData
- getSoundLength
- getSoundLevelData
- getSoundMaxDistance
- getSoundMetaTags
- getSoundMinDistance
- getSoundPan
- getSoundPosition
- getSoundProperties
- getSoundSpeed
- getSoundVolume
- getSoundWaveData
- isSoundLooped
- isSoundPanningEnabled
- isSoundPaused
- playSFX3D
- playSFX
- playSound3D
- playSound
- setRadioChannel
- setSoundEffectEnabled
- setSoundEffectParameter
- setSoundLooped
- setSoundMaxDistance
- setSoundMinDistance
- setSoundPan
- setSoundPanningEnabled
- setSoundPaused
- setSoundPosition
- setSoundProperties
- setSoundSpeed
- setSoundVolume
- stopSound
- Shared
- playSoundFrontEnd