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

Encodes PCM data to the MP3 format and writes the result to a stream This is basically just a wrapper using https://github.com/pschatzmann/arduino-liblame. More...

#include <CodecMP3LAME.h>

Inheritance diagram for audio_tools::MP3EncoderLAME:
audio_tools::AudioEncoder audio_tools::AudioWriter

Public Member Functions

 MP3EncoderLAME (Print &out_stream)
 
AudioInfoLAMEaudioInfo ()
 
void begin ()
 
void begin (AudioInfoLAME info)
 Opens the encoder
More...
 
AudioInfoLAME defaultConfig ()
 
liblame::MP3EncoderLAME * driver ()
 
void end ()
 
const char * mime ()
 
virtual operator bool ()
 
void setAudioInfo (AudioBaseInfo from)
 Defines the Audio Info. More...
 
void setAudioInfo (AudioInfoLAME from)
 Defines the Audio Info.
 
void setOutputStream (Print &out_stream)
 Defines the output stream. More...
 
size_t write (const void *in_ptr, size_t in_size)
 
- 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 Member Functions

void createEnc ()
 

Protected Attributes

liblame::MP3EncoderLAME * enc =nullptr
 
AudioInfoLAME info
 
Printp_print =nullptr
 

Detailed Description

Encodes PCM data to the MP3 format and writes the result to a stream This is basically just a wrapper using https://github.com/pschatzmann/arduino-liblame.

Author
Phil Schatzmann

Member Function Documentation

◆ begin() [1/2]

void audio_tools::MP3EncoderLAME::begin ( )
inlinevirtual

◆ begin() [2/2]

void audio_tools::MP3EncoderLAME::begin ( AudioInfoLAME  info)
inline

Opens the encoder

Parameters
info
Returns
int

◆ end()

void audio_tools::MP3EncoderLAME::end ( )
inlinevirtual

◆ mime()

const char * audio_tools::MP3EncoderLAME::mime ( )
inlinevirtual

◆ operator bool()

virtual audio_tools::MP3EncoderLAME::operator bool ( )
inlinevirtual

◆ setAudioInfo()

void audio_tools::MP3EncoderLAME::setAudioInfo ( AudioBaseInfo  from)
inlinevirtual

Defines the Audio Info.

Implements audio_tools::AudioWriter.

◆ setOutputStream()

void audio_tools::MP3EncoderLAME::setOutputStream ( Print out_stream)
inlinevirtual

Defines the output stream.

Implements audio_tools::AudioWriter.

◆ write()

size_t audio_tools::MP3EncoderLAME::write ( const void *  in_ptr,
size_t  in_size 
)
inlinevirtual

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