The libFLAC++ encoder classes are object wrappers around their counterparts in libFLAC. All encoding layers available in libFLAC are also provided here. The interface is very similar; make sure to read the libFLAC encoder module .
There are only two significant differences here. First, instead of passing in C function pointers for callbacks, you inherit from the encoder class and provide implementations for the callbacks in your derived class; because of this there is no need for a 'client_data' property.
Second, there are two stream encoder classes. FLAC::Encoder::Stream is used for the same cases that FLAC__stream_encoder_init_stream() / FLAC__stream_encoder_init_ogg_stream() are used, and FLAC::Encoder::File is used for the same cases that FLAC__stream_encoder_init_FILE() and FLAC__stream_encoder_init_file() / FLAC__stream_encoder_init_ogg_FILE() and FLAC__stream_encoder_init_ogg_file() are used.
Classes | |
class | FLAC::Encoder::Stream |
This class wraps the FLAC__StreamEncoder. If you are encoding to a file, FLAC::Encoder::File may be more convenient. More... | |
class | FLAC::Encoder::File |
This class wraps the FLAC__StreamEncoder. If you are not encoding to a file, you may need to use FLAC::Encoder::Stream. More... |