Example #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++;
                }
            }
        }
Example #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));
 }