Async
1.4.0
|
Base class for an audio encoder. More...
#include <AsyncAudioEncoder.h>
Public Member Functions | |
AudioEncoder (void) | |
Default constuctor. More... | |
~AudioEncoder (void) | |
Destructor. More... | |
virtual const char * | name (void) const =0 |
Get the name of the codec. More... | |
virtual void | setOption (const std::string &name, const std::string &value) |
Set an option for the encoder. More... | |
virtual void | printCodecParams (void) |
Print codec parameter settings. More... | |
void | allEncodedSamplesFlushed (void) |
Call this function when all encoded samples have been flushed. More... | |
virtual void | flushSamples (void) |
Tell the sink to flush the previously written samples. 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... | |
virtual int | writeSamples (const float *samples, int count) |
Write samples into this audio sink. More... | |
Static Public Member Functions | |
static AudioEncoder * | create (const std::string &name) |
Public Attributes | |
sigc::signal< void, const void *, int > | writeEncodedSamples |
A signal emitted when encoded samples are available. More... | |
sigc::signal< void > | flushEncodedSamples |
This signal is emitted when the source calls flushSamples. 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 |
Base class for an audio encoder.
This is the base class for implementing an audio encoder.
Definition at line 113 of file AsyncAudioEncoder.h.
|
inline |
Default constuctor.
Definition at line 121 of file AsyncAudioEncoder.h.
|
inline |
|
inline |
Call this function when all encoded samples have been flushed.
Definition at line 149 of file AsyncAudioEncoder.h.
References Async::AudioSink::sourceAllSamplesFlushed().
|
static |
|
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::AudioSink.
Definition at line 159 of file AsyncAudioEncoder.h.
References flushEncodedSamples.
|
pure virtual |
|
inlinevirtual |
Print codec parameter settings.
Definition at line 144 of file AsyncAudioEncoder.h.
|
inlinevirtual |
Set an option for the encoder.
name | The name of the option |
value | The value of the option |
Definition at line 139 of file AsyncAudioEncoder.h.
sigc::signal<void> Async::AudioEncoder::flushEncodedSamples |
This signal is emitted when the source calls flushSamples.
Definition at line 171 of file AsyncAudioEncoder.h.
Referenced by flushSamples().
sigc::signal<void,const void *,int> Async::AudioEncoder::writeEncodedSamples |
A signal emitted when encoded samples are available.
buf | Buffer containing encoded samples |
size | The size of the buffer |
Definition at line 166 of file AsyncAudioEncoder.h.