Ok, Iv been working on an engine for a game im going to produce with my friend. Sofar we have pretty much all the graphics and input done. I started looking around for how to add sound to my engine, and the only thing that came up was DirectX Sound, so I read a tutorial, and implemented it. Only problem is I can only have one sound playing at a time.


Code:
Example:
LoadSegment(hwnd, "keypress.wav")
if (keyPressed['Z'] || keyPressed['z'])
			{		
if (dmusicPerformance->IsPlaying(dmusicSegment, NULL) != S_OK)
PlaySegment(dmusicPerformance, dmusicSegment);
			}
This function only lets me load one sound, and play it. Is there a way I can get it to play multiple sounds?