Qmmp
|
#include <recycler.h>
Public Member Functions | |
Recycler () | |
~Recycler () | |
void | configure (quint32 freq, int chan, Qmmp::AudioFormat format) |
bool | full () const |
bool | empty () const |
int | available () const |
int | used () const |
Buffer * | next () |
Buffer * | get () |
void | add () |
void | done () |
void | clear () |
unsigned long | size () const |
QMutex * | mutex () |
QWaitCondition * | cond () |
bool | blocked () |
The Recycler class provides a queue of audio buffers.
Recycler | ( | ) |
Constructor.
~Recycler | ( | ) |
Destructor.
void add | ( | ) |
Adds current buffer to queue.
int available | ( | ) | const |
Returns a number of available buffers.
bool blocked | ( | ) |
Returns true if the next buffer is used by output. Otherwise returns false.
void clear | ( | ) |
Clears queue.
QWaitCondition* cond | ( | ) | [inline] |
Returns wait condition pointer.
void configure | ( | quint32 | freq, |
int | chan, | ||
Qmmp::AudioFormat | format | ||
) |
Setups audio parameters of output interface.
freq | Sample rate. |
chan | Number of channels. |
format | Audio format |
void done | ( | ) |
Removes current buffer from queue.
bool empty | ( | ) | const |
Returns true if queue if empty, otherwise returns false
bool full | ( | ) | const |
Returns true if queue if full, otherwise returns false
QMutex* mutex | ( | ) | [inline] |
Returns mutex pointer.
unsigned long size | ( | ) | const |
Returns size of all buffers in bytes.
int used | ( | ) | const |
Returns a number of used buffers.