PlayWavFile

Prototype

void PlayWavFile( String sPathName, boolean bSync )

Parameters

String sPathName
The filename of, and optionally the directory path to, the WAV file.

boolean bSync
If bSync is true, the module does not return until the WAV file finishes playing. If bSync is false, the module returns as soon as the WAV file begins playing.

Remarks

This module plays the specified WAV sound file. The module calls the Windows function PlaySound to play the WAV file. If sPathName does not specify a directory path, the Windows PlaySound function searches for the WAV file in the following directories: the current directory; the Windows directory; the Windows system directory; the directories listed in the PATH environment variable.

Example
run PlayWavFile( "tada.wav", false );