Skip to content

Latest commit

 

History

History
60 lines (40 loc) · 1.61 KB

File metadata and controls

60 lines (40 loc) · 1.61 KB

Home

Function name : sndPlaySound

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.


Code examples:

How to play a waveform sound (a WAV file in particular)
WAV file recorder

Declaration:

BOOL sndPlaySound(
  LPCSTR lpszSound,
  UINT fuSound
);  

FoxPro declaration:

DECLARE INTEGER sndPlaySound IN winmm;
	STRING  lpszSound,;
	INTEGER fuSound  

Parameters:

lpszSound A string that specifies the sound to play.

fuSound Flags for playing the sound.


Return value:

Returns TRUE if successful or FALSE otherwise.


Comments:

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.