Arguments for new block event from audio source.
Inheritance: System.EventArgs
コード例 #1
0
ファイル: MainForm.cs プロジェクト: xyicheng/Accord
 private void output_Started(object sender, PlayFrameEventArgs e)
 {
     invoke(() =>
     {
         btnMic1.Enabled = btnMic2.Enabled = false;
         btnSource1.Enabled = btnSource2.Enabled = false;
     });
 }
コード例 #2
0
        /// <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);
            }
        }
コード例 #3
0
ファイル: AudioOutputDevice.cs プロジェクト: qusma/framework
        private void OnFramePlayingStarted(PlayFrameEventArgs e)
        {
            isPlaying = true;

            if (FramePlayingStarted != null)
                FramePlayingStarted(this, e);
        }