getSoundEffects
Client-side
Server-side
Shared
Returns the states of all effects of a sound.
OOP Syntax Help! I don't understand this!
- Method: sound:getEffects(...)
Syntax
table|false getSoundEffects ( sound/player theSound )
Required Arguments
- theSound: A sound element.
Returns
- table|false: effects
- gargle
- compressor
- echo
- i3dl2reverb
- distortion
- chorus
- parameq
- reverb
- flanger
Returns a table with the effect names as the keys, and their states as the values if successful. Otherwise, it returns false.
Code Examples
client
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 break end endend
See Also
Audio Functions
- getRadioChannel
- getRadioChannelName
- getSFXStatus
- getSoundBufferLength
- getSoundBPM
- getSoundEffectParameters
- getSoundEffects
- getSoundFFTData
- getSoundLength
- getSoundMaxDistance
- getSoundMetaTags
- getSoundMinDistance
- getSoundLevelData
- getSoundPan
- getSoundPosition
- getSoundVolume
- getSoundProperties
- isSoundLooped
- getSoundWaveData
- isSoundPanningEnabled
- isSoundPaused
- getSoundSpeed
- playSFX3D
- playSFX
- playSound
- playSound3D
- setRadioChannel
- setSoundEffectEnabled
- setSoundLooped
- setSoundMaxDistance
- setSoundEffectParameter
- setSoundMinDistance
- setSoundPan
- setSoundPanningEnabled
- setSoundPaused
- setSoundPosition
- setSoundProperties
- setSoundSpeed
- stopSound
- setSoundVolume