using System; namespace ADOFAIRenderer.Util.Audio.Clip; /// /// Sequential reader of decoded PCM at the clip's own sample rate and channel count. /// Samples are interleaved 32-bit float. Positions and counts are in frames (one frame = one sample per channel). /// Used by one thread at a time (the store's decoder thread). may be called more than once. /// internal interface IPCMReader : IDisposable { /// Channel count of the decoded audio (1 or more). int Channels { get; } /// Sample rate of the decoded audio in Hz. int SampleRate { get; } /// Total frame count of the clip at . long TotalFrames { get; } /// /// True when the data can be read only once, from frame 0 to the end (data is released as it is read). /// The source then keeps every chunk (). /// bool IsForwardOnly { get; } /// Frame index that the next starts at. long Position { get; } /// /// Moves the read position to (0 ~ ). /// A forward-only reader accepts only frames whose data has not been released. /// void Seek(long frame); /// /// Reads up to frames into starting at index 0 and advances the position. /// must hold at least frameCount * Channels floats. /// /// Frames read. 0 at the end of the clip. int Read(float[] buffer, int frameCount); }