public void StopSound(SPlaySound spsSound) { this.m_blPlaySound = false; //this.m_spPlayer.Stop(); if (this.m_thSound != null) { this.m_thStopSound = new Thread(new ParameterizedThreadStart(StopSound)); this.m_thStopSound.Start(spsSound); } }
public void PlaySound(string strSoundFile, int iRepeat) { SPlaySound spsSound = new SPlaySound(); spsSound.m_iRepeat = iRepeat; spsSound.m_strSoundFile = strSoundFile; //spsSound.m_spPlayer = this.m_spPlayer; if (this.m_thSound != null) { this.StopSound(spsSound); } else { this.m_thSound = new Thread(new ParameterizedThreadStart(PlaySound)); this.m_blPlaySound = true; this.m_thSound.Start(spsSound); } }