arduino-audio-tools
|
ALAC (Apple Lossless Audio Codec) decoder. This class depends on https://github.com/pschatzmann/codec-alac. This implementaion is based on https://github.com/macosforge/alac. More...
#include <CodecALAC.h>
Public Member Functions | |
DecoderALAC (int frameSize=kALACDefaultFrameSize) | |
Default constructor: you can define your own optimized frame size. | |
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 () override |
virtual bool | begin (AudioInfo info) override |
virtual void | clearNotifyAudioChange () |
Deletes all change notify subscriptions. | |
void | end () override |
int | frameSize () |
Provides the actual frame size. | |
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. | |
operator bool () | |
virtual bool | removeNotifyAudioChange (AudioInfoSupport &bi) |
Removes a target in order not to be notified about audio changes. | |
void | setAudioInfo (AudioInfo from) override |
Update the global decoder info. | |
bool | setCodecConfig (ALACBinaryConfig cfg) |
write Magic Cookie (ALACSpecificConfig) | |
bool | setCodecConfig (ALACSpecificConfig config) |
bool | setCodecConfig (const uint8_t *data, size_t len) override |
write Magic Cookie (ALACSpecificConfig) | |
void | setFrameSize (int frames) |
void | setNotifyActive (bool flag) |
Deactivate/Reactivate automatic AudioInfo updates: (default is active) | |
virtual void | setOutput (AudioOutput &out_stream) |
Defines where the decoded result is written to. | |
virtual void | setOutput (AudioStream &out_stream) |
Defines where the decoded result is written to. | |
virtual void | setOutput (Print &out_stream) override |
Defines where the decoded result is written to. | |
size_t | write (const uint8_t *encodedFrame, size_t encodedLen) override |
we expect the write is called for a complete frame! | |
Public Attributes | |
int | id |
custom id to be used by application | |
Protected Member Functions | |
void | convertToNetworkFormat (ALACSpecificConfig &config) |
Convert to big endian so that we can use it in Init() | |
void | notifyAudioChange (AudioInfo info) |
int | outputBufferSize () |
Calculate the output buffer size based on the current configuration. | |
void | setDefaultConfig () |
void | writeBlocking (Print *out, uint8_t *data, size_t len) |
Protected Attributes | |
struct BitBuffer | bits |
ALACDecoder | dec |
AudioInfo | info |
bool | is_init = false |
bool | is_notify_active = true |
Vector< AudioInfoSupport * > | notify_vector |
Print * | p_print = nullptr |
Vector< uint8_t > | result_buffer |
ALAC (Apple Lossless Audio Codec) decoder. This class depends on https://github.com/pschatzmann/codec-alac. This implementaion is based on https://github.com/macosforge/alac.
|
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, 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, and ResampleStream.
|
inlineoverridevirtualinherited |
Implements AudioWriter.
Reimplemented in MP3DecoderMini, MP3DecoderHelix, MP3DecoderMAD, MTSDecoder, ContainerM4A, and MultiDecoder.
|
inlineoverridevirtualinherited |
Reimplemented from AudioWriter.
|
inlineoverridevirtualinherited |
Implements AudioWriter.
Reimplemented in MP3DecoderMini, MP3DecoderHelix, MP3DecoderMAD, MTSDecoder, ContainerM4A, and MultiDecoder.
|
inlinevirtualinherited |
Returns true to indicate that the decoding result is PCM data.
Reimplemented in CopyDecoder, DecoderNetworkFormat, GGWaveDecoder, and ContainerM4A.
|
inlinevirtual |
Implements AudioWriter.
|
inlineoverridevirtual |
Update the global decoder info.
Reimplemented from AudioDecoder.
|
inlineoverridevirtual |
write Magic Cookie (ALACSpecificConfig)
Reimplemented from AudioDecoder.
|
inline |
Set the default frame size: this will be overwritten if you call setCodecConfig()
|
inlinevirtualinherited |
Defines where the decoded result is written to.
Reimplemented in ADTSDecoder, MTSDecoder, MTSDecoderTSDemux, and MetaDataFilterDecoder.
|
inlinevirtualinherited |
Defines where the decoded result is written to.
Reimplemented in ADTSDecoder, MTSDecoder, MTSDecoderTSDemux, and MetaDataFilterDecoder.
|
inlineoverridevirtualinherited |
Defines where the decoded result is written to.
Implements AudioWriter.
Reimplemented in DecoderBase64, MP3DecoderMAD, DecoderAdapter, CodecNOP, ADPCMDecoderXQ, APTXDecoder, Codec2Decoder, CopyDecoder, G722Decoder, GSMDecoder, ILBCDecoder, LC3Decoder, DecoderNetworkFormat, SBCDecoder, WavIMADecoder, GGWaveDecoder, AACDecoderFDK, AACDecoderHelix, ADPCMDecoder, ADTSDecoder, DecoderBasic, DecoderFloat, G7xxDecoder, DecoderL16, MTSDecoder, OpusAudioDecoder, MTSDecoderTSDemux, WAVDecoder, AVIDecoder, ContainerM4A, MultiDecoder, MetaDataFilterDecoder, MP3DecoderMini, BinaryContainerDecoder, OSCContainerDecoder, MP3DecoderHelix, and OggContainerDecoder.
|
inlineoverridevirtual |
we expect the write is called for a complete frame!
Implements AudioWriter.