Esempio n. 1
0
        public void Play(SoundCue cue = null, bool wait = false)
        {
            Stop();

            lock (this)
            {
                Enabled   = true;
                ActiveCue = cue;
                BuildWaveOut();
                WaveOut.Play();
                if (wait)
                {
                    while (WaveOut.PlaybackState == PlaybackState.Playing)
                    {
                        Thread.Sleep(5);
                    }
                }
            }
        }
Esempio n. 2
0
 public void Play(Sound sound, SoundCue cue = null, bool wait = false)
 {
     Log($"Playing {sound.Id}.");
     sound.Play(cue, wait);
 }