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;
void unregisterSource(void)
Unregister the previously registered audio source.
virtual ~AudioSink(void)
Destructor.
void clearHandler(void)
Clear a handler that was previously setup with setHandler.
AudioSink * handler(void) const
virtual int writeSamples(const float *samples, int count)
Write samples into this audio sink.
virtual void flushSamples(void)
Tell the sink to flush the previously written samples.
bool isRegistered(void) const
Check if an audio source has been registered.
AudioSink(void)
Default constuctor.
AudioSource * source(void) const
Get the registered audio source.
bool setHandler(AudioSink *handler)
Setup another sink to handle the incoming audio.
The base class for an audio sink.
Namespace for the asynchronous programming classes.
bool registerSource(AudioSource *source)
Register an audio source to provide samples to this sink.
void sourceResumeOutput(void)
Tell the source that we are ready to accept more samples.
void sourceAllSamplesFlushed(void)
Tell the source that all samples have been flushed.
The base class for an audio source.