Difference between revisions of "Sound Command"

From AGI Wiki
Jump to navigationJump to search
Line 9: Line 9:
 
== Remarks ==
 
== Remarks ==
  
The sound must be loaded with the [[load.sound|<code>load.sound</code>]] command before it can be played.
+
The sound must be loaded with the [[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 [[stop.sound|<code>stop.sound</code>]] command) fDONE is set to TRUE.
 
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 [[stop.sound|<code>stop.sound</code>]] command) fDONE is set to TRUE.
Line 16: Line 16:
  
 
&nbsp;
 
&nbsp;
 +
 
== Example ==
 
== Example ==
  

Revision as of 21:33, 25 December 2013

The sound command plays a loaded sound resource.

 

Syntax

sound(byt SOUNDNUM, flg fDONE);

 

Remarks

The sound must be loaded with the load.sound 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 stop.sound 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.

 

Example

Code:
load.sound(22);
sound(22, f99);

 

Technical Information

Required interpreter version Bytecode Value
Available in all AGI versions 0x63

 

See Also

 

Sources