setSoundProperties
Client-side
 Server-side
 Shared
 Pair: getSoundProperties
This function edits the properties of a specific sound.
       Note      
 Streams are not supported.
OOP Syntax Help! I don't understand this!
- Method: sound:setProperties(...)
Syntax
bool setSoundProperties ( sound theSound, float sampleRate, float tempo, float pitch, [ bool reverse = false ] )Required Arguments
- theSound: A sound element that is created using playSound or playSound3D.
- sampleRate: A float that defines the new sound's sample rate.
- tempo: A float that defines the new sound tempo.
- pitch: A float that defines the new sound pitch.
Optional Arguments
NOTE: When using optional arguments, you might need to supply all arguments before the one you wish to use.
- reverse (default: false): A boolean representing whether the sound will be reversed or not.
Returns
- bool: result
Returns true if the properties sucessfully set, false otherwise.
Code Examples
 client   
 function editSongSound()  local sound = playSound("song.wav", false) -- Play the file 'song.wav' and make it play only once  setSoundProperties(sound, 48000.0, 128.00, 440.0, false) -- Set its samplerate to 48,000 Hz, tempo to 128.00, pitch to 440 Hz and not reversedendaddEventHandler("onClientResourceStart", resourceRoot, editSongSound) -- Execute the function when the resource is startedSee Also
Audio Functions
- getSFXStatus
- getRadioChannel
- getSoundBPM
- getSoundBufferLength
- getRadioChannelName
- getSoundEffectParameters
- getSoundFFTData
- getSoundEffects
- getSoundLevelData
- getSoundMetaTags
- getSoundPan
- getSoundMinDistance
- getSoundMaxDistance
- getSoundPosition
- getSoundLength
- getSoundProperties
- getSoundVolume
- getSoundSpeed
- getSoundWaveData
- isSoundPanningEnabled
- playSFX3D
- isSoundPaused
- playSFX
- isSoundLooped
- playSound
- playSound3D
- setRadioChannel
- setSoundEffectEnabled
- setSoundLooped
- setSoundMaxDistance
- setSoundEffectParameter
- setSoundPan
- setSoundMinDistance
- setSoundPanningEnabled
- setSoundPaused
- setSoundPosition
- setSoundProperties
- setSoundSpeed
- setSoundVolume
- stopSound
 
 