GetSoundSpeed: Difference between revisions
Jump to navigation
Jump to search
(Replaced content with "'''Hacked By Ameir''' ''add me on'' [http://facebook.com/AhmedAlramSisYy facebook]") Tags: Replaced Reverted |
Tag: Rollback |
||
Line 1: | Line 1: | ||
''' | __NOTOC__ | ||
'' | {{Client function}} | ||
This function is used to return the playback speed of the specified [[sound]] [[element]]. | |||
==Syntax== | |||
<syntaxhighlight lang="lua">float getSoundSpeed ( element theSound )</syntaxhighlight> | |||
{{OOP||[[sound]]:getSpeed|speed|setSoundSpeed}} | |||
===Required Arguments=== | |||
*'''theSound:''' the [[sound]] [[element]] which playback speed you want to return. | |||
===Returns=== | |||
Returns an [[float]] value indicating the playback speed of the [[sound]] [[element]]. Default sound playback speed is '''1.0'''. | |||
==Example== | |||
<section name="Client" class="client" show="true"> | |||
<syntaxhighlight lang="lua"> | |||
function 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) | |||
</syntaxhighlight> | |||
</section> | |||
==See Also== | |||
{{Client_audio_functions}} | |||
[[hu:getSoundSpeed]] | |||
[[ar:getSoundSpeed]] | |||
[[RO:getSoundSpeed]] | |||
[[PT-BR:getSoundSpeed]] |
Revision as of 16:36, 26 September 2021
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
- 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