I made a kind of Tetris game in C# with a Win Forms Application. I want the program to play-looping a .wav file during the game and another short .wav file only occasionally but parallel to the "main" sound.
I declared at the beginning:
SoundPlayer sp;
SoundPlayer sp2;
Then in the FormLoad Event:
private void Form1_Load(object sender, EventArgs e)
{
...
sp2 = new SoundPlayer(".../tetris.wav");
sp2.PlayLooping();
...
}
Then as far as a line of blocks disappear I want to fire the bomb-sound:
sp = new SoundPlayer(".../bomb.wav");
sp.Play();
The problem is: when the second sound is fired, the first (main) sound stopped. I think this is a thread-problem, but I don't know how to solve this.
Thank you, Filippo