The sound is created using:
PlaySound(TEXT("C:\\hitBrick.wav"), NULL, SND_FILENAME);
As Ville Krumlinde already said, use SND_ASYNC like this:
PlaySound(TEXT("C:\hitBrick.wav"), NULL, SND_FILENAME | SND_ASYNC);
Take a look: http://msdn.microsoft.com/en-us/library/windows/desktop/dd743680%28v=vs.85%29.aspx
SND_ASYNC The sound is played asynchronously and PlaySound returns immediately after beginning the sound. To terminate an asynchronously played waveform sound, call PlaySound with pszSound set to NULL.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With