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)
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);
bool isRegistered(void) const
Check if an audio sink has been registered.
void unregisterSink(void)
Unregister the previously registered audio sink.
virtual void allSamplesFlushed(void)
The registered sink has flushed all samples.
void sinkFlushSamples(void)
AudioSource * handler(void) const
bool registerSink(AudioSink *sink, bool managed=false)
Register an audio sink to provide samples to.
virtual ~AudioSource(void)
Destructor.
bool sinkManaged(void) const
Check if the sink is managed or not.
virtual void resumeOutput(void)
Resume audio output to the sink.
int sinkWriteSamples(const float *samples, int len)
AudioSource(void)
Default constuctor.
The base class for an audio sink.
AudioSink * sink(void) const
Get the registered audio sink.
Namespace for the asynchronous programming classes.
void clearHandler(void)
Clear a handler that was previously setup with setHandler.
bool setHandler(AudioSource *handler)
Setup another source to handle the outgoing audio.
The base class for an audio source.
void handleAllSamplesFlushed(void)
The registered sink has flushed all samples.