HU/setSoundSpeed: Difference between revisions
Jump to navigation
Jump to search
(Created page with "__NOTOC__ {{Client function hu}} This function can be used to change the playback speed of the specified sound element. ==Syntax== <syntaxhighlight lang="lua">bool...") |
No edit summary |
||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
{{Client function | {{Client function}} | ||
This function can be used to change the playback speed of the specified [[sound]] [[element]]. | This function can be used to change the playback speed of the specified [[sound]] [[element]]. | ||
Line 23: | Line 23: | ||
==See Also== | ==See Also== | ||
{{Client_audio_functions | {{Client_audio_functions} | ||
[[ | [[hu:setSoundSpeed]] | ||
[[ar:setSoundSpeed]] | [[ar:setSoundSpeed]] |
Revision as of 12:46, 22 July 2018
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
{{Client_audio_functions}