arduino-audio-tools
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 ()
 provides the actual output AudioInfo: this is usually the same as audioInfo() unless we use a transforming stream
 
bool begin () override
 
virtual bool begin (AudioInfo info)
 
int blockSize () override
 Provides the block size (size of encoded frame) (only available after calling begin)
 
void end () override
 
int frameSize ()
 Provides the frame size (size of decoded frame) (only available after calling begin)
 
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
 
adpcm_ffmpeg::ADPCMEncoder encoder
 
AudioInfo info
 
bool is_started = false
 
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

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