arduino-audio-tools
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
G722Encoder Class Reference

Encoder for G.722 - Depends on https://github.com/pschatzmann/arduino-libg722. Inspired by g722enc.c. More...

#include <CodecG722.h>

Inheritance diagram for G722Encoder:
AudioEncoder AudioWriter

Public Member Functions

void begin ()
 
void begin (AudioInfo bi)
 
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.
 
void setOptions (int options)
 Defines the options for the G.722 Codec: G722_SAMPLE_RATE_8000,G722_PACKED.
 
virtual void setOutput (Print &out_stream)
 
virtual size_t write (const void *in_ptr, size_t in_size)
 

Protected Member Functions

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

Protected Attributes

int buffer_pos = 0
 
AudioInfo cfg
 
G722_ENC_CTX * g722_ectx = nullptr
 
Vector< uint8_t > input_buffer
 
bool is_active = false
 
int options = G722_SAMPLE_RATE_8000
 
Printp_print = nullptr
 
Vector< uint8_t > result_buffer
 

Detailed Description

Encoder for G.722 - Depends on https://github.com/pschatzmann/arduino-libg722. Inspired by g722enc.c.

Author
Phil Schatzmann

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