|
arduino-audio-tools
|
Foxen FLAC Decoder using https://github.com/astoeckel/libfoxenflac Unlike FLACDecoder which is a streaming decoder, this is a simple AudioDecoder implementation. More...
#include <CodecFLACFoxen.h>
Public Member Functions | |
| FLACDecoderFoxen ()=default | |
| FLACDecoderFoxen (int maxBlockSize, int maxChannels, bool convertTo16Bits=true, bool releaseOnEnd=false) | |
| Default Constructor. | |
| ~FLACDecoderFoxen () | |
| Destructor - calls end();. | |
| virtual void | addNotifyAudioChange (AudioInfoSupport &bi) |
| Adds target to be notified about audio changes. | |
| virtual void | addNotifyAudioChange (AudioInfoSupport &bi) |
| Adds target to be notified about audio changes. | |
| AudioInfo | audioInfo () override |
| provides the actual input AudioInfo | |
| AudioInfo | audioInfo () override |
| provides the actual input AudioInfo | |
| virtual AudioInfo | audioInfoOut () |
| virtual AudioInfo | audioInfoOut () |
| virtual bool | begin (AudioInfo info) override |
| bool | begin () |
| virtual void | clearNotifyAudioChange () |
| Deletes all change notify subscriptions. | |
| virtual void | clearNotifyAudioChange () |
| Deletes all change notify subscriptions. | |
| void | end () |
| void | flush () |
| Print * | getOutput () |
| Print * | getOutput () |
| bool | isNotifyActive () |
| Checks if the automatic AudioInfo update is active. | |
| bool | isNotifyActive () |
| Checks if the automatic AudioInfo update is active. | |
| virtual bool | isResultPCM () |
| Returns true to indicate that the decoding result is PCM data. | |
| virtual bool | isResultPCM () |
| Returns true to indicate that the decoding result is PCM data. | |
| const char * | mime () override |
| Provides the mime type of the data that is expected by this decoder. | |
| operator bool () override | |
| virtual bool | removeNotifyAudioChange (AudioInfoSupport &bi) |
| Removes a target in order not to be notified about audio changes. | |
| 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. | |
| void | setAudioInfo (AudioInfo from) override |
| for most decoders this is not needed | |
| 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. | |
| 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 | 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 | setNotifyActive (bool flag) |
| Deactivate/Reactivate automatic AudioInfo updates: (default is active). | |
| void | setOutBufferSize (int size) |
| virtual void | setOutput (AudioOutput &out_stream) |
| Defines where the decoded result is written to. | |
| 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 (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. | |
| 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 | 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) |
| void | writeBlocking (Print *out, uint8_t *data, size_t len) |
Protected Attributes | |
| int | bits_eff = 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_release_memory_on_end = false |
| 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 |
| SingleBuffer< uint8_t > | write_buffer {0} |
Foxen FLAC Decoder using https://github.com/astoeckel/libfoxenflac Unlike FLACDecoder which is a streaming decoder, this is a simple AudioDecoder implementation.
|
default |
|
inline |
Default Constructor.
|
inline |
Destructor - calls end();.
|
inlinevirtualinherited |
Adds target to be notified about audio changes.
Reimplemented in CodecNOP, CodecNOP, EncodedAudioOutput, and EncodedAudioStream.
|
inlinevirtualinherited |
Adds target to be notified about audio changes.
Reimplemented in CodecNOP, CodecNOP, EncodedAudioOutput, and EncodedAudioStream.
|
inlineoverridevirtualinherited |
provides the actual input AudioInfo
Implements AudioInfoSupport.
Reimplemented in CodecNOP, CodecNOP, CodecNOP, DecoderBasic, DSFDecoder, MP3DecoderHelix, MP3DecoderMAD, OggContainerDecoder, OpusAudioDecoder, OpusMultiStreamAudioDecoder, VorbisDecoder, VorbisDecoder, WAVDecoder, and WavIMADecoder.
|
inlineoverridevirtualinherited |
provides the actual input AudioInfo
Implements AudioInfoSupport.
Reimplemented in CodecNOP, CodecNOP, CodecNOP, DecoderBasic, DSFDecoder, MP3DecoderHelix, MP3DecoderMAD, OggContainerDecoder, OpusAudioDecoder, OpusMultiStreamAudioDecoder, VorbisDecoder, VorbisDecoder, WAVDecoder, and WavIMADecoder.
|
inlinevirtualinherited |
provides the actual output AudioInfo: this is usually the same as audioInfo() unless we use a transforming stream
Reimplemented in ChannelFormatConverterStream, ChannelFormatConverterStreamT< T >, FormatConverterStream, MP3EncoderShine, NumberFormatConverterStream, NumberFormatConverterStreamT< TFrom, TTo >, Pipeline, PureDataStream, PWMAudioOutput< PWMDriverT >, ResampleStream, ResampleStreamT< TInterpolator >, and SupportedRatesStream.
|
inlinevirtualinherited |
provides the actual output AudioInfo: this is usually the same as audioInfo() unless we use a transforming stream
Reimplemented in ChannelFormatConverterStream, ChannelFormatConverterStreamT< T >, FormatConverterStream, MP3EncoderShine, NumberFormatConverterStream, NumberFormatConverterStreamT< TFrom, TTo >, Pipeline, PureDataStream, PWMAudioOutput< PWMDriverT >, ResampleStream, ResampleStreamT< TInterpolator >, and SupportedRatesStream.
Reimplemented from AudioWriter.
|
inlinevirtual |
Reimplemented from AudioDecoder.
|
inlinevirtualinherited |
Deletes all change notify subscriptions.
Reimplemented in RTSPClient< TcpClient, UdpSocket >, RTSPClient< EthernetClient, EthernetUDP >, and RTSPClient< WiFiClient, WiFiUDP >.
|
inlinevirtualinherited |
Deletes all change notify subscriptions.
Reimplemented in RTSPClient< TcpClient, UdpSocket >, RTSPClient< EthernetClient, EthernetUDP >, and RTSPClient< WiFiClient, WiFiUDP >.
|
inlineprotected |
|
inlinevirtual |
Reimplemented from AudioDecoder.
|
inline |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Checks if the automatic AudioInfo update is active.
|
inlineinherited |
Checks if the automatic AudioInfo update is active.
|
inlinevirtualinherited |
Returns true to indicate that the decoding result is PCM data.
Reimplemented in ContainerM4A, CopyDecoder, and DecoderNetworkFormat.
|
inlinevirtualinherited |
Returns true to indicate that the decoding result is PCM data.
Reimplemented in ContainerM4A, CopyDecoder, and DecoderNetworkFormat.
|
inlineoverridevirtual |
Provides the mime type of the data that is expected by this decoder.
Implements AudioDecoder.
|
inlineprotectedinherited |
|
inlineprotectedinherited |
|
inlineoverridevirtual |
Implements AudioWriter.
|
inlineprotected |
|
inlinevirtualinherited |
Removes a target in order not to be notified about audio changes.
|
inlinevirtualinherited |
Removes a target in order not to be notified about audio changes.
|
inline |
Select between 16 and 32 bit output: the default is 16 bits.
|
inlineoverridevirtualinherited |
for most decoders this is not needed
Implements AudioWriter.
|
inlineoverridevirtualinherited |
for most decoders this is not needed
Implements AudioWriter.
|
inlinevirtualinherited |
Some decoders need e.g. a magic cookie to provide the relevant info for decoding.
Reimplemented in DecoderALAC, and MultiDecoder.
|
inlinevirtualinherited |
Some decoders need e.g. a magic cookie to provide the relevant info for decoding.
Reimplemented in DecoderALAC, and MultiDecoder.
|
inline |
Defines the input buffer size (default is 2k).
|
inline |
Defines the maximum FLAC blocksize: drives the buffer allocation.
|
inline |
Defines the maximum number of channels: drives the buffer allocation.
|
inlineinherited |
Deactivate/Reactivate automatic AudioInfo updates: (default is active).
|
inlineinherited |
Deactivate/Reactivate automatic AudioInfo updates: (default is active).
|
inline |
Defines the number of 32 bit samples for providing the result (default is 4k)
|
inlinevirtualinherited |
Defines where the decoded result is written to.
|
inlinevirtualinherited |
Defines where the decoded result is written to.
|
inlinevirtualinherited |
Defines where the decoded result is written to.
|
inlinevirtualinherited |
Defines where the decoded result is written to.
|
inlineoverridevirtualinherited |
Defines where the decoded result is written to.
Implements AudioWriter.
Reimplemented in AACDecoderFDK, AACDecoderHelix, ADPCMDecoder, ADPCMDecoderXQ, ADTSDecoder, APTXDecoder, CodecNOP, CodecNOP, BinaryContainerDecoder, Codec2Decoder, CodecChain, CodecNOP, ContainerM4A, CopyDecoder, DecoderAdapter, DecoderBase64, DecoderBasic, DecoderFloat, DecoderL16, DecoderNetworkFormat, DemuxerAVI, DemuxerMP4, DemuxerMPG, DemuxerMTS, G722Decoder, G729Decoder, G7xxDecoder, GSMDecoder, ILBCDecoder, LC3Decoder, MetaDataFilterDecoder, MP2Decoder, MP3DecoderHelix, MP3DecoderMAD, MP3DecoderMini, MTSDecoder, MTSDecoderTSDemux, MultiDecoder, MultiVideoDemuxer, OggContainerDecoder, OpusAudioDecoder, OpusMultiStreamAudioDecoder, OSCContainerDecoder, SBCDecoder, WAVDecoder, and WavIMADecoder.
|
inlineoverridevirtualinherited |
Defines where the decoded result is written to.
Implements AudioWriter.
Reimplemented in AACDecoderFDK, AACDecoderHelix, ADPCMDecoder, ADPCMDecoderXQ, ADTSDecoder, APTXDecoder, CodecNOP, CodecNOP, BinaryContainerDecoder, Codec2Decoder, CodecChain, CodecNOP, ContainerM4A, CopyDecoder, DecoderAdapter, DecoderBase64, DecoderBasic, DecoderFloat, DecoderL16, DecoderNetworkFormat, DemuxerAVI, DemuxerMP4, DemuxerMPG, DemuxerMTS, G722Decoder, G729Decoder, G7xxDecoder, GSMDecoder, ILBCDecoder, LC3Decoder, MetaDataFilterDecoder, MP2Decoder, MP3DecoderHelix, MP3DecoderMAD, MP3DecoderMini, MTSDecoder, MTSDecoderTSDemux, MultiDecoder, MultiVideoDemuxer, OggContainerDecoder, OpusAudioDecoder, OpusMultiStreamAudioDecoder, OSCContainerDecoder, SBCDecoder, WAVDecoder, and WavIMADecoder.
|
inlineoverridevirtual |
Implements AudioWriter.
|
inlineprotected |
|
inlineprotected |
|
inlineprotectedinherited |
|
inlineprotectedinherited |
|
protected |
|
protected |
|
protected |
|
inherited |
custom id to be used by application
|
protected |
|
protectedinherited |
|
protected |
|
protected |
|
protectedinherited |
|
protected |
|
protected |
|
protected |
|
protected |
|
protectedinherited |
|
protected |
|
protected |
|
protectedinherited |
|
protected |