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

GGWaveEncoder: Translates text into audio Codec using https://github.com/ggerganov/ggwave-arduino. More...

#include <CodecGGWave.h>

Inheritance diagram for GGWaveEncoder:
AudioEncoder AudioWriter AudioInfoSupport

Public Member Functions

 GGWaveEncoder (Print &out_stream)
 
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
 
void begin ()
 
virtual bool begin (AudioInfo info)
 
void end ()
 
virtual const char * mime ()
 Provides the mime type of the encoded result.
 
 operator bool ()
 
void setAudioInfo (AudioInfo from) override
 Defines the sample rate, number of channels and bits per sample.
 
void setOutput (Print &out_stream)
 
void setPayloadLen (int len)
 
void setProtocol (ggwave_ProtocolId protocol)
 
void setSampleByteSize (int size)
 
void setSamplesFormatInput (ggwave_SampleFormat fmt)
 
void setSamplesFromatOutput (ggwave_SampleFormat fmt)
 
void setSamplesPerFrame (int samples)
 
size_t write (const uint8_t *data, size_t len)
 

Protected Member Functions

virtual void play (int freq, int ms)
 
virtual void silence (int samples)
 
void writeBlocking (Print *out, uint8_t *data, size_t len)
 

Protected Attributes

bool active = false
 
GGWave ggwave
 
AudioInfo info
 
int playload_len = 16
 
ggwave_ProtocolId protocolId = GGWAVE_PROTOCOL_AUDIBLE_FAST
 
Printpt_print =nullptr
 
int sample_byte_size = 2
 
ggwave_SampleFormat samples_format_input = GGWAVE_SAMPLE_FORMAT_I16
 
ggwave_SampleFormat samples_format_output = GGWAVE_SAMPLE_FORMAT_U8
 
int samples_per_frame = 256
 
FastSineGenerator< int16_t > sine_wave
 
int volume = GGWave::kDefaultVolume
 

Detailed Description

GGWaveEncoder: Translates text into audio Codec using https://github.com/ggerganov/ggwave-arduino.

Author
Phil Schatzmann

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