Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Codec2Encoder Class Reference

Encoder for Codec2 - Depends on More...

#include <CodecCodec2.h>

Inheritance diagram for Codec2Encoder:
AudioEncoder AudioWriter

Public Member Functions

 Codec2Encoder (int bps=3200)
void begin ()
void begin (AudioInfo bi)
int bitsPerSecond ()
int bytesCompressed ()
int bytesUncompressed ()
virtual void end ()
virtual const char * mime ()
 Provides the mime type of the encoded result.
 operator bool ()
virtual void setAudioInfo (AudioInfo cfg)
 Defines the sample rate, number of channels and bits per sample.
virtual void setBitsPerSecond (int bps)
virtual void setOutput (Print &out_stream)
size_t write (const void *in_ptr, size_t in_size) override

Protected Member Functions

void processByte (uint8_t byte)
void writeBlocking (Print *out, uint8_t *data, size_t len)

Protected Attributes

int bits_per_second = 0
int buffer_pos = 0
AudioInfo info
Vector< uint8_t > input_buffer
bool is_active = false
struct CODEC2 * p_codec2 = nullptr
Printp_print = nullptr
Vector< uint8_t > result_buffer

Detailed Description

Encoder for Codec2 - Depends on

Phil Schatzmann

Member Function Documentation

◆ setBitsPerSecond()

virtual void setBitsPerSecond ( int  bps)

sets bits per second: 3200, 2400, 1600, 1400, 1300, 1200, 700 and 450 bit/s

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