Plays a .WAV file or a .WAV resource.
Syntax: PLAYWAV wavfilename|wavresource, sndOptions
$RESOURCE Welcome_WAV AS "welcome.wav"
PLAYWAV "welcome.wav", SND_ASYNC OR SND_LOOP
PLAYWAV Welcome_WAV, SND_ASYNC OR SND_LOOP
sndOptions determine how the wav file is played back.
0 = SND_SYNC '-- waits for wav to finish
1 = SND_ASYNC '-- background play
3 = SND_LOOP '-- Loop wav once finished playing
You can combine SYNC or ASYNC with LOOP by OR'ing them.
If your WAV file is not finished playing when you close your application,
you will receive an access violation. You can stop the
.WAV by passing an empty string as a filename.