arduino-audio-tools
Loading...
Searching...
No Matches
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 AudioInfoSupport

Public Member Functions

 EncoderL16 (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
 
virtual bool begin () override
 starts the processing using the actual RAWAudioInfo
 
virtual bool begin (AudioInfo info)
 
bool begin (Print &out)
 starts the processing
 
void end () override
 stops the processing
 
bool isOpen ()
 
const charmime () override
 Provides "audio/pcm".
 
 operator bool () override
 
void setAudioInfo (AudioInfo from) override
 Defines the sample rate, number of channels and bits per sample.
 
void setOutput (Print &out_stream) override
 Defines the output Stream.
 
virtual size_t write (const uint8_t *data, size_t len) override
 Writes PCM data to be encoded as RAW.
 

Protected Member Functions

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

Protected Attributes

AudioInfo info
 
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

Member Function Documentation

◆ audioInfo()

AudioInfo audioInfo ( )
inlinevirtualinherited

provides the actual input AudioInfo

Implements AudioInfoSupport.

Reimplemented in CodecNOP, and BinaryContainerEncoder.

◆ audioInfoOut()

virtual AudioInfo audioInfoOut ( )
inlinevirtualinherited

◆ begin() [1/2]

virtual bool begin ( )
inlineoverridevirtual

starts the processing using the actual RAWAudioInfo

Implements AudioWriter.

◆ begin() [2/2]

virtual bool begin ( AudioInfo  info)
inlinevirtualinherited

Reimplemented in AACEncoderFDK.

◆ end()

void end ( )
inlineoverridevirtual

stops the processing

Implements AudioWriter.

◆ mime()

const char * mime ( )
inlineoverridevirtual

Provides "audio/pcm".

Implements AudioEncoder.

◆ operator bool()

operator bool ( )
inlineoverridevirtual

Implements AudioWriter.

◆ setAudioInfo()

void setAudioInfo ( AudioInfo  from)
inlineoverridevirtualinherited

Defines the sample rate, number of channels and bits per sample.

Implements AudioWriter.

Reimplemented in MP3EncoderLAME, EncoderBasic, FLACEncoder, OpusAudioEncoder, WAVEncoder, CodecNOP, G7xxEncoder, BinaryContainerEncoder, and OggContainerEncoder.

◆ setOutput()

void setOutput ( Print out_stream)
inlineoverridevirtual

Defines the output Stream.

Implements AudioWriter.

◆ write()

virtual size_t write ( const uint8_t data,
size_t  len 
)
inlineoverridevirtual

Writes PCM data to be encoded as RAW.

Implements AudioWriter.


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