28#ifndef ASYNC_AUDIO_SINK_INCLUDED
29#define ASYNC_AUDIO_SINK_INCLUDED
121 AudioSink(
void) : m_source(0), m_handler(0), m_auto_unreg_sink(false) {}
166 assert(m_handler != 0);
180 assert(m_handler != 0);
228 bool m_auto_unreg_sink;
The base class for an audio sink.
void clearHandler(void)
Clear a handler that was previously setup with setHandler.
void sourceAllSamplesFlushed(void)
Tell the source that all samples have been flushed.
bool registerSource(AudioSource *source)
Register an audio source to provide samples to this sink.
void unregisterSource(void)
Unregister the previously registered audio source.
virtual int writeSamples(const float *samples, int count)
Write samples into this audio sink.
void sourceResumeOutput(void)
Tell the source that we are ready to accept more samples.
AudioSource * source(void) const
Get the registered audio source.
virtual void flushSamples(void)
Tell the sink to flush the previously written samples.
AudioSink(void)
Default constuctor.
bool isRegistered(void) const
Check if an audio source has been registered.
AudioSink * handler(void) const
bool setHandler(AudioSink *handler)
Setup another sink to handle the incoming audio.
virtual ~AudioSink(void)
Destructor.
The base class for an audio source.
Namespace for the asynchronous programming classes.