Go to the documentation of this file.
28 #ifndef ASYNC_AUDIO_SOURCE_INCLUDED
29 #define ASYNC_AUDIO_SOURCE_INCLUDED
121 : m_sink(0), m_sink_managed(false), m_handler(0),
122 m_auto_unreg_source(false), is_flushing(false)
156 AudioSink *
sink(
void)
const {
return m_sink; }
166 bool sinkManaged(
void)
const {
return m_sink_managed; }
191 assert(m_handler != 0);
208 assert(m_handler != 0);
265 bool m_auto_unreg_source;
268 bool registerSinkInternal(
AudioSink *
sink,
bool managed,
bool reg);
269 void unregisterSinkInternal(
bool is_being_destroyed);
AudioSink * sink(void) const
Get the registered audio sink.
int sinkWriteSamples(const float *samples, int len)
void clearHandler(void)
Clear a handler that was previously setup with setHandler.
AudioSource * handler(void) const
virtual void allSamplesFlushed(void)
The registered sink has flushed all samples.
bool registerSink(AudioSink *sink, bool managed=false)
Register an audio sink to provide samples to.
AudioSource(void)
Default constuctor.
The base class for an audio source.
bool setHandler(AudioSource *handler)
Setup another source to handle the outgoing audio.
virtual ~AudioSource(void)
Destructor.
void unregisterSink(void)
Unregister the previously registered audio sink.
The base class for an audio sink.
void sinkFlushSamples(void)
virtual void resumeOutput(void)
Resume audio output to the sink.
Namespace for the asynchronous programming classes.
void handleAllSamplesFlushed(void)
The registered sink has flushed all samples.
bool sinkManaged(void) const
Check if the sink is managed or not.
bool isRegistered(void) const
Check if an audio sink has been registered.