AGIWiki/Sound command

From ScummVM :: Wiki
< AGIWiki
Revision as of 15:04, 25 October 2018 by Criezy (talk | contribs) (Text replacement - "<source lang=" to "<syntaxhighlight lang=")
Jump to navigation Jump to search


The sound command plays a loaded sound resource.


sound(byt SOUNDNUM, flg fDONE);


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.


<syntaxhighlight lang="cpp"> load.sound(22); sound(22, f99); </source>

Technical Information

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

See Also