|
arduino-audio-tools
|
Encodes PCM data to the AAC format and writes the result to a stream This is basically just a wrapper using https://github.com/pschatzmann/arduino-fdk-aac. More...
#include <CodecAACFDK.h>
Public Member Functions | |
| AACEncoderFDK () | |
| AACEncoderFDK (Print &out_stream) | |
| ~AACEncoderFDK () | |
| AudioInfo | audioInfo () override |
| provides the actual input AudioInfo | |
| virtual AudioInfo | audioInfoOut () |
| bool | begin () override |
| virtual bool | begin (AudioInfo info) override |
| Opens the encoder | |
| virtual bool | begin (int input_channels=2, int input_sample_rate=44100, int input_bits_per_sample=16) |
| Opens the encoder | |
| aac_fdk::AACEncoderFDK * | driver () |
| void | end () override |
| virtual uint32_t | frameDurationUs () |
| Optional rtsp function: provide the frame duration in microseconds. | |
| UINT | getParameter (const AACENC_PARAM param) |
| const char * | mime () override |
| Provides the mime type of the encoded result. | |
| operator bool () override | |
| virtual uint16_t | samplesPerFrame () |
| Optional rtsp function: provide samples per the frame. | |
| virtual void | setAfterburner (bool afterburner) |
| This parameter controls the use of the afterburner feature. The afterburner is a type of analysis by synthesis algorithm which increases the audio quality but also the required processing power. It is recommended to always activate this if additional memory consumption and processing power consumption is not a problem. If increased MHz and memory consumption are an issue then the MHz and memory cost of this optional module need to be evaluated against the improvement in audio quality on a case by case basis. | |
| void | setAudioInfo (AudioInfo from) override |
| Defines the Audio Info. | |
| virtual void | setAudioObjectType (int aot) |
| Audio object type. See AUDIO_OBJECT_TYPE in FDK_audio.h. | |
| virtual void | setBitrate (int bitrate) |
| Total encoder bitrate. This parameter is mandatory and interacts with AACENC_BITRATEMODE. | |
| void | setOutput (Print &out_stream) override |
| Defines the output. | |
| virtual void | setOutputBufferSize (int outbuf_size) |
| Set the Output Buffer Size object. | |
| int | setParameter (AACENC_PARAM param, uint32_t value) |
| virtual void | setSpectralBandReplication (int eld_sbr) |
| Configure SBR independently of the chosen Audio Object Type AUDIO_OBJECT_TYPE. This parameter is for ELD audio object type only. | |
| virtual void | setVariableBitrateMode (int vbr) |
| Bitrate mode. Configuration can be different kind of bitrate configurations: | |
| size_t | write (const uint8_t *data, size_t len) override |
Protected Member Functions | |
| void | writeBlocking (Print *out, uint8_t *data, size_t len) |
Protected Attributes | |
| aac_fdk::AACEncoderFDK * | enc =nullptr |
| AudioInfo | info |
Encodes PCM data to the AAC format and writes the result to a stream This is basically just a wrapper using https://github.com/pschatzmann/arduino-fdk-aac.
|
inline |
|
inline |
|
inline |
|
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.
|
inlinevirtual |
Opens the encoder
| input_channels | |
| input_sample_rate | |
| input_bits_per_sample |
|
inline |
|
inlineoverridevirtual |
Implements AudioWriter.
Optional rtsp function: provide the frame duration in microseconds.
Reimplemented in ADPCMEncoder, OpusOggEncoder, MP3ParserEncoder, and MetaDataFilterEncoder.
|
inline |
Provides the mime type of the encoded result.
Implements AudioEncoder.
Implements AudioWriter.
Optional rtsp function: provide samples per the frame.
Reimplemented in MP3ParserEncoder, and MetaDataFilterEncoder.
This parameter controls the use of the afterburner feature. The afterburner is a type of analysis by synthesis algorithm which increases the audio quality but also the required processing power. It is recommended to always activate this if additional memory consumption and processing power consumption is not a problem. If increased MHz and memory consumption are an issue then the MHz and memory cost of this optional module need to be evaluated against the improvement in audio quality on a case by case basis.
Defines the Audio Info.
Implements AudioWriter.
Audio object type. See AUDIO_OBJECT_TYPE in FDK_audio.h.
Please note that the virtual MPEG-2 AOT's basically disables non-existing Perceptual Noise Substitution tool in AAC encoder and controls the MPEG_ID flag in adts header. The virtual MPEG-2 AOT doesn't prohibit specific transport formats.
Total encoder bitrate. This parameter is
mandatory and interacts with AACENC_BITRATEMODE.
Defines the output.
Reimplemented from AudioEncoder.
Set the Output Buffer Size object.
| outbuf_size |
|
inline |
Configure SBR independently of the chosen Audio Object Type AUDIO_OBJECT_TYPE. This parameter is for ELD audio object type only.
Bitrate mode. Configuration can be different kind of bitrate configurations:
Implements AudioWriter.
|
protected |
|
protectedinherited |