SetSoundProperties: Difference between revisions
Jump to navigation
Jump to search
m (simple ex.) |
m (-Cate:NE) |
||
Line 35: | Line 35: | ||
==See Also== | ==See Also== | ||
{{Client_audio_functions}} | {{Client_audio_functions}} | ||
Revision as of 13:52, 14 March 2013
Syntax
bool setSoundProperties(element sound, float fSampleRate, float fTempo, float fPitch, bool bReverse )
Required Arguments
- sound: A sound element that is created using playSound or playSound3D
- fSampleRate: A float that defines the new sound's sample rate
- fTempo: A float that defines the new sound tempo
- fPitch: A float that defines the new sound pitch
- bReverse: A boolean representing whether the sound will be reversed or not.
Returns
Returns true if the properties sucessfully set, false otherwise.
Example
Click to collapse [-]
Clientfunction 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 reversed end addEventHandler("onClientResourceStart", resourceRoot, editSongSound) -- Execute the function when the resource is started
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