Exemplo n.º 1
0
 public void PlaySound()
 {
     using (var player = new SoundPlayer(SoundLibrary.GetSoundName()))
     {
         player.PlaySync();
     }
     _thread.Join();
 }
Exemplo n.º 2
0
 public void Play()
 {
     SoundLibrary.GetSoundName();
     _thread = new Thread(PlaySound);
     _thread.Start();
 }