setSoundSpeed
Client-side
Server-side
Shared
Pair: getSoundSpeed
This function can be used to change the playback speed of the specified sound element.
OOP Syntax Help! I don't understand this!
- Method: sound:setSpeed(...)
- Variable: .speed
Syntax
bool setSoundSpeed ( sound/player theSound, float speed )
Required Arguments
- theSound: The sound element which speed you want to modify.
- speed: A floating point number representing the desired sound playback speed.
Returns
- bool: result
Returns true if the sound element playback speed was successfully changed, false otherwise.
Code Examples
client
function soundFunc()local sound = playSound ( "/sounds/jizzy.mp3",true) -- Let's play a soundsetSoundSpeed ( sound, 1.2 ) -- And it will be a little bit faster !endaddCommandHandler("play",soundFunc)
See Also
Audio Functions
- getRadioChannel
- getRadioChannelName
- getSFXStatus
- getSoundBPM
- getSoundBufferLength
- getSoundEffectParameters
- getSoundFFTData
- getSoundEffects
- getSoundLength
- getSoundMaxDistance
- getSoundLevelData
- getSoundMetaTags
- getSoundMinDistance
- getSoundPan
- getSoundPosition
- getSoundSpeed
- getSoundWaveData
- getSoundVolume
- isSoundPaused
- isSoundPanningEnabled
- playSFX
- isSoundLooped
- getSoundProperties
- playSound
- playSFX3D
- setRadioChannel
- playSound3D
- setSoundEffectParameter
- setSoundEffectEnabled
- setSoundLooped
- setSoundMaxDistance
- setSoundMinDistance
- setSoundPan
- setSoundPaused
- setSoundPanningEnabled
- setSoundSpeed
- setSoundPosition
- setSoundProperties
- setSoundVolume
- stopSound