Async
1.5.0
|
An adapter class to connect to an AudioSink class using SigC. More...
#include <AsyncSigCAudioSource.h>
Public Member Functions | |
SigCAudioSource (void) | |
Default constuctor. More... | |
~SigCAudioSource (void) | |
Destructor. More... | |
virtual void | resumeOutput (void) |
Resume audio output to the sink. More... | |
virtual void | allSamplesFlushed (void) |
The registered sink has flushed all samples. More... | |
int | writeSamples (float *samples, int count) |
Write samples into this audio sink. More... | |
void | flushSamples (void) |
Tell the sink to flush the previously written samples. 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 > | sigResumeOutput |
A signal that is emitted when more samples can be written. More... | |
sigc::signal< void > | sigAllSamplesFlushed |
Signal that is emitted when the connected sink is done flushing. More... | |
Additional Inherited Members | |
![]() | |
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... | |
An adapter class to connect to an AudioSink class using SigC.
This is an adapter class that can be used to interact with an AudioSink class using SigC signals and slots.
Definition at line 134 of file AsyncSigCAudioSource.h.
|
inline |
Default constuctor.
Definition at line 176 of file AsyncSigCAudioSource.h.
|
inline |
Destructor.
Definition at line 181 of file AsyncSigCAudioSource.h.
|
inlinevirtual |
The registered sink has flushed all samples.
This function will be called when all samples have been flushed in the registered sink. It will then emit the sigAllSamplesFlushed signal.
Reimplemented from Async::AudioSource.
Definition at line 200 of file AsyncSigCAudioSource.h.
|
inline |
Tell the sink to flush the previously written samples.
This function is used to tell this object to flush previously written samples. When done flushing, the sigAllSamplesFlushed signal will be emitted.
Definition at line 227 of file AsyncSigCAudioSource.h.
|
inlinevirtual |
Resume audio output to the sink.
This function will be called when the registered audio sink is ready to accept more samples. It will then emit the sigResumeOutput signal.
Reimplemented from Async::AudioSource.
Definition at line 189 of file AsyncSigCAudioSource.h.
|
inline |
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 object. If it returns 0, no more samples should be written until the sigResumeOutput signal have been emitted.
Definition at line 215 of file AsyncSigCAudioSource.h.
sigc::signal<void> Async::SigCAudioSource::sigAllSamplesFlushed |
Signal that is emitted when the connected sink is done flushing.
This signal will be emitted when all samples have been flushed in the registered sink.
Definition at line 246 of file AsyncSigCAudioSource.h.
sigc::signal<void> Async::SigCAudioSource::sigResumeOutput |
A signal that is emitted when more samples can be written.
This signal will be emitted when the registered audio sink is ready to accept more samples.
Definition at line 238 of file AsyncSigCAudioSource.h.