AR/getSoundSpeed: Difference between revisions
		
		
		
		
		
		Jump to navigation
		Jump to search
		
				
		
		
	
 (Created page with "__NOTOC__  {{Client function}} This function is used to return the playback speed of the specified sound element.  ==Syntax==  <syntaxhighlight lang="lua">float getSoundSpeed ( element theS...")  | 
				The-Killer (talk | contribs)  No edit summary  | 
				||
| Line 1: | Line 1: | ||
__NOTOC__    | __NOTOC__    | ||
{{Client function}}  | {{Client function}}  | ||
يتم استخدام هذه الداله لمعرفة سرعه الصوت [[sound]].  | |||
==Syntax==    | ==Syntax==    | ||
| Line 7: | Line 7: | ||
===Required Arguments===    | ===Required Arguments===    | ||
*'''theSound:'''   | *'''theSound:''' اسم الصوت الذي تريد معرفة سرعته.  | ||
===Returns===  | ===Returns===  | ||
القيمه [[float]] مما يدل على سرعة الصوت [[sound]]. السرعه الاسااسيه للصوت هي '''1.0'''.  | |||
==Example==    | ==Example==    | ||
| Line 16: | Line 16: | ||
<syntaxhighlight lang="lua">  | <syntaxhighlight lang="lua">  | ||
function outputSpeed(soundname)    | function outputSpeed(soundname)    | ||
	local sound = playSound("sounds/"..tostring(soundname)..".mp3") --  | 	local sound = playSound("sounds/"..tostring(soundname)..".mp3") -- تشغيل الصوت من الملف  | ||
	setSoundVolume(sound, 0.5) --   | 	setSoundVolume(sound, 0.5) -- جعل قوة الصوت 50%  | ||
	outputChatBox("The sound speed : "..getSoundSpeed(sound)) --   | 	outputChatBox("The sound speed : "..getSoundSpeed(sound)) -- كتابة سرعة الصوت في الشات  | ||
end  | end  | ||
addCommandHandler("soundspeed",outputSpeed)  | addCommandHandler("soundspeed",outputSpeed)  | ||
</syntaxhighlight>  | </syntaxhighlight>  | ||
</section>  | </section>  | ||
'''By The Killer.'''  | |||
==أنظر أيضاً==  | ==أنظر أيضاً==  | ||
{{AR/Audio_functions}}  | {{AR/Audio_functions}}  | ||
Revision as of 18:15, 3 January 2014
يتم استخدام هذه الداله لمعرفة سرعه الصوت sound.
Syntax
float getSoundSpeed ( element theSound )
Required Arguments
- theSound: اسم الصوت الذي تريد معرفة سرعته.
 
Returns
القيمه float مما يدل على سرعة الصوت sound. السرعه الاسااسيه للصوت هي 1.0.
Example
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