MPD
0.20.6
|
A queue of MusicChunk objects. More...
#include <MusicPipe.hxx>
Public Member Functions | |
MusicPipe ()=default | |
Creates a new MusicPipe object. More... | |
MusicPipe (const MusicPipe &)=delete | |
~MusicPipe () | |
Frees the object. More... | |
MusicPipe & | operator= (const MusicPipe &)=delete |
gcc_pure bool | CheckFormat (AudioFormat other) const |
Checks if the audio format if the chunk is equal to the specified audio_format. More... | |
gcc_pure bool | Contains (const MusicChunk *chunk) const |
Checks if the specified chunk is enqueued in the music pipe. More... | |
gcc_pure const MusicChunk * | Peek () const |
Returns the first MusicChunk from the pipe. More... | |
MusicChunk * | Shift () |
Removes the first chunk from the head, and returns it. More... | |
void | Clear (MusicBuffer &buffer) |
Clears the whole pipe and returns the chunks to the buffer. More... | |
void | Push (MusicChunk *chunk) |
Pushes a chunk to the tail of the pipe. More... | |
gcc_pure unsigned | GetSize () const |
Returns the number of chunks currently in this pipe. More... | |
gcc_pure bool | IsEmpty () const |
A queue of MusicChunk objects.
One party appends chunks at the tail, and the other consumes them from the head.
Definition at line 39 of file MusicPipe.hxx.
|
default |
Creates a new MusicPipe object.
It is empty.
|
delete |
|
inline |
|
inline |
Checks if the audio format if the chunk is equal to the specified audio_format.
Definition at line 80 of file MusicPipe.hxx.
void MusicPipe::Clear | ( | MusicBuffer & | buffer | ) |
Clears the whole pipe and returns the chunks to the buffer.
buffer | the buffer object to return the chunks to |
gcc_pure bool MusicPipe::Contains | ( | const MusicChunk * | chunk | ) | const |
Checks if the specified chunk is enqueued in the music pipe.
|
inline |
Returns the number of chunks currently in this pipe.
Definition at line 122 of file MusicPipe.hxx.
|
inline |
Definition at line 127 of file MusicPipe.hxx.
|
inline |
Returns the first MusicChunk from the pipe.
Returns nullptr if the pipe is empty.
Definition at line 97 of file MusicPipe.hxx.
void MusicPipe::Push | ( | MusicChunk * | chunk | ) |
Pushes a chunk to the tail of the pipe.
MusicChunk* MusicPipe::Shift | ( | ) |
Removes the first chunk from the head, and returns it.