arduino-audio-tools
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
audio_tools::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 audio_tools::G722Encoder:
audio_tools::AudioEncoder audio_tools::AudioWriter

Public Member Functions

void begin ()
 
void begin (AudioBaseInfo bi)
 
virtual void end ()
 
virtual const char * mime ()
 
 operator bool ()
 
virtual void setAudioInfo (AudioBaseInfo cfg)
 
void setOptions (int options)
 Defines the options for the G.722 Codec: G722_SAMPLE_RATE_8000,G722_PACKED.
 
virtual void setOutputStream (Print &out_stream)
 
virtual size_t write (const void *in_ptr, size_t in_size)
 
- Public Member Functions inherited from audio_tools::AudioEncoder
 AudioEncoder (AudioEncoder const &)=delete
 
virtual const char * mime ()=0
 
AudioEncoderoperator= (AudioEncoder const &)=delete
 
virtual void begin ()=0
 
virtual void end ()=0
 
virtual operator bool ()=0
 
virtual void setAudioInfo (AudioBaseInfo from)=0
 
virtual void setOutputStream (Print &out_stream)=0
 
virtual size_t write (const void *in_ptr, size_t in_size)=0
 

Protected Member Functions

void processByte (uint8_t byte)
 

Protected Attributes

int buffer_pos = 0
 
AudioBaseInfo 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

Member Function Documentation

◆ begin()

void audio_tools::G722Encoder::begin ( )
inlinevirtual

◆ end()

virtual void audio_tools::G722Encoder::end ( )
inlinevirtual

◆ mime()

virtual const char * audio_tools::G722Encoder::mime ( )
inlinevirtual

◆ operator bool()

audio_tools::G722Encoder::operator bool ( )
inlinevirtual

◆ setAudioInfo()

virtual void audio_tools::G722Encoder::setAudioInfo ( AudioBaseInfo  cfg)
inlinevirtual

◆ setOutputStream()

virtual void audio_tools::G722Encoder::setOutputStream ( Print out_stream)
inlinevirtual

◆ write()

virtual size_t audio_tools::G722Encoder::write ( const void *  in_ptr,
size_t  in_size 
)
inlinevirtual

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