Sign in to follow this  
Net-Ninja

Double PlaySounds (C++)

Recommended Posts

Hi i was wondering if there is a way to have two Playsounds in C++ PlaySound(Directory, NULL, SND_FILENAME | SND_LOOP | SND_ASYNC); As soon as you try to use playsound again the music that was playing before stops (kinda obvious) Is there a way to perhaps name the diffrent playsounds? If no, is there a simple sound code that enables you to play both background music and special effects? Happy for any answere...

Share this post


Link to post
Share on other sites
According to this thread on MSDN, PlaySound is not capable of what you want.

The thread suggests using DirectSound, which while simpler than other DirectX libraries, may be a bit overkill for what you want. I know there are a load of good sound libraries available but I've never used them myself.

If you need some advice on DirectSound, post back. It is dead easy to use once you have got some code to load a .WAV file into a sound buffer. Alternativley I'm sure people will post some links to some good third party sound libraries soon.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this