private void WaveSource_RecordingStopped(object sender, StoppedEventArgs e) { if (PassingThrough) { WaveSource.StartRecording(); } }
public void StartRecording() { if (_isRecording) { return; } _isRecording = true; WaveSource.StartRecording(); }
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) { } }