private void output_Started(object sender, PlayFrameEventArgs e) { invoke(() => { btnMic1.Enabled = btnMic2.Enabled = false; btnSource1.Enabled = btnSource2.Enabled = false; }); }
/// <summary> /// This event will be triggered as soon as the audio starts playing in the /// computer speakers. It can be used to update the UI and to notify that soon /// we will be requesting additional frames. /// </summary> /// private void output_FramePlayingStarted(object sender, PlayFrameEventArgs e) { updateTrackbar(e.FrameIndex); if (e.FrameIndex + e.Count < this.decoder.frames) { int previous = this.decoder.Position; decoder.Seek(e.FrameIndex); Signal s = this.decoder.Decode(e.Count); decoder.Seek(previous); updateWaveform(s.ToFloat(), s.Length); } }
private void OnFramePlayingStarted(PlayFrameEventArgs e) { isPlaying = true; if (FramePlayingStarted != null) FramePlayingStarted(this, e); }