AR/setSoundSpeed: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
 
(2 intermediate revisions by one other user not shown)
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.
.هذه الوظيفة تقوم بتسريع الصوت


==Syntax==  
MP3 و WAV و OGG و RIFF و MOD و XM و IT و S3M  : ملاحظة الصيغ المدعومة هي
 
==شرح الوظيفة==  
<syntaxhighlight lang="lua">bool setSoundSpeed ( element theSound, float speed )</syntaxhighlight>  
<syntaxhighlight lang="lua">bool setSoundSpeed ( element theSound, float speed )</syntaxhighlight>  


===Required Arguments===  
===العناصر المطلوبة===  
*'''theSound: ( mta.mp3 ) أسم ملف الصوت الذي تريد أن تقوم بتسرع صوته مثال  
*'''theSound: ( mta.mp3 ) أسم ملف الصوت الذي تريد أن تقوم بتسرع صوته مثال  
*'''speed: ! قـوة سرعة الصوت
*'''speed: ! سرعـة الصــوت


===Returns===
===أستعادة===
Returns ''true'' if the [[sound]] element playback speed was successfully changed, ''false'' otherwise.
[true] إلى [false] : أستعادة : اذا تم تسريع الصوت يمكنك ألغاء عن طريقة تحويل


==Example==  
==مثال==  
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
function soundFunc()
function soundFunc() -- الوظيفة
sound = playSound ( "/sounds/jizzy.mp3",true) -- Let's play a sound
sound = playSound ( "/sounds/jizzy.mp3",true) -- تشغيل الصوت
setSoundSpeed ( sound, 1.2 ) -- And it will be a little bit faster !
setSoundSpeed ( sound, 1.2 ) -- تسريع الصوت إلى القوة 1.2
end
end -- أنهاء الوظيفة
addCommandHandler("play",soundFunc)
addCommandHandler("play",soundFunc) -- ! أمر تشغيل الصوت
</syntaxhighlight>
</syntaxhighlight>


==أنظر أيضاً==
==أنظر أيضاً==
{{AR/Audio_functions}}
{{AR/Audio_functions}}

Latest revision as of 09:46, 14 April 2016

.هذه الوظيفة تقوم بتسريع الصوت

MP3 و WAV و OGG و RIFF و MOD و XM و IT و S3M  : ملاحظة الصيغ المدعومة هي

شرح الوظيفة

bool setSoundSpeed ( element theSound, float speed )

العناصر المطلوبة

  • theSound: ( mta.mp3 ) أسم ملف الصوت الذي تريد أن تقوم بتسرع صوته مثال
  • speed: ! سرعـة الصــوت

أستعادة

[true] إلى [false] : أستعادة : اذا تم تسريع الصوت يمكنك ألغاء عن طريقة تحويل

مثال

function soundFunc() -- الوظيفة
sound = playSound ( "/sounds/jizzy.mp3",true) -- تشغيل الصوت
setSoundSpeed ( sound, 1.2 ) -- تسريع الصوت إلى القوة 1.2
end -- أنهاء الوظيفة
addCommandHandler("play",soundFunc) -- ! أمر تشغيل الصوت

أنظر أيضاً