private void Stop() { try { if (m_Player != null) { try { m_Player.Dispose(); } finally { m_Player = null; } } if (m_Recorder != null) { try { m_Recorder.Dispose(); } finally { m_Recorder = null; } } m_Fifo.Flush(); // clear all pending data } catch (Exception E) { MessageBox.Show(E.Message); } }
private void BufferClear() { if (wavePlayer != null) { try { wavePlayer.Dispose(); } finally { wavePlayer = null; } } if (waveRecorder != null) { try { waveRecorder.Dispose(); } finally { waveRecorder = null; } } m_Fifo.Flush(); }
private void Stop() { if (m_Player != null) { try { m_Player.Dispose(); } finally { m_Player = null; } } if (m_Recorder != null) { try { m_Recorder.Dispose(); } finally { m_Recorder = null; } } m_Fifo.Flush(); // clear all pending data }
private void Stop() { if (_recorder != null) { try { _recorder.Dispose(); } catch { } finally { _recorder = null; } } if (_isPlayer == true) { if (_player != null) { try { _player.Dispose(); } catch { } finally { _player = null; } } _streamOut.Flush(); // clear all pending data } consoletext += DateTime.Now.ToString() + " : Audio input device polling stopped\r\n"; }
public void Destroy() { if (player != null) { player.Dispose(); } }
private void Stop() { if (m_Player != null) { try { m_Player.Dispose(); } finally { m_Player = null; } } }
public void Stop() { if (_player != null) { _player.Dispose(); _player = null; } }
public override void Stop() { Buffers.Clear(); base.Stop(); try { if (Player != null) { Player.Dispose(); } } finally { Player = null; } }
private void GetOutputDevices() { WaveOutPlayer wp = new WaveOutPlayer(); uint dv = wp.GetDeviceCount(); if (dv != 0) { string prod = ""; for (uint x = 0; x < dv; x++) { wp.GetOutputDeviceName(x, ref prod); cbOutputDevices.Items.Add(prod); } cbOutputDevices.SelectedIndex = 0; wp.GetOutputDeviceName((uint)this.OutputDevice, ref prod); cbOutputDevices.Text = prod; } wp.Dispose(); }