arduino-audio-tools
|
Encoder for ADPCM - Depends on https://github.com/pschatzmann/adpcm> More...
#include <CodecADPCM.h>
Public Member Functions | |
ADPCMEncoder (AVCodecID id, int blockSize=ADAPCM_DEFAULT_BLOCK_SIZE) | |
AudioInfo | audioInfo () |
provides the actual input AudioInfo | |
virtual AudioInfo | audioInfoOut () |
bool | begin () override |
virtual bool | begin (AudioInfo info) |
int | blockSize () override |
void | end () override |
int | frameSize () |
const char * | mime () override |
Provides the mime type of the encoded result. | |
operator bool () override | |
void | setAudioInfo (AudioInfo from) override |
Defines the sample rate, number of channels and bits per sample. | |
void | setOutput (Print &out_stream) override |
size_t | write (const uint8_t *data, size_t len) override |
Protected Member Functions | |
virtual bool | encode (int16_t sample) |
void | writeBlocking (Print *out, uint8_t *data, size_t len) |
Protected Attributes | |
int | current_sample = 0 |
AudioInfo | info |
bool | is_started = false |
adpcm_ffmpeg::ADPCMEncoder * | p_encoder = nullptr |
Print * | p_print = nullptr |
Vector< int16_t > | pcm_block |
int | total_samples = 0 |
|
inlinevirtualinherited |
provides the actual input AudioInfo
Implements AudioInfoSupport.
Reimplemented in CodecNOP, and BinaryContainerEncoder.
|
inlinevirtualinherited |
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.
|
inlineoverridevirtual |
Implements AudioWriter.
|
inlinevirtualinherited |
Reimplemented in AACEncoderFDK.
|
inlineoverridevirtual |
Provides the block size (size of encoded frame) (only available after calling begin)
Implements AudioEncoderExt.
|
inlineoverridevirtual |
Implements AudioWriter.
|
inline |
Provides the frame size (size of decoded frame) (only available after calling begin)
|
inlineoverridevirtual |
Provides the mime type of the encoded result.
Implements AudioEncoder.
|
inlineoverridevirtual |
Implements AudioWriter.
|
inlineoverridevirtualinherited |
Defines the sample rate, number of channels and bits per sample.
Implements AudioWriter.
Reimplemented in MP3EncoderLAME, EncoderBasic, FLACEncoder, OpusAudioEncoder, WAVEncoder, CodecNOP, G7xxEncoder, BinaryContainerEncoder, and OggContainerEncoder.
|
inlineoverridevirtual |
Implements AudioWriter.
|
inlineoverridevirtual |
Implements AudioWriter.