Difference between revisions of "Sound Command"

From AGI Wiki
Jump to: navigation, search
(See Also)
(Redirected page to Sound)
 
Line 1: Line 1:
The '''sound''' command plays a loaded sound resource.
+
#REDIRECT [[Sound]]
 
+
 
+
== <br />Syntax ==
+
 
+
Starts playback of a SOUND resource. n. When finished, Flag(m) is set to 1.
+
 
+
sound(n, m);<!-- sound([[Argument types|byt]] SOUNDNUM, [[Flag|flg]] fDONE); -->
+
 
+
Where "n" is the SOUND resource number.
+
 
+
&nbsp;
+
 
+
== Remarks ==
+
 
+
The sound must be loaded with the [[AGI Specifications: Chapter 4 - The Logic Language#load.sound|<code>load.sound</code>]] command before it can be played.
+
 
+
The flag fDONE is cleared before the sound starts. When the sound stops playing (by reaching the end of the resource, or by issuing the [[AGI Specifications: Chapter 4 - The Logic Language#stop.sound|<code>stop.sound</code>]] command) fDONE is set to TRUE.
+
 
+
If a sound is currently being played, it will stop, and its done flag will be set before this sound is played.
+
 
+
&nbsp;
+
 
+
== Example ==
+
 
+
<div class="CodeBlockHeader">Code:</div>
+
<syntaxhighlight lang="agi">
+
load.sound(22);
+
sound(22, f99);
+
</syntaxhighlight>
+
 
+
&nbsp;
+
 
+
== Technical Information ==
+
 
+
{| class="wikitable"
+
! Required interpreter version!!Bytecode Value
+
|-
+
| Available in all AGI versions||0x63
+
|}
+
 
+
&nbsp;
+
== Sources ==
+
 
+
* [[WinAGI|WinAGI]] help file
+
 
+
&nbsp;
+
== See Also ==
+
 
+
* [[Sound Commands|Sound Commands]]
+
 
+
&nbsp;
+
 
+
[[Category:Sound Commands]]
+
[[Category:References]]
+
[[Category:Logic]]
+

Latest revision as of 21:47, 22 April 2019

Redirect to: