public void StopRecording() { if (m_audioInput != null) { m_audioInput.Stop(); m_audioInput = null; } if (m_audioOutput != null) { m_audioOutput.Stop(); m_audioOutput = null; } ClearExtendedExecution(); }
private async void StartButton_Click(object sender, RoutedEventArgs e) { if (m_rpcRunning) { var result = await m_rpcClient.Stop(); m_rpcRunning = false; startButton.Content = "Start"; openButton.IsEnabled = true; m_audioOutput.Stop(); m_audioOutput = null; } else { m_audioOutput = new Audio.AudioOutput(); await m_audioOutput.Start(); m_rpcClient.Start(); m_rpcRunning = true; startButton.Content = "Stop"; openButton.IsEnabled = false; } }