arduino-audio-tools
All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Modules Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
EncoderBase64 Class Reference

EncoderBase64s - Encodes the input data into a Base64 string. By default each audio frame is followed by a new line, so that we can easily resynchronize the reading of a data stream. The generation of the new line can be configured with the setNewLine() method. More...

#include <CodecBase64.h>

Inheritance diagram for EncoderBase64:
AudioEncoder AudioWriter AudioInfoSupport

Public Member Functions

 EncoderBase64 (Print &out)
 
AudioInfo audioInfo ()
 provides the actual input AudioInfo
 
virtual AudioInfo audioInfoOut ()
 
virtual 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 "text/base64".
 
 operator bool () override
 
void setAudioInfo (AudioInfo from) override
 Defines the sample rate, number of channels and bits per sample.
 
void setNewLine (Base46Logic flag)
 We add a new line after each write.
 
void setOutput (Print &out_buffeream) 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 encodeLine (const uint8_t *data, size_t input_length)
 
void flush ()
 
void writeBlocking (Print *out, uint8_t *data, size_t len)
 

Protected Attributes

int frame_size
 
AudioInfo info
 
bool is_open
 
Base46Logic newline_logic = CRforFrame
 
Printp_print = nullptr
 
Vector< uint8_t > ret
 

Detailed Description

EncoderBase64s - Encodes the input data into a Base64 string. By default each audio frame is followed by a new line, so that we can easily resynchronize the reading of a data stream. The generation of the new line can be configured with the setNewLine() method.

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 "text/base64".

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_buffeream)
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: