PLAYWAVE

Synopsis
PLAYWAVE wavefile flags
Description

Plays a wave file.

The wavefile input is a filename of a WAVE file. It may either be a word or a list of words. If wavefile is the empty word or the empty list, then FMSLogo stops any wave files that it is currently playing. If the file named by wavefile does not exist or is an invalid wave file, then the instruction does nothing.

The flags input is an integer that describes how the sound should be played. The meaning is given by the following table:

FlagBehavior
0Do not stop until the wave file has been completely played.
1Return control to the caller while the wave file is still playing.
2Don't use the default sound if the specified one cannot be found.
4In memory sound (not supported).
8Continue to loop the sound until another PLAYWAVE instruction is run.
16Don't stop an already playing sound.

These flags can be combined by adding them together.

Example
; loop the tada sound.
PLAYWAVE "c:\\windows\\tada.wav 1+8

; wait two seconds
WAIT 120

; stop the sound
PLAYWAVE [] 0

SourceForge.net Logo