When DirectSound is initialized, it automatically creates a primary buffer for mixing sounds and sending them to the output device. Basically and overly-simplistically, think of this primary buffer as a single bucket that you don't usually touch directly, who's content gets dumped into the soundcard's memory "periodically", and the only way you get to fill it is from one or more secondary buckets (buffers).

Now, when you instantiate five of your classes, you create and fill five secondary buckets. As soon as you hit Play(), you dump that secondary bucket into the primary bucket and they all get "mixed". Mixing is done automatically when you call Play(). If you call Play() fast enough, then it seems like the five sounds play "at the same time".

A little more accurately, some of the primary bucket starts flowing out to the card (committed to play) right after your first call to Play(), and as you call Play() on your second bucket (and so on...), you add those buckets with a little offset. Depending on how you instantiate and then play the five sounds, it may be an imperceptible difference to human ears...

Does this help?

alphadog
—
2008-12-03T21:36:22Z —
#4

To add, the way for the five sounds to play sequentially is to work with Play Buffer Notifications and hit Play() only when the previous sound is done playing.

There are, as always, more "hackish" ways to skin the cat. For example, if all sounds are the same length of time, you can simply wait between calls to Play().