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); } } } }
public void Play(Sound sound, SoundCue cue = null, bool wait = false) { Log($"Playing {sound.Id}."); sound.Play(cue, wait); }