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

EncoderFloats - Encodes 16 bit PCM data stream to floats data. More...

#include <CodecFloat.h>

Inheritance diagram for EncoderFloat:
AudioEncoder AudioWriter AudioInfoSupport

Public Member Functions

 EncoderFloat ()=default
 Empty Constructor.
 
 EncoderFloat (Print &out)
 Constructor providing the output 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
 
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 char * mime () 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
 Converts data from int16_t to float.
 

Protected Member Functions

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

Protected Attributes

Vector< float > buffer
 
AudioInfo info
 
volatile bool is_open
 
Printp_print =nullptr
 

Detailed Description

EncoderFloats - Encodes 16 bit PCM data stream to floats data.

Author
Phil Schatzmann

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