Group: Windows Multimedia - Library: winmm
The sndPlaySound function plays a waveform sound specified either by a filename or by an entry in the registry or the WIN.INI file.
How to play a waveform sound (a WAV file in particular)
WAV file recorder
BOOL sndPlaySound(
LPCSTR lpszSound,
UINT fuSound
); DECLARE INTEGER sndPlaySound IN winmm;
STRING lpszSound,;
INTEGER fuSound lpszSound A string that specifies the sound to play.
fuSound Flags for playing the sound.
Returns TRUE if successful or FALSE otherwise.
This function offers a subset of the functionality of the PlaySound function; sndPlaySound is being maintained for backward compatibility.
The PlaySound plays sound specified either by a file name, or by an entry in the registry, or by a resource identifier.
MSDN: the lpszSound parameter can be either an entry in the registry or in WIN.INI that identifies a system sound, or it can be the name of a waveform-audio file.
If the function does not find the entry, the parameter is treated as a filename. If this parameter is NULL, any currently playing sound is stopped.
See also: PlaySound.
Home