SetSoundSpeed: Difference between revisions
Jump to navigation
Jump to search
Line 25: | Line 25: | ||
addEventHandler( "onClientGUIScroll", resourceRoot, soundSpeed ) | addEventHandler( "onClientGUIScroll", resourceRoot, soundSpeed ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
==See Also== | ==See Also== |
Revision as of 17:49, 17 February 2015
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 soundSpeed ( Scrolled ) if ( source == element ) then if ( isElement ( Sound ) ) then local ScrollPosition_ = ( guiScrollBarGetScrollPosition ( Scrolled ) / 2 ) / 30 setSoundSpeed ( Sound, ScrollPosition_ ) end end end addEventHandler( "onClientGUIScroll", resourceRoot, soundSpeed )
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