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

MP3 Decoder using https://github.com/pschatzmann/arduino-libmad. More...

#include <CodecMP3MAD.h>

Inheritance diagram for audio_tools::MP3DecoderMAD:
audio_tools::AudioDecoder audio_tools::AudioWriter audio_tools::AudioBaseInfoSource

Public Member Functions

 MP3DecoderMAD (libmad::MP3DataCallback dataCallback, libmad::MP3InfoCallback infoCB=nullptr)
 
 MP3DecoderMAD (Print &mad_output_streamput, libmad::MP3InfoCallback infoCB=nullptr)
 
AudioBaseInfo audioInfo ()
 
libmad::MadAudioInfo audioInfoEx ()
 Provides the last valid audio information.
 
void begin ()
 Starts the processing. More...
 
libmad::MP3DecoderMAD * driver ()
 
void end ()
 Releases the reserved memory. More...
 
 operator bool ()
 Returns true as long as we are processing data. More...
 
void setAudioDataCallback (libmad::MP3DataCallback cb)
 Defines the callback which receives the decoded data.
 
void setInfoCallback (libmad::MP3InfoCallback cb)
 Defines the callback which receives the Info changes.
 
virtual void setNotifyAudioChange (AudioBaseInfoDependent &bi)
 
void setOutputStream (Print &out)
 
size_t write (const void *data, size_t len)
 Makes the mp3 data available for decoding: however we recommend to provide the data via a callback or input stream. More...
 
size_t write (void *data, size_t len)
 Makes the mp3 data available for decoding: however we recommend to provide the data via a callback or input stream.
 
- Public Member Functions inherited from audio_tools::AudioDecoder
 AudioDecoder (AudioDecoder const &)=delete
 
virtual AudioBaseInfo audioInfo ()=0
 
virtual bool isResultPCM ()
 
AudioDecoderoperator= (AudioDecoder const &)=delete
 
virtual void setAudioInfo (AudioBaseInfo from) override
 
virtual void setOutputStream (AudioPrint &out_stream)
 
virtual void setOutputStream (AudioStream &out_stream)
 
virtual void setOutputStream (Print &out_stream) override=0
 
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
 
virtual void setNotifyAudioChange (AudioBaseInfoDependent &bi)=0
 

Static Public Member Functions

static void audioChangeCallback (libmad::MadAudioInfo &info)
 

Protected Attributes

libmad::MP3DecoderMAD * mad
 

Detailed Description

MP3 Decoder using https://github.com/pschatzmann/arduino-libmad.

Author
Phil Schatzmann

Member Function Documentation

◆ audioInfo()

AudioBaseInfo audio_tools::MP3DecoderMAD::audioInfo ( )
inlinevirtual

◆ begin()

void audio_tools::MP3DecoderMAD::begin ( )
inlinevirtual

Starts the processing.

Implements audio_tools::AudioWriter.

◆ end()

void audio_tools::MP3DecoderMAD::end ( )
inlinevirtual

Releases the reserved memory.

Implements audio_tools::AudioWriter.

◆ operator bool()

audio_tools::MP3DecoderMAD::operator bool ( )
inlinevirtual

Returns true as long as we are processing data.

Implements audio_tools::AudioWriter.

◆ setNotifyAudioChange()

virtual void audio_tools::MP3DecoderMAD::setNotifyAudioChange ( AudioBaseInfoDependent bi)
inlinevirtual

◆ setOutputStream()

void audio_tools::MP3DecoderMAD::setOutputStream ( Print out)
inlinevirtual

◆ write()

size_t audio_tools::MP3DecoderMAD::write ( const void *  data,
size_t  len 
)
inlinevirtual

Makes the mp3 data available for decoding: however we recommend to provide the data via a callback or input stream.

Implements audio_tools::AudioWriter.


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