Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

goomyman

Is their a way to use PlaySound() to play 2 sounds at once?

This topic is 5891 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

When i use PlaySound or sndPlaySound ( pretty much the same thing but older ) and I have looping background music. When I play another sound the background music stops. Is their another way i could play sounds to fix this like use direct 3d sound.

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
If you want simpler than DirectSound (which I assume because you were using PlaySound) use the MCIWnd macros.

Share this post


Link to post
Share on other sites
oh im sure i could have used direct sound but ive never done it and i just wanted to throw in sounds and make them work. From the responses im assuming i cant do it in playsound(). Next time i will just spend the time to use direct sound.

Share this post


Link to post
Share on other sites
You might make your life easier by using DirectMusic instead. Starting with DX8 DirectMusic can handle both command-based and wave sounds, and makes the entire implementation rather simple. I was able to jump in and make a class to handle all music for a game I am working on in about 20 minutes, with no prior experience.

Share this post


Link to post
Share on other sites
MCIWnd is really easy to use. I coded a simple MFC dialog to play two mp3s at once, each one of which could be independently paused/resumed, with only a dozen lines of MCI code. DirectX Audio will most likely give you better performance, but it will require more effort as well.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!