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

Wraps the encoded data into CFG and DAT segments so that we can recover the audio configuration and orignial segments if this is relevant. More...

#include <ContainerSimple.h>

Inheritance diagram for audio_tools::SimpleContainerEncoder:
audio_tools::AudioEncoder audio_tools::AudioWriter

Public Member Functions

 SimpleContainerEncoder (AudioEncoder &encoder, int repeatHeader=0)
 
void begin ()
 
void begin (AudioBaseInfo info)
 
void commit ()
 call to mark end of data packat to start the next one
 
void end ()
 
void flush ()
 
void setAudioInfo (AudioBaseInfo info)
 
void setOutputStream (Print &outStream)
 
size_t write (const void *data, size_t len)
 
- Public Member Functions inherited from audio_tools::AudioEncoder
 AudioEncoder (AudioEncoder const &)=delete
 
virtual const char * mime ()=0
 
AudioEncoderoperator= (AudioEncoder const &)=delete
 
- Public Member Functions inherited from audio_tools::AudioWriter
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 writeHeader ()
 

Protected Attributes

SimpleContainerConfig cfg
 
SimpleContainerDataHeader dh
 
bool is_beginning = true
 
AudioEncoderp_codec = nullptr
 
uint64_t packet_count = 0
 
int repeat_header
 

Detailed Description

Wraps the encoded data into CFG and DAT segments so that we can recover the audio configuration and orignial segments if this is relevant.

Member Function Documentation

◆ begin()

void audio_tools::SimpleContainerEncoder::begin ( )
inlinevirtual

◆ end()

void audio_tools::SimpleContainerEncoder::end ( )
inlinevirtual

◆ setAudioInfo()

void audio_tools::SimpleContainerEncoder::setAudioInfo ( AudioBaseInfo  info)
inlinevirtual

◆ setOutputStream()

void audio_tools::SimpleContainerEncoder::setOutputStream ( Print outStream)
inlinevirtual

◆ write()

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

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