Async
1.5.0
|
A class that just passes the audio through and fires an event when the stream state changes. More...
#include <AsyncAudioStreamStateDetector.h>
Public Member Functions | |
AudioStreamStateDetector (void) | |
Default constuctor. More... | |
virtual | ~AudioStreamStateDetector (void) |
Destructor. More... | |
virtual int | writeSamples (const float *samples, int count) |
Write samples into this audio sink. More... | |
virtual void | flushSamples (void) |
Tell the sink to flush the previously written samples. More... | |
virtual void | allSamplesFlushed (void) |
The registered sink has flushed all samples. More... | |
bool | isIdle (void) const |
Check if the steam is idle or not. More... | |
bool | isActive (void) const |
Check if the steam is active or not. More... | |
bool | isFlushing (void) const |
Check if the steam is flushing or not. More... | |
![]() | |
AudioPassthrough (void) | |
Default constuctor. More... | |
virtual | ~AudioPassthrough (void) |
Destructor. More... | |
virtual void | resumeOutput (void) |
Resume audio output to the sink. More... | |
![]() | |
AudioSink (void) | |
Default constuctor. More... | |
virtual | ~AudioSink (void) |
Destructor. More... | |
bool | registerSource (AudioSource *source) |
Register an audio source to provide samples to this sink. More... | |
void | unregisterSource (void) |
Unregister the previously registered audio source. More... | |
bool | isRegistered (void) const |
Check if an audio source has been registered. More... | |
AudioSource * | source (void) const |
Get the registered audio source. More... | |
![]() | |
AudioSource (void) | |
Default constuctor. More... | |
virtual | ~AudioSource (void) |
Destructor. More... | |
bool | registerSink (AudioSink *sink, bool managed=false) |
Register an audio sink to provide samples to. More... | |
void | unregisterSink (void) |
Unregister the previously registered audio sink. More... | |
bool | isRegistered (void) const |
Check if an audio sink has been registered. More... | |
AudioSink * | sink (void) const |
Get the registered audio sink. More... | |
bool | sinkManaged (void) const |
Check if the sink is managed or not. More... | |
void | handleAllSamplesFlushed (void) |
The registered sink has flushed all samples. More... | |
Public Attributes | |
sigc::signal< void, bool, bool > | sigStreamStateChanged |
A signal that is emitted when the stream state changes. More... | |
Additional Inherited Members | |
![]() | |
void | sourceResumeOutput (void) |
Tell the source that we are ready to accept more samples. More... | |
void | sourceAllSamplesFlushed (void) |
Tell the source that all samples have been flushed. More... | |
bool | setHandler (AudioSink *handler) |
Setup another sink to handle the incoming audio. More... | |
void | clearHandler (void) |
Clear a handler that was previously setup with setHandler. More... | |
AudioSink * | handler (void) const |
![]() | |
int | sinkWriteSamples (const float *samples, int len) |
void | sinkFlushSamples (void) |
bool | setHandler (AudioSource *handler) |
Setup another source to handle the outgoing audio. More... | |
AudioSource * | handler (void) const |
void | clearHandler (void) |
Clear a handler that was previously setup with setHandler. More... | |
A class that just passes the audio through and fires an event when the stream state changes.
Definition at line 131 of file AsyncAudioStreamStateDetector.h.
|
inline |
Default constuctor.
Definition at line 173 of file AsyncAudioStreamStateDetector.h.
References sigStreamStateChanged.
|
inlinevirtual |
Destructor.
Definition at line 178 of file AsyncAudioStreamStateDetector.h.
|
inlinevirtual |
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 226 of file AsyncAudioStreamStateDetector.h.
|
inlinevirtual |
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 209 of file AsyncAudioStreamStateDetector.h.
|
inline |
Check if the steam is active or not.
Definition at line 247 of file AsyncAudioStreamStateDetector.h.
|
inline |
Check if the steam is flushing or not.
Definition at line 254 of file AsyncAudioStreamStateDetector.h.
|
inline |
Check if the steam is idle or not.
Definition at line 240 of file AsyncAudioStreamStateDetector.h.
|
inlinevirtual |
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 191 of file AsyncAudioStreamStateDetector.h.
sigc::signal<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 261 of file AsyncAudioStreamStateDetector.h.
Referenced by AudioStreamStateDetector().