Maybe a bit late, but I am having exactly the same problem. I my app several timers (System.Windows.Forms.Timer, 200ms interval) are running when I playback a sound with SoundPlayer.PlayLooping(); It happens within 30 seconds for me (consistently every time).
I am still experimenting whether it is really caused by these other timers. In a standalone app I don't get the problem, or at least, not as fast. If I call SoundPlayer.Stop(); and then SoundPlayer.PlayLooping(); again, everything is fine once more.
private SoundPlayer SOUND_Player;
private Boolean SOUND_Playing = false;
private Boolean SOUND_Silenced = false;
private void SOUND_Alarm() {
if(SOUND_Silenced || SOUND_Playing) {
return;
}
try {
SOUND_Player.Stream = Properties.Resources.Alarm1;
SOUND_Player.PlayLooping();
SOUND_Playing = true;
}catch{
}
}
private void SOUND_Stop() {
SOUND_Player.Stop();
SOUND_Playing = false;
}
Anybody a clue as whether this is a bug or something I could be doing wrong in my app?
Thanks!
DC