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

EncoderBasic - supports mime type audio/basic. The content of the "audio/basic" subtype is single channel audio encoded using 8bit ISDN mu-law [PCM] at a sample rate of 8000 Hz. Requires https://github.com/pschatzmann/arduino-libg7xx. More...

#include <CodecBasic.h>

Inheritance diagram for EncoderBasic:
AudioEncoder AudioWriter AudioInfoSupport

Public Member Functions

 EncoderBasic (Print &out)
 
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
 
bool begin () override
 starts the processing using the actual RAWAudioInfo
 
virtual bool begin (AudioInfo info)
 
void end () override
 stops the processing
 
bool isOpen ()
 
const char * mime () override
 Provides "audio/pcm".
 
 operator bool () override
 
virtual void setAudioInfo (AudioInfo from) override
 We actually do nothing with this.
 
void setOutput (Print &out) override
 Defines the output Stream.
 
virtual size_t write (const uint8_t *in_ptr, size_t in_size) override
 Writes PCM data to be encoded as RAW.
 

Protected Member Functions

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

Protected Attributes

G711_ULAWEncoder encoder
 
AudioInfo info
 

Detailed Description

EncoderBasic - supports mime type audio/basic. The content of the "audio/basic" subtype is single channel audio encoded using 8bit ISDN mu-law [PCM] at a sample rate of 8000 Hz. Requires https://github.com/pschatzmann/arduino-libg7xx.

Author
Phil Schatzmann

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