I played a sound using the PlaySound()
function. How can I stop playing that sound? Is there any function that can do that job?
CodePudding user response:
The documentation has the following to say about the pszSound
parameter:
If this parameter is
NULL
, any currently playing waveform sound is stopped.
Following that contract you simply call
::PlaySound(nullptr, nullptr, 0);
to stop playing.
CodePudding user response:
You can use the following:
PlaySound(NULL, NULL, 0);