/// <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++; } } }
/// <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)); }
/// <summary>Initializes a new instance of the <see cref="AudioFrameEventArgs"/> class.</summary> /// <param name="frame">The frame.</param> public AudioFrameEventArgs(AudioFrame frame) { Frame = frame; }