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>
|
| | 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.
|
| |
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.
- Author
- Phil Schatzmann
◆ anonymous enum
| Enumerator |
|---|
| kFormatFlag_16BitSourceData | |
| kFormatFlag_20BitSourceData | |
| kFormatFlag_24BitSourceData | |
| kFormatFlag_32BitSourceData | |
◆ EncoderALAC()
Default constructor: you can define your own optimized frame size.
◆ audioInfo()
|
|
inlineoverridevirtualinherited |
◆ audioInfoOut()
provides the actual output AudioInfo: this is usually the same as audioInfo() unless we use a transforming stream
Reimplemented in MP3EncoderShine, PureDataStream, PWMAudioOutput< PWMDriverT >, ChannelFormatConverterStreamT< T >, ChannelFormatConverterStream, NumberFormatConverterStreamT< TFrom, TTo >, NumberFormatConverterStream, FormatConverterStream, Pipeline, ResampleStream, and ResampleStreamT< TInterpolator >.
◆ begin() [1/2]
◆ begin() [2/2]
◆ binaryConfig()
Provide the magic coookie for the decoder.
◆ config()
| ALACSpecificConfig config |
( |
| ) |
|
|
inline |
Provide the configuration of the encoder.
◆ end()
◆ frameDurationUs()
| virtual uint32_t frameDurationUs |
( |
| ) |
|
|
inlinevirtualinherited |
◆ frameSize()
Determins the actually defined number of frames.
◆ getInputFormat()
| AudioFormatDescription getInputFormat |
( |
| ) |
|
|
inlineprotected |
◆ getOutputFormat()
| AudioFormatDescription getOutputFormat |
( |
| ) |
|
|
inlineprotected |
◆ getOutputFormatFlags()
| uint32_t getOutputFormatFlags |
( |
uint32_t |
bits | ) |
|
|
inlineprotected |
◆ mime()
◆ operator bool()
Check if the encoder is ready to encode.
Implements AudioWriter.
◆ samplesPerFrame()
| virtual uint16_t samplesPerFrame |
( |
| ) |
|
|
inlinevirtualinherited |
◆ setAudioInfo()
|
|
inlineoverridevirtualinherited |
Defines the sample rate, number of channels and bits per sample.
Implements AudioWriter.
Reimplemented in MP3EncoderLAME, EncoderBasic, CodecChain, DSFEncoder, FLACEncoder, MP3EncoderShine, OpusAudioEncoder, OpusMultiStreamAudioEncoder, WAVEncoder, CodecNOP, G7xxEncoder, G729Encoder, BinaryContainerEncoder, OggContainerEncoder, OSCContainerEncoder, and MetaDataFilterEncoder.
◆ setFastMode()
| void setFastMode |
( |
bool |
fast | ) |
|
|
inline |
Defines if the encoder should use fast mode.
◆ setFrameSize()
| void setFrameSize |
( |
int |
frames | ) |
|
|
inline |
Defines the frame size for the decoder: default is 4096 frames.
◆ setOutput()
| void setOutput |
( |
Print & |
out_stream | ) |
|
|
inlineoverridevirtual |
Default output assignment (encoders may override to store Print reference)
Reimplemented from AudioEncoder.
◆ write()
| size_t write |
( |
const uint8_t * |
data, |
|
|
size_t |
len |
|
) |
| |
|
inlineoverridevirtual |
Encode the audio samples into ALAC format.
Implements AudioWriter.
◆ writeBlocking()
| void writeBlocking |
( |
Print * |
out, |
|
|
uint8_t * |
data, |
|
|
size_t |
len |
|
) |
| |
|
inlineprotectedinherited |
◆ bin
◆ cfg
◆ enc
◆ frame_size
| int frame_size = kALACDefaultFrameSize |
|
protected |
◆ in_buffer
◆ info
◆ input_format
| AudioFormatDescription input_format |
|
protected |
◆ is_started
◆ out_buffer
◆ out_format
| AudioFormatDescription out_format |
|
protected |
◆ p_print
The documentation for this class was generated from the following file: