Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Playing sounds simultaneously

Status
Not open for further replies.

forrestcupp

Programmer
Jul 22, 2006
25
I know how to play an audio file using the SoundPlayer class, but I have only been able to play one sound at a time. If I am playing a sound, and I try to play another sound, it stops the first one to play the second one. And that is with two separately declared SoundPlayer objects. So, is there some way to play two sounds simultaneously? I want to be able to play background music and sound effects at the same time.
 
In case anyone cares, I found out that using the managed DirectX AudioVideoPlayback namespace is just as easy as using a SoundPlayer class, and with DirectX I can play multiple audio sources and multiple file formats. It works much better, and it's easy to use.
 
Thanks for posting back what you've found.

----------------------------------------

TWljcm8kb2Z0J3MgIzEgRmFuIQ==
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top