arduino-audio-tools
|
CodecChain - allows to chain multiple decoders and encoders together. More...
#include <CodecChain.h>
Public Member Functions | |
CodecChain (AudioDecoder &decoder) | |
CodecChain (AudioEncoder &encoder) | |
void | addDecoder (AudioDecoder &decoder) |
Adds a decoder to the chain. | |
void | addEncoder (AudioEncoder &encoder) |
Adds an encoder to the chain. | |
virtual void | addNotifyAudioChange (AudioInfoSupport &bi) |
Adds target to be notified about audio changes. | |
AudioInfo | audioInfo () override |
provides the actual input AudioInfo | |
virtual AudioInfo | audioInfoOut () |
bool | begin () |
virtual bool | begin (AudioInfo info) override |
virtual void | clearNotifyAudioChange () |
Deletes all change notify subscriptions. | |
void | end () override |
Print * | getOutput () |
bool | isNotifyActive () |
Checks if the automatic AudioInfo update is active. | |
virtual bool | isResultPCM () |
Returns true to indicate that the decoding result is PCM data. | |
const char * | mime () |
Returns nullptr. | |
operator bool () | |
virtual bool | removeNotifyAudioChange (AudioInfoSupport &bi) |
Removes a target in order not to be notified about audio changes. | |
void | setAudioInfo (AudioInfo from) override |
for most decoders this is not needed | |
virtual bool | setCodecConfig (const uint8_t *data, size_t len) |
Some decoders need e.g. a magic cookie to provide the relevant info for decoding. | |
void | setNotifyActive (bool flag) |
Deactivate/Reactivate automatic AudioInfo updates: (default is active) | |
void | setOutput (AudioOutput &out_stream) override |
Defines where the decoded result is written to. | |
void | setOutput (AudioStream &out_stream) override |
Defines where the decoded result is written to. | |
void | setOutput (Print &out_stream) override |
Defines where the decoded result is written to. | |
size_t | write (const uint8_t *data, size_t len) override |
Public Attributes | |
int | id |
custom id to be used by application | |
Protected Member Functions | |
void | notifyAudioChange (AudioInfo info) |
void | writeBlocking (Print *out, uint8_t *data, size_t len) |
Protected Attributes | |
AudioInfo | info |
bool | is_active = false |
bool | is_notify_active = true |
Vector< AudioInfoSupport * > | notify_vector |
Print * | p_print = nullptr |
Vector< EncodedAudioStream > | streams |
Private Member Functions | |
AudioInfo | audioInfo () override |
provides the actual input AudioInfo | |
void | writeBlocking (Print *out, uint8_t *data, size_t len) |
Private Attributes | |
AudioInfo | info |
CodecChain - allows to chain multiple decoders and encoders together.
|
inlinevirtualinherited |
Adds target to be notified about audio changes.
Reimplemented in CodecNOP, EncodedAudioOutput, EncodedAudioStream, AACDecoderFDK, DecoderBasic, MP3DecoderHelix, MP3DecoderMAD, OggContainerDecoder, Pipeline, and Pipeline::ModifyingStreamAdapter.
|
inlineoverridevirtualinherited |
provides the actual input AudioInfo
Implements AudioInfoSupport.
Reimplemented in CodecNOP, GGWaveDecoder, DecoderBasic, DSFDecoder, MP3DecoderHelix, MP3DecoderMAD, OpusAudioDecoder, WAVDecoder, WavIMADecoder, and OggContainerDecoder.
|
inlinevirtualinherited |
provides the actual output AudioInfo: this is usually the same as audioInfo() unless we use a transforming stream
Reimplemented in PureDataStream, PWMAudioOutput, ChannelFormatConverterStreamT< T >, ChannelFormatConverterStream, NumberFormatConverterStreamT< TFrom, TTo >, NumberFormatConverterStream, FormatConverterStream, Pipeline, ResampleStream, and ResampleStreamT< TInterpolator >.
|
inlinevirtual |
Reimplemented from AudioDecoder.
|
inlineoverridevirtualinherited |
Reimplemented from AudioWriter.
|
inlineoverridevirtual |
Reimplemented from AudioDecoder.
|
inlinevirtualinherited |
Returns true to indicate that the decoding result is PCM data.
Reimplemented in CopyDecoder, DecoderNetworkFormat, GGWaveDecoder, and ContainerM4A.
|
inlinevirtual |
Returns nullptr.
Implements AudioEncoder.
|
inlinevirtual |
Implements AudioWriter.
|
inlineoverridevirtual |
for most decoders this is not needed
Reimplemented from AudioDecoder.
|
inlinevirtualinherited |
Some decoders need e.g. a magic cookie to provide the relevant info for decoding.
Reimplemented in DecoderALAC, and MultiDecoder.
|
inlineoverridevirtual |
Defines where the decoded result is written to.
Reimplemented from AudioDecoder.
|
inlineoverridevirtual |
Defines where the decoded result is written to.
Reimplemented from AudioDecoder.
|
inlineoverridevirtual |
Defines where the decoded result is written to.
Reimplemented from AudioDecoder.
|
inlineoverridevirtual |
Implements AudioWriter.