Difference between revisions of "AGIWiki/Sound command"

From ScummVM :: Wiki
Jump to navigation Jump to search
(Created page with "__NOTOC__ {{AGIWiki}} == sound == The '''sound''' command plays a loaded sound resource. == Syntax == sound(byt SOUNDNUM, flg fDON...")
 
Line 10: Line 10:
sound([[AGIWiki/Argument types|byt]] SOUNDNUM, [[AGIWiki/Flag|flg]] fDONE);
sound([[AGIWiki/Argument types|byt]] SOUNDNUM, [[AGIWiki/Flag|flg]] fDONE);


== Remarks ===
== Remarks ==


The sound must be loaded with the [[AGIWiki/load.sound|<code>load.sound</code>]] command before it can be played.
The sound must be loaded with the [[AGIWiki/load.sound|<code>load.sound</code>]] command before it can be played.

Revision as of 19:53, 23 February 2013

AGIWiki


sound

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

<syntax type="C++"> load.sound(22); sound(22, f99); </syntax>

Required Interpreter Version

Available in all AGI versions.

Bytecode Value

   0x63

See Also

Sources