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

Encoder8Bits - Condenses 16 bit PCM data stream to 8 bits data. More...

#include <Codec8Bit.h>

Inheritance diagram for audio_tools::Encoder8Bit:
audio_tools::AudioEncoder audio_tools::AudioWriter

Public Member Functions

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

Vector< int8_t > buffer
 
volatile bool is_open
 
Printp_print =nullptr
 

Detailed Description

Encoder8Bits - Condenses 16 bit PCM data stream to 8 bits data.

Author
Phil Schatzmann

Member Function Documentation

◆ begin()

virtual void audio_tools::Encoder8Bit::begin ( )
inlineoverridevirtual

starts the processing using the actual RAWAudioInfo

Implements audio_tools::AudioWriter.

◆ end()

void audio_tools::Encoder8Bit::end ( )
inlineoverridevirtual

stops the processing

Implements audio_tools::AudioWriter.

◆ mime()

const char * audio_tools::Encoder8Bit::mime ( )
inlineoverridevirtual

Provides "audio/pcm".

Implements audio_tools::AudioEncoder.

◆ operator bool()

audio_tools::Encoder8Bit::operator bool ( )
inlineoverridevirtual

◆ setAudioInfo()

virtual void audio_tools::Encoder8Bit::setAudioInfo ( AudioBaseInfo  from)
inlineoverridevirtual

We actually do nothing with this.

Implements audio_tools::AudioWriter.

◆ setOutputStream()

void audio_tools::Encoder8Bit::setOutputStream ( Print out_stream)
inlineoverridevirtual

Defines the output Stream.

Implements audio_tools::AudioWriter.

◆ write()

virtual size_t audio_tools::Encoder8Bit::write ( const void *  in_ptr,
size_t  in_size 
)
inlineoverridevirtual

Writes PCM data to be encoded as RAW.

Implements audio_tools::AudioWriter.


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