arduino-audio-tools
Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
FLACEncoder Class Reference

FLACEncoder. More...

#include <CodecFLAC.h>

Inheritance diagram for FLACEncoder:
AudioEncoder AudioWriter AudioInfoSupport

Public Member Functions

 FLACEncoder (bool isOgg=false)
 Default Constructor.
 
 ~FLACEncoder ()
 Destructor - calls end();.
 
AudioInfo audioInfo ()
 provides the actual input AudioInfo
 
virtual AudioInfo audioInfoOut ()
 provides the actual output AudioInfo: this is usually the same as audioInfo() unless we use a transforming stream
 
virtual bool begin () override
 starts the processing using the actual AudioInfo
 
virtual bool begin (AudioInfo info)
 
bool begin (Print &out)
 starts the processing
 
int blockSize ()
 
int compressionLevel ()
 
void end () override
 stops the processing
 
bool isOgg ()
 
bool isOpen ()
 
const char * mime () override
 Provides "audio/pcm".
 
 operator bool () override
 
virtual void setAudioInfo (AudioInfo from) override
 We update the audio information which will be used in the begin method.
 
void setBlockSize (int size)
 
void setCompressionLevel (int level)
 
void setOgg (bool isOgg)
 
void setOutput (Print &out_stream) override
 Defines the output Stream.
 
virtual size_t write (const uint8_t *data, size_t len) override
 Writes FLAC Packet.
 

Protected Member Functions

void writeBlocking (Print *out, uint8_t *data, size_t len)
 
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
 
AudioInfo cfg
 
int flac_block_size = 512
 
int flac_compression_level = 8
 
AudioInfo info
 
bool is_ogg = false
 
bool is_open = false
 
FLAC__StreamEncoder * p_encoder =nullptr
 
Printp_print = nullptr
 

Detailed Description

FLACEncoder.

Author
Phil Schatzmann

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