Double PlaySounds (C++)
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...
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.
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement