SetSoundSpeed: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
|||
(2 intermediate revisions by 2 users not shown) | |||
Line 15: | Line 15: | ||
==Example== | ==Example== | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
function | function soundFunc() | ||
sound = playSound ( "/sounds/jizzy.mp3",true) -- Let's play a sound | |||
setSoundSpeed ( sound, 1.2 ) -- And it will be a little bit faster ! | |||
end | end | ||
addCommandHandler("play",soundFunc) | |||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 29: | Line 25: | ||
{{Client_audio_functions}} | {{Client_audio_functions}} | ||
[[hu:setSoundSpeed]] | |||
[[ar:setSoundSpeed]] | [[ar:setSoundSpeed]] | ||
[[RO:setSoundSpeed]] |
Latest revision as of 19:55, 30 January 2019
This function can be used to change the playback speed of the specified sound element.
Syntax
bool setSoundSpeed ( element theSound, float speed )
OOP Syntax Help! I don't understand this!
- Method: sound:setSpeed(...)
- Variable: .speed
- Counterpart: getSoundSpeed
Required Arguments
- theSound: the sound element which volume you want to modify.
- speed: a floating point number representing the desired sound playback speed.
Returns
Returns true if the sound element playback speed was successfully changed, false otherwise.
Example
function soundFunc() sound = playSound ( "/sounds/jizzy.mp3",true) -- Let's play a sound setSoundSpeed ( sound, 1.2 ) -- And it will be a little bit faster ! end addCommandHandler("play",soundFunc)
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