30 #ifndef ASYNC_AUDIO_FIFO_INCLUDED 31 #define ASYNC_AUDIO_FIFO_INCLUDED 142 void setSize(
unsigned new_size);
148 bool empty(
void)
const {
return !is_full && (tail == head); }
158 bool full(
void)
const {
return is_full; }
240 virtual int writeSamples(
const float *samples,
int count);
278 unsigned prebuf_samples;
282 bool buffering_enabled;
283 bool disable_buffering_when_flushed;
287 void writeSamplesFromFifo(
void);
virtual void flushSamples(void)
Tell the FIFO to flush the previously written samples.
bool full(void) const
Check if the FIFO is full.
virtual void resumeOutput(void)
Resume audio output to the connected sink.
void clear(void)
Clear all samples from the FIFO.
This file contains the base class for an audio source.
virtual void allSamplesFlushed(void)
The registered sink has flushed all samples.
A FIFO class for handling audio samples.
void enableBuffering(bool enable)
Enable/disable the fifo buffer.
bool empty(void) const
Check if the FIFO is empty.
virtual ~AudioFifo(void)
Destructor.
void setPrebufSamples(unsigned prebuf_samples)
Set the number of samples that must be in the fifo before any samples are written out from it...
bool overwrite(void) const
Check the overwrite mode.
This file contains the base class for an audio sink.
virtual int writeSamples(const float *samples, int count)
Write samples into the FIFO.
AudioFifo(unsigned fifo_size)
Constuctor.
bool bufferingEnabled(void) const
Check if buffering is enabled or disabled.
void setOverwrite(bool overwrite)
Set the overwrite mode.
unsigned samplesInFifo(bool ignore_prebuf=false) const
Find out how many samples there are in the FIFO.
The base class for an audio sink.
Namespace for the asynchronous programming classes.
The base class for an audio source.
void setSize(unsigned new_size)
Set the size of the FIFO.