68 assert(head ==
nullptr);
69 assert(tail_r == &head);
82 audio_format == other;
A queue of MusicChunk objects.
gcc_pure bool Contains(const MusicChunk *chunk) const noexcept
Checks if the specified chunk is enqueued in the music pipe.
An allocator for MusicChunk objects.
void Clear(MusicBuffer &buffer) noexcept
Clears the whole pipe and returns the chunks to the buffer.
gcc_pure bool IsEmpty() const noexcept
~MusicPipe()
Frees the object.
MusicPipe()=default
Creates a new MusicPipe object.
gcc_pure bool CheckFormat(AudioFormat other) const noexcept
Checks if the audio format if the chunk is equal to the specified audio_format.
MusicPipe & operator=(const MusicPipe &)=delete
void Push(MusicChunk *chunk) noexcept
Pushes a chunk to the tail of the pipe.
gcc_pure unsigned GetSize() const noexcept
Returns the number of chunks currently in this pipe.
gcc_pure const MusicChunk * Peek() const noexcept
Returns the first MusicChunk from the pipe.
MusicChunk * Shift() noexcept
Removes the first chunk from the head, and returns it.