arduino-audio-tools
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
audio_tools::Codec2Encoder Class Reference

Encoder for Codec2 - Depends on https://github.com/pschatzmann/arduino-libcodec2. More...

#include <CodecCodec2.h>

Inheritance diagram for audio_tools::Codec2Encoder:
audio_tools::AudioEncoder audio_tools::AudioWriter

Public Member Functions

void begin ()
 
void begin (AudioBaseInfo bi)
 
int bitsPerSecond ()
 
virtual void end ()
 
virtual const char * mime ()
 
 operator bool ()
 
virtual void setAudioInfo (AudioBaseInfo cfg)
 
virtual void setBitsPerSecond (int bps)
 sets bits per second: 3200, 2400, 1600, 1400, 1300, 1200, 700 and 450 bit/s
 
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 bits_per_second =2400
 
int buffer_pos = 0
 
AudioBaseInfo cfg
 
Vector< uint8_t > input_buffer
 
bool is_active = false
 
struct CODEC2 * p_codec2
 
Printp_print = nullptr
 
Vector< uint8_t > result_buffer
 

Detailed Description

Encoder for Codec2 - Depends on https://github.com/pschatzmann/arduino-libcodec2.

Author
Phil Schatzmann

Member Function Documentation

◆ begin()

void audio_tools::Codec2Encoder::begin ( )
inlinevirtual

◆ end()

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

◆ mime()

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

◆ operator bool()

audio_tools::Codec2Encoder::operator bool ( )
inlinevirtual

◆ setAudioInfo()

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

◆ setOutputStream()

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

◆ write()

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

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