GetSoundSpeed
From Multi Theft Auto: Wiki
This function is used to return the playback speed of the specified sound element.
Syntax
float getSoundSpeed ( element theSound )
OOP Syntax Help! I don't understand this!
- Method: sound:getSpeed(...)
- Variable: .speed
- Counterpart: setSoundSpeed
Required Arguments
Returns
Returns an float value indicating the playback speed of the sound element. Default sound playback speed is 1.0.
Example
Click to collapse [-]
Clientfunction outputSpeed(soundname) local sound = playSound("sounds/"..tostring(soundname)..".mp3") --Play the sound from the sounds folder setSoundVolume(sound, 0.5) -- set the sound volume to 50% outputChatBox("The sound speed : "..getSoundSpeed(sound)) -- output the sound speed end addCommandHandler("soundspeed",outputSpeed)
See Also
- getSoundBufferLength
- getSoundEffects
- getSoundFFTData
- getSoundLength
- getSoundLevelData
- getSoundMaxDistance
- getSoundMetaTags
- getSoundMinDistance
- getSoundPan
- getSoundPosition
- getSoundProperties
- getSoundSpeed
- getSoundVolume
- getSoundWaveData
- isSoundPanningEnabled
- isSoundPaused
- playSFX
- playSFX3D
- playSound
- playSound3D
- playSoundFrontEnd
- setRadioChannel
- setSoundEffectEnabled
- setSoundMaxDistance
- setSoundMinDistance
- setSoundPan
- setSoundPanningEnabled
- setSoundPaused
- setSoundPosition
- setSoundProperties
- setSoundSpeed
- setSoundVolume
- stopSound