arduino-audio-tools
|
Foxen FLAC Decoder. More...
#include <CodecFLACFoxen.h>
Public Member Functions | |
FLACDecoderFoxen (int maxBlockSize, int maxChannels, bool convertTo16Bits=true) | |
Default Constructor. | |
~FLACDecoderFoxen () | |
Destructor - calls end();. | |
virtual void | addNotifyAudioChange (AudioInfoSupport &bi) |
Adds target to be notified about audio changes. | |
virtual AudioInfo | audioInfo () |
provides the actual input AudioInfo | |
virtual AudioInfo | audioInfoOut () |
provides the actual output AudioInfo: this is usually the same as audioInfo() unless we use a transforming stream | |
bool | begin () |
virtual bool | begin (AudioInfo info) override |
virtual void | clearNotifyAudioChange () |
Deletes all change notify subscriptions. | |
void | end () |
void | flush () |
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 () override | |
virtual bool | removeNotifyAudioChange (AudioInfoSupport &bi) |
Removes a target in order not to be notified about audio changes. | |
void | set32Bit (bool flag) |
Select between 16 and 32 bit output: the default is 16 bits. | |
virtual void | setAudioInfo (AudioInfo from) override |
for most decoders this is not needed | |
void | setInBufferSize (int size) |
Defines the input buffer size (default is 2k) | |
void | setMaxBlockSize (int size) |
Defines the maximum FLAC blocksize: drives the buffer allocation. | |
void | setMaxChannels (int ch) |
Defines the maximum number of channels: drives the buffer allocation. | |
void | setNotifyActive (bool flag) |
Deactivate/Reactivate automatic AudioInfo updates: (default is active) | |
void | setOutBufferSize (int size) |
Defines the number of 32 bit samples for providing the result (default is 4k) | |
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 *data, size_t len) override |
Public Attributes | |
int | id |
custom id to be used by application | |
Protected Member Functions | |
bool | decode () |
void | notifyAudioChange (AudioInfo info) |
void | processMetadata () |
void | write16BitData (int out_len) |
void | write32BitData (int out_len) |
void | writeBlocking (Print *out, uint8_t *data, size_t len) |
Protected Attributes | |
int | bits_eff = 0 |
SingleBuffer< uint8_t > | buffer {0} |
fx_flac_t * | flac = nullptr |
Vector< uint8_t > | foxen_data {0} |
int | in_buffer_size = 1024 * 2 |
AudioInfo | info |
bool | is_active = false |
bool | is_convert_to_16 = true |
bool | is_notify_active = true |
bool | is_stop_on_error = true |
int | max_block_size = 5 * 1024 |
int | max_channels = 2 |
Vector< AudioInfoSupport * > | notify_vector |
Vector< int32_t > | out |
int | out_buffer_size = 1024 * 4 |
Print * | p_print = nullptr |
Foxen FLAC Decoder.
|
inlinevirtualinherited |
Adds target to be notified about audio changes.
Reimplemented in CodecNOP, MP3DecoderMAD, EncodedAudioOutput, EncodedAudioStream, AACDecoderFDK, DecoderBasic, MP3DecoderHelix, OggContainerDecoder, Pipeline, and Pipeline::ModifyingStreamAdapter.
provides the actual input AudioInfo
Implements AudioInfoSupport.
Reimplemented in CodecNOP, GGWaveDecoder, AACDecoderFDK, AACDecoderHelix, DecoderBasic, DecoderHelix, MP3DecoderHelix, MP3DecoderMAD, OpusAudioDecoder, WAVDecoder, WavIMADecoder, and OggContainerDecoder.
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.
|
inlinevirtual |
Reimplemented from AudioDecoder.
Reimplemented from AudioWriter.
|
inlinevirtual |
Reimplemented from AudioDecoder.
Returns true to indicate that the decoding result is PCM data.
Reimplemented in CopyDecoder, and GGWaveDecoder.
Implements AudioWriter.
for most decoders this is not needed
Implements AudioWriter.
Reimplemented in GGWaveDecoder, DecoderL8, OpusAudioDecoder, CodecNOP, AACDecoderHelix, and G7xxDecoder.
|
inlinevirtualinherited |
Defines where the decoded result is written to.
Reimplemented in MetaDataFilterDecoder.
|
inlinevirtualinherited |
Defines where the decoded result is written to.
Reimplemented in MetaDataFilterDecoder.
Defines where the decoded result is written to.
Implements AudioWriter.
Reimplemented in MP3DecoderMAD, DecoderBase64, DecoderAdapter, CodecNOP, AACDecoderFDK, AACDecoderHelix, ADPCMDecoderXQ, APTXDecoder, Codec2Decoder, CopyDecoder, G722Decoder, GSMDecoder, ILBCDecoder, LC3Decoder, SBCDecoder, WavIMADecoder, GGWaveDecoder, ADPCMDecoder, DecoderBasic, DecoderFloat, G7xxDecoder, DecoderL16, OpusAudioDecoder, WAVDecoder, AVIDecoder, MetaDataFilterDecoder, DecoderHelix, MP3DecoderMini, BinaryContainerDecoder, MP3DecoderHelix, and OggContainerDecoder.
Implements AudioWriter.