Async 1.8.0
|
An adapter class to connect to an AudioSink class using SigC. More...
#include <AsyncSigCAudioSource.h>
Public Member Functions | |
SigCAudioSource (void) | |
Default constuctor. | |
~SigCAudioSource (void) | |
Destructor. | |
virtual void | resumeOutput (void) |
Resume audio output to the sink. | |
virtual void | allSamplesFlushed (void) |
The registered sink has flushed all samples. | |
int | writeSamples (float *samples, int count) |
Write samples into this audio sink. | |
void | flushSamples (void) |
Tell the sink to flush the previously written samples. | |
![]() | |
AudioSource (void) | |
Default constuctor. | |
virtual | ~AudioSource (void) |
Destructor. | |
bool | registerSink (AudioSink *sink, bool managed=false) |
Register an audio sink to provide samples to. | |
void | unregisterSink (void) |
Unregister the previously registered audio sink. | |
bool | isRegistered (void) const |
Check if an audio sink has been registered. | |
AudioSink * | sink (void) const |
Get the registered audio sink. | |
bool | sinkManaged (void) const |
Check if the sink is managed or not. | |
void | handleAllSamplesFlushed (void) |
The registered sink has flushed all samples. | |
Public Attributes | |
sigc::signal< void > | sigResumeOutput |
A signal that is emitted when more samples can be written. | |
sigc::signal< void > | sigAllSamplesFlushed |
Signal that is emitted when the connected sink is done flushing. | |
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. | |
AudioSource * | handler (void) const |
void | clearHandler (void) |
Clear a handler that was previously setup with setHandler. | |
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 114 of file AsyncSigCAudioSource.h.
|
inline |
Default constuctor.
Definition at line 120 of file AsyncSigCAudioSource.h.
|
inline |
Destructor.
Definition at line 125 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 144 of file AsyncSigCAudioSource.h.
References sigAllSamplesFlushed.
|
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 171 of file AsyncSigCAudioSource.h.
References Async::AudioSource::sinkFlushSamples().
|
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 133 of file AsyncSigCAudioSource.h.
References sigResumeOutput.
|
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 159 of file AsyncSigCAudioSource.h.
References Async::AudioSource::sinkWriteSamples().
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 190 of file AsyncSigCAudioSource.h.
Referenced by allSamplesFlushed().
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 182 of file AsyncSigCAudioSource.h.
Referenced by resumeOutput().