|
arduino-audio-tools
|
ALAC (Apple Lossless Audio Codec) encoder. This class is responsible for encoding audio data into ALAC format. The implementaion is based on https://github.com/macosforge/alac. More...
#include <CodecALAC.h>
Public Member Functions | |
| EncoderALAC (int frameSize=kALACDefaultFrameSize) | |
| Default constructor: you can define your own optimized frame size. | |
| AudioInfo | audioInfo () override |
| provides the actual input AudioInfo | |
| virtual AudioInfo | audioInfoOut () |
| bool | begin () override |
| virtual bool | begin (AudioInfo info) |
| ALACBinaryConfig & | binaryConfig () |
| Provide the magic coookie for the decoder. | |
| ALACSpecificConfig | config () |
| Provide the configuration of the encoder. | |
| void | end () override |
| virtual uint32_t | frameDurationUs () |
| Optional rtsp function: provide the frame duration in microseconds. | |
| int | frameSize () |
| Determins the actually defined number of frames. | |
| const char * | mime () override |
| Mime type: returns audio/alac. | |
| operator bool () | |
| Check if the encoder is ready to encode. | |
| virtual uint16_t | samplesPerFrame () |
| Optional rtsp function: provide samples per the frame. | |
| void | setAudioInfo (AudioInfo from) override |
| Defines the sample rate, number of channels and bits per sample. | |
| void | setFastMode (bool fast) |
| Defines if the encoder should use fast mode. | |
| void | setFrameSize (int frames) |
| Defines the frame size for the decoder: default is 4096 frames. | |
| void | setOutput (Print &out_stream) override |
| Default output assignment (encoders may override to store Print reference) | |
| size_t | write (const uint8_t *data, size_t len) override |
| Encode the audio samples into ALAC format. | |
Protected Types | |
| enum | { kFormatFlag_16BitSourceData = 1 , kFormatFlag_20BitSourceData = 2 , kFormatFlag_24BitSourceData = 3 , kFormatFlag_32BitSourceData = 4 } |
Protected Member Functions | |
| AudioFormatDescription | getInputFormat () |
| AudioFormatDescription | getOutputFormat () |
| uint32_t | getOutputFormatFlags (uint32_t bits) |
| void | writeBlocking (Print *out, uint8_t *data, size_t len) |
ALAC (Apple Lossless Audio Codec) encoder. This class is responsible for encoding audio data into ALAC format. The implementaion is based on https://github.com/macosforge/alac.
|
inline |
Default constructor: you can define your own optimized frame size.
|
inlineoverridevirtualinherited |
provides the actual input AudioInfo
Implements AudioInfoSupport.
Reimplemented in CodecNOP, BinaryContainerEncoder, and MP3ParserEncoder.
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 >.
|
inlineoverridevirtual |
Implements AudioWriter.
Reimplemented in OggContainerEncoder, DecoderBasic, AudioDecoder, AACEncoderFDK, OggContainerDecoder, and MetaDataFilterEncoder.
|
inline |
Provide the magic coookie for the decoder.
|
inline |
Provide the configuration of the encoder.
|
inlineoverridevirtual |
Implements AudioWriter.
Optional rtsp function: provide the frame duration in microseconds.
Reimplemented in ADPCMEncoder, OpusOggEncoder, MP3ParserEncoder, and MetaDataFilterEncoder.
|
inline |
Determins the actually defined number of frames.
|
inlineprotected |
|
inlineprotected |
Mime type: returns audio/alac.
Implements AudioEncoder.
Check if the encoder is ready to encode.
Implements AudioWriter.
Optional rtsp function: provide samples per the frame.
Reimplemented in MP3ParserEncoder, and MetaDataFilterEncoder.
Defines the sample rate, number of channels and bits per sample.
Implements AudioWriter.
Reimplemented in MP3EncoderLAME, EncoderBasic, CodecChain, FLACEncoder, OpusAudioEncoder, WAVEncoder, CodecNOP, G7xxEncoder, G729Encoder, BinaryContainerEncoder, OggContainerEncoder, OSCContainerEncoder, and MetaDataFilterEncoder.
Defines the frame size for the decoder: default is 4096 frames.
Default output assignment (encoders may override to store Print reference)
Reimplemented from AudioEncoder.
Encode the audio samples into ALAC format.
Implements AudioWriter.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protectedinherited |
|
protected |
|
protected |