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

EncoderL16s - Condenses 16 bit PCM data stream to 8 bits data. Most microcontrollers can not process 8 bit audio data directly. 8 bit data however is very memory efficient and helps if you need to store audio on constrained resources. This encoder translates 16bit data into 8bit data. More...

#include <CodecL16.h>

Inheritance diagram for EncoderL16:
AudioEncoder AudioWriter

Public Member Functions

 EncoderL16 (Print &out)
 
virtual void begin () override
 starts the processing using the actual RAWAudioInfo
 
virtual void begin (AudioInfo info)
 
void begin (Print &out)
 starts the processing
 
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_stream) override
 Defines the output Stream.
 
virtual size_t write (const void *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

bool is_open
 
Printp_print = nullptr
 

Detailed Description

EncoderL16s - Condenses 16 bit PCM data stream to 8 bits data. Most microcontrollers can not process 8 bit audio data directly. 8 bit data however is very memory efficient and helps if you need to store audio on constrained resources. This encoder translates 16bit data into 8bit data.

Author
Phil Schatzmann

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