private void WaveOutput_PlaybackStopped(object sender, StoppedEventArgs e) { if (PassingThrough) { WaveOutput.Play(); } }
public void StartPassingThrough() { if (DateTime.Now <= LastPauseOrStart.AddMilliseconds(500)) { return; } LastPauseOrStart = DateTime.Now; try { WaveSource.StartRecording(); if (WaveOutput != null) { WaveOutput.Play(); } if (DirectSoundOutput != null) { DirectSoundOutput.Play(); } PassingThrough = true; } catch (Exception) { } }