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 (Print &out_stream) | |
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) |
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 () |
UINT | getParameter (const AACENC_PARAM param) |
const char * | mime () |
Provides the mime type of the encoded result. | |
operator bool () | |
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) |
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) |
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.
|
inlinevirtualinherited |
provides the actual input AudioInfo
Implements AudioInfoSupport.
Reimplemented in CodecNOP, and BinaryContainerEncoder.
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 |
Implements AudioWriter.
|
inlinevirtual |
Opens the encoder
input_channels | |
input_sample_rate | |
input_bits_per_sample |
|
inlinevirtual |
Implements AudioWriter.
Provides the mime type of the encoded result.
Implements AudioEncoder.
Implements AudioWriter.
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.
Implements AudioWriter.
Set the Output Buffer Size object.
outbuf_size |
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.