Exemple #1
0
 public void PlayOnce(string soundFile, bool wait)
 {
     this.sound = new SoundThread (soundFile, false);
     this.main = new Thread (new ThreadStart (this.sound.Play));
     this.main.Start ();
     if (wait)
     {
         this.main.Join ();
         this.main = null;
     }
 }
Exemple #2
0
 // Methods
 public void PlayLoop(string soundFile)
 {
     this.sound = new SoundThread (soundFile, true);
     this.main = new Thread (new ThreadStart (this.sound.Play));
     this.main.Start ();
 }