Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
1/6/2010
In Windows Embedded CE, waveform audio files use the .wav file name extension. The following code example shows how to play the \Sounds\Bells.wav file.
PlaySound (TEXT("\\SOUNDS\\BELLS.WAV"), NULL, SND_SYNC);
If the specified file does not exist or the file cannot be stored in available device memory, the PlaySound function plays the default system sound. If you have not defined a default system sound, PlaySound fails without playing a sound. The following code example shows how to specify that the default sound should not be played, by using the SND_NODEFAULT flag in the fdwSound parameter to prohibit the application from playing the default sound.
PlaySound (TEXT("\\SOUNDS\\BELLS.WAV"), NULL, SND_SYNC | SND_NODEFAULT);