Reputation: 303
The sound is created using:
PlaySound(TEXT("C:\\hitBrick.wav"), NULL, SND_FILENAME);
Upvotes: 7
Views: 801
Reputation: 13979
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.
Upvotes: 11