AR/getSoundSpeed: Difference between revisions
Jump to navigation
Jump to search
The-Killer (talk | contribs) No edit summary |
The-Killer (talk | contribs) |
||
| Line 12: | Line 12: | ||
القيمه [[float]] مما يدل على سرعة الصوت [[sound]]. السرعه الاسااسيه للصوت هي '''1.0'''. | القيمه [[float]] مما يدل على سرعة الصوت [[sound]]. السرعه الاسااسيه للصوت هي '''1.0'''. | ||
== | ==مثال== | ||
<section name="Client" class="client" show="true"> | <section name="Client" class="client" show="true"> | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
Revision as of 18:15, 3 January 2014
يتم استخدام هذه الداله لمعرفة سرعه الصوت sound.
Syntax
float getSoundSpeed ( element theSound )
Required Arguments
- theSound: اسم الصوت الذي تريد معرفة سرعته.
Returns
القيمه float مما يدل على سرعة الصوت sound. السرعه الاسااسيه للصوت هي 1.0.
مثال
Click to collapse [-]
Clientfunction outputSpeed(soundname)
local sound = playSound("sounds/"..tostring(soundname)..".mp3") -- تشغيل الصوت من الملف
setSoundVolume(sound, 0.5) -- جعل قوة الصوت 50%
outputChatBox("The sound speed : "..getSoundSpeed(sound)) -- كتابة سرعة الصوت في الشات
end
addCommandHandler("soundspeed",outputSpeed)
By The Killer.
أنظر أيضاً
- getSoundBufferLength
- getSoundEffects
- getSoundFFTData
- getSoundLength
- getSoundLevelData
- getSoundMaxDistance