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

WAVDecoder - We parse the header data on the first record and send the sound data to the stream which was indicated in the constructor. Only WAV files with WAV_FORMAT_PCM are supported! More...

#include <CodecWAV.h>

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

Public Member Functions

 WAVDecoder ()
 Construct a new WAVDecoder object.
 
 WAVDecoder (Print &out_stream, AudioBaseInfoDependent &bi)
 Construct a new WAVDecoder object. More...
 
 WAVDecoder (Print &out_stream, bool active=true)
 Construct a new WAVDecoder object. More...
 
AudioBaseInfo audioInfo ()
 
WAVAudioInfoaudioInfoEx ()
 
void begin ()
 
void end ()
 
const char * mime ()
 
virtual operator bool ()
 
int readStream (Stream &in)
 Alternative API which provides the data from an input stream.
 
void setNotifyAudioChange (AudioBaseInfoDependent &bi)
 
void setOutputStream (Print &out_stream)
 Defines the output Stream. More...
 
virtual size_t write (const void *in_ptr, size_t in_size)
 
- 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
 

Protected Attributes

bool active
 
AudioBaseInfoDependentaudioBaseInfoSupport
 
WAVHeader header
 
bool isFirst = true
 
bool isValid = true
 
Printout
 

Detailed Description

WAVDecoder - We parse the header data on the first record and send the sound data to the stream which was indicated in the constructor. Only WAV files with WAV_FORMAT_PCM are supported!

Author
Phil Schatzmann

Constructor & Destructor Documentation

◆ WAVDecoder() [1/2]

audio_tools::WAVDecoder::WAVDecoder ( Print out_stream,
bool  active = true 
)
inline

Construct a new WAVDecoder object.

Parameters
out_streamOutput Stream to which we write the decoded result

◆ WAVDecoder() [2/2]

audio_tools::WAVDecoder::WAVDecoder ( Print out_stream,
AudioBaseInfoDependent bi 
)
inline

Construct a new WAVDecoder object.

Parameters
out_streamOutput Stream to which we write the decoded result
biObject that will be notified about the Audio Formt (Changes)

Member Function Documentation

◆ audioInfo()

AudioBaseInfo audio_tools::WAVDecoder::audioInfo ( )
inlinevirtual

◆ begin()

void audio_tools::WAVDecoder::begin ( )
inlinevirtual

◆ end()

void audio_tools::WAVDecoder::end ( )
inlinevirtual

◆ operator bool()

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

◆ setNotifyAudioChange()

void audio_tools::WAVDecoder::setNotifyAudioChange ( AudioBaseInfoDependent bi)
inlinevirtual

◆ setOutputStream()

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

Defines the output Stream.

Implements audio_tools::AudioDecoder.

◆ write()

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

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