Advertisement

Nooby PlaySound

Started by April 06, 2008 07:45 AM
3 comments, last by daviddiligent 16 years, 7 months ago
Hi all Just wanna ask how can I use PlaySound() function to play my background music without being interrupted. I mean If I use PlaySound("musicfile",NULL, SND_ASYNC|SND_LOOP), this would play my music looply, but it would be interrupted once another PlaySound is called, such as a "Fire Bullet" sound. Cheers
/*----------------------------------------------------------------------------------------------------------------------------------*/Enthusiastic and wild about game development. Any opportunity would get me sink into any fantastic game-revolution era.
I am not the most experienced programmer so I could be horribly wrong, but have you tried adding SND_NOSTOP

[Edited by - Jaap1978 on April 6, 2008 9:48:11 AM]

Composer and Sound Designer

http://www.jaapvisser.com

Advertisement
Quote: Original post by Jaap1978
I am not the most experienced programmer so I could be horribly wrong, but have you tried adding SND_NOSTOP


I tried. It doesn't work. As soon as another PlaySound() is invoked, the background music stops.
/*----------------------------------------------------------------------------------------------------------------------------------*/Enthusiastic and wild about game development. Any opportunity would get me sink into any fantastic game-revolution era.
I did a quick check and PlaySound is not capable of playing multiple files (source = http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=260406&SiteID=1).
You have to use another API (you could try DirectX, OpenAl, Fmod or such)

Composer and Sound Designer

http://www.jaapvisser.com

Quote: Original post by Jaap1978
I did a quick check and PlaySound is not capable of playing multiple files (source = http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=260406&SiteID=1).
You have to use another API (you could try DirectX, OpenAl, Fmod or such)


Cheers. I thought so.

/*----------------------------------------------------------------------------------------------------------------------------------*/Enthusiastic and wild about game development. Any opportunity would get me sink into any fantastic game-revolution era.

This topic is closed to new replies.

Advertisement