arduino-audio-tools
All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Modules Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ADPCMEncoder Class Reference

Encoder for ADPCM - Depends on https://github.com/pschatzmann/adpcm> More...

#include <CodecADPCM.h>

Inheritance diagram for ADPCMEncoder:
AudioEncoderExt AudioEncoder AudioWriter AudioInfoSupport

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
 
Printp_print = nullptr
 
Vector< int16_t > pcm_block
 
int total_samples = 0
 

Detailed Description

Encoder for ADPCM - Depends on https://github.com/pschatzmann/adpcm

>

Author
Phil Schatzmann

Member Function Documentation

◆ audioInfo()

AudioInfo audioInfo ( )
inlinevirtualinherited

provides the actual input AudioInfo

Implements AudioInfoSupport.

Reimplemented in CodecNOP, and BinaryContainerEncoder.

◆ audioInfoOut()

virtual AudioInfo audioInfoOut ( )
inlinevirtualinherited

◆ begin() [1/2]

bool begin ( )
inlineoverridevirtual

Implements AudioWriter.

◆ begin() [2/2]

virtual bool begin ( AudioInfo  info)
inlinevirtualinherited

Reimplemented in AACEncoderFDK.

◆ blockSize()

int blockSize ( )
inlineoverridevirtual

Provides the block size (size of encoded frame) (only available after calling begin)

Implements AudioEncoderExt.

◆ end()

void end ( )
inlineoverridevirtual

Implements AudioWriter.

◆ frameSize()

int frameSize ( )
inline

Provides the frame size (size of decoded frame) (only available after calling begin)

◆ mime()

const char * mime ( )
inlineoverridevirtual

Provides the mime type of the encoded result.

Implements AudioEncoder.

◆ operator bool()

operator bool ( )
inlineoverridevirtual

Implements AudioWriter.

◆ setAudioInfo()

void setAudioInfo ( AudioInfo  from)
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.

◆ setOutput()

void setOutput ( Print out_stream)
inlineoverridevirtual

Implements AudioWriter.

◆ write()

size_t write ( const uint8_t *  data,
size_t  len 
)
inlineoverridevirtual

Implements AudioWriter.


The documentation for this class was generated from the following file: