A class that just passes the audio through and fires an event when the stream state changes. More...
#include <AsyncAudioStreamStateDetector.h>
A class that just passes the audio through and fires an event when the stream state changes.
Definition at line 111 of file AsyncAudioStreamStateDetector.h.
Async::AudioStreamStateDetector::AudioStreamStateDetector | ( | void | ) | [inline] |
Default constuctor.
Definition at line 117 of file AsyncAudioStreamStateDetector.h.
virtual Async::AudioStreamStateDetector::~AudioStreamStateDetector | ( | void | ) | [inline, virtual] |
Destructor.
Definition at line 122 of file AsyncAudioStreamStateDetector.h.
virtual void Async::AudioStreamStateDetector::allSamplesFlushed | ( | void | ) | [inline, virtual] |
The registered sink has flushed all samples.
This function will be called when all samples have been flushed in the registered sink. This function is normally only called from a connected sink object.
Reimplemented from Async::AudioPassthrough.
Definition at line 170 of file AsyncAudioStreamStateDetector.h.
References sigStreamStateChanged.
virtual void Async::AudioStreamStateDetector::flushSamples | ( | void | ) | [inline, virtual] |
Tell the sink to flush the previously written samples.
This function is used to tell the sink to flush previously written samples. When done flushing, the sink should call the sourceAllSamplesFlushed function. This function is normally only called from a connected source object.
Reimplemented from Async::AudioPassthrough.
Definition at line 153 of file AsyncAudioStreamStateDetector.h.
References sigStreamStateChanged.
bool Async::AudioStreamStateDetector::isActive | ( | void | ) | const [inline] |
Check if the steam is active or not.
Definition at line 191 of file AsyncAudioStreamStateDetector.h.
bool Async::AudioStreamStateDetector::isFlushing | ( | void | ) | const [inline] |
Check if the steam is flushing or not.
Definition at line 198 of file AsyncAudioStreamStateDetector.h.
bool Async::AudioStreamStateDetector::isIdle | ( | void | ) | const [inline] |
Check if the steam is idle or not.
Definition at line 184 of file AsyncAudioStreamStateDetector.h.
virtual int Async::AudioStreamStateDetector::writeSamples | ( | const float * | samples, | |
int | count | |||
) | [inline, virtual] |
Write samples into this audio sink.
samples | The buffer containing the samples | |
count | The number of samples in the buffer |
This function is used to write audio into this audio sink. If it returns 0, no more samples should be written until the resumeOutput function in the source have been called. This function is normally only called from a connected source object.
Reimplemented from Async::AudioPassthrough.
Definition at line 135 of file AsyncAudioStreamStateDetector.h.
References sigStreamStateChanged.
SigC::Signal2<void, bool, bool> Async::AudioStreamStateDetector::sigStreamStateChanged |
A signal that is emitted when the stream state changes.
is_active | Is true if the stream is active | |
is_idle | Is true if the stream is idle |
Definition at line 205 of file AsyncAudioStreamStateDetector.h.
Referenced by allSamplesFlushed(), flushSamples(), and writeSamples().