No Matches
Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
audio_tools::FLACEncoder Class Reference

FLACEncoder. More...

#include <CodecFLAC.h>

Inheritance diagram for audio_tools::FLACEncoder:
audio_tools::AudioEncoder audio_tools::AudioWriter

Public Member Functions

virtual void begin () override
 starts the processing using the actual AudioInfo More...
virtual void begin (AudioBaseInfo from)
void begin (Print &out)
 starts the processing
int blockSize ()
int compressionLevel ()
void end () override
 stops the processing More...
bool isOgg ()
bool isOpen ()
const char * mime () override
 Provides "audio/pcm". More...
 operator bool () override
virtual void setAudioInfo (AudioBaseInfo from) override
 We update the audio information which will be used in the begin method. More...
void setBlockSize (int size)
void setCompressionLevel (int level)
void setOgg (bool isOgg)
void setOutputStream (Print &out_stream) override
 Defines the output Stream. More...
virtual size_t write (const void *in_ptr, size_t in_size) override
 Writes FLAC Packet. More...
- 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 writeBuffer (int16_t *data, size_t samples)

Static Protected Member Functions

static FLAC__StreamEncoderWriteStatus write_callback (const FLAC__StreamEncoder *encoder, const FLAC__byte buffer[], size_t bytes, uint32_t samples, uint32_t current_frame, void *client_data)

Protected Attributes

Vector< FLAC__int32 > buffer
AudioBaseInfo cfg
int flac_block_size = 512
int flac_compression_level = 8
bool is_ogg
bool is_open
FLAC__StreamEncoder * p_encoder =nullptr
Printp_print = nullptr

Detailed Description


Phil Schatzmann

Member Function Documentation

◆ begin()

virtual void audio_tools::FLACEncoder::begin ( )

starts the processing using the actual AudioInfo

Implements audio_tools::AudioWriter.

◆ end()

void audio_tools::FLACEncoder::end ( )

stops the processing

Implements audio_tools::AudioWriter.

◆ mime()

const char * audio_tools::FLACEncoder::mime ( )

Provides "audio/pcm".

Implements audio_tools::AudioEncoder.

◆ operator bool()

audio_tools::FLACEncoder::operator bool ( )

◆ setAudioInfo()

virtual void audio_tools::FLACEncoder::setAudioInfo ( AudioBaseInfo  from)

We update the audio information which will be used in the begin method.

Implements audio_tools::AudioWriter.

◆ setOutputStream()

void audio_tools::FLACEncoder::setOutputStream ( Print out_stream)

Defines the output Stream.

Implements audio_tools::AudioWriter.

◆ write()

virtual size_t audio_tools::FLACEncoder::write ( const void *  in_ptr,
size_t  in_size 

Writes FLAC Packet.

Implements audio_tools::AudioWriter.

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