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