Ejemplo n.º 1
0
        /// <summary>
        /// buffers a frame into mpg123.
        /// </summary>
        void BufferFrame()
        {
            for (int i = 0; i < 1;)
            {
                AudioFrame frame = m_Source.GetNextFrame();
                if (frame == null)
                {
                    break;
                }

                Decoding?.Invoke(this, new AudioFrameEventArgs(frame));
                if (frame.IsAudio)
                {
                    m_DecodeFifoBuffer.Enqueue(frame.Data);
                    i++;
                }
            }
        }
Ejemplo n.º 2
0
 /// <summary>Called when [decoding a frame].</summary>
 /// <param name="frame">The frame.</param>
 protected virtual void OnDecoding(AudioFrame frame)
 {
     Decoding?.Invoke(this, new AudioFrameEventArgs(frame));
 }
Ejemplo n.º 3
0
 /// <summary>Initializes a new instance of the <see cref="AudioFrameEventArgs"/> class.</summary>
 /// <param name="frame">The frame.</param>
 public AudioFrameEventArgs(AudioFrame frame)
 {
     Frame = frame;
 }