getSoundSpeed
Client-side
Server-side
Shared
Pair: setSoundSpeed
This function is used to return the playback speed of the specified sound element.
OOP Syntax Help! I don't understand this!
- Method: sound:getSpeed(...)
- Variable: .speed
Syntax
float|false getSoundSpeed ( sound/player theSound )
Required Arguments
- theSound: The sound element which playback speed you want to return.
Returns
- float|false: speed
Returns an float value indicating the playback speed of the sound element. Default sound playback speed is 1.0.
Code Examples
client
function outputSpeed(soundName) if soundName then local soundElement = playSound("sounds/"..soundName..".mp3") -- Play the sound from the sounds folder
setSoundSpeed(soundElement, 0.5) -- Set the sound speed to 50%
local soundSpeed = getSoundSpeed(soundElement) -- Get current sound speed
outputChatBox("Sound speed: "..soundSpeed) -- Output the sound speed endendaddCommandHandler("soundspeed", outputSpeed)
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