I'm making a sampler program where each key from 1 to 9 will make a different sound. Everything works fine, but when I press two (or more) sounds at the same time, the second one "kills" the first one.
I'm playing the sounds from .WAV files, using SoundPlayer
. How can I solve this?
You'll need to use DirectX (DirectSound) or some similar API that is designed to allow the playing of multiple sounds at the same time.