protected void RefreshAudioCapability() { //Rebuild graph. AFAIK the only reason we need to do this is to apply changes to the buffer settings. ac.Dispose(); ac = new AudioCapability(this.sourceFilter); ac.SetLogger(new AVLogger(Log)); ac.ActivateMicrophone(); }
private void ActivateAudioCapability(FilterInfo fi) { ac = new AudioCapability(fi); ac.SetLogger(new AVLogger(Log)); ac.ActivateMicrophone(); acg = ac.AudioCaptureGraph; RenderAndRunAudio(acg, ckPlayAudio.Checked); }
public frmAudioSettingsBase(FilterInfo fi, frmAVDevices frmAV) { InitializeComponent(); Debug.Assert(frmAV != null); this.frmAV = frmAV; this.sourceFilter = fi; ac = new AudioCapability(fi); ac.SetLogger(new AVLogger(Log)); ac.ActivateMicrophone(); }
public frmAudioSettings(FilterInfo fi, frmAVDevices frmAV) { InitializeComponent(); Debug.Assert(frmAV != null); this.frmAV = frmAV; this.sourceFilter = fi; ac = new AudioCapability(fi); ac.SetLogger(new AVLogger(Log)); ac.ActivateMicrophone(); }
private void ckPlayAudio_CheckedChanged(object sender, System.EventArgs e) { ckPlayAudio.Text = ckPlayAudio.Checked ? Strings.StopAudio : Strings.TestAudio; try { if (ckPlayAudio.Checked) { FilterInfo fi = (FilterInfo)cboMicrophones.SelectedItem; audioCapability = new AudioCapability(fi); audioCapability.SetLogger(new AVLogger(Log)); audioCapability.ActivateMicrophone(); RenderAndRunAudio(audioCapability.CaptureGraph, true); } else { RenderAndRunAudio(audioCapability.CaptureGraph, false); audioCapability.Dispose(); audioCapability = null; } } catch (COMException ex) { Log(DShowError._AMGetErrorText(ex.ErrorCode)); Log(ex.ToString()); } catch (Exception ex) { Log(ex.ToString()); } }