![]() |
Gorgon Game Engine
|
Provides FLAC encoding support. More...
Public Member Functions | |
FLAC (int buffersize=1024) | |
~FLAC () | |
void | Decode (const std::string &filename, Containers::Wave &wave) |
Decodes given FLAC compressed file and fills a wave container. More... | |
void | Decode (const std::vector< Byte > &input, Containers::Wave &wave) |
Decodes given FLAC compressed data and fills a wave container. More... | |
void | Decode (std::istream &input, Containers::Wave &wave) |
Decodes given FLAC compressed data and fills a wave container. More... | |
void | Encode (const Containers::Wave &input, const std::string &filename, int bps=16) |
Encodes the given wave data to FLAC compressed data. More... | |
void | Encode (const Containers::Wave &input, std::ostream &output, int bps=16) |
Encodes the given wave data to FLAC compressed data. More... | |
void | Encode (const Containers::Wave &input, std::vector< Byte > &output, int bps=16) |
Encodes the given wave data to FLAC compressed data. More... | |
Provides FLAC encoding support.
FLAC | ( | int | buffersize = 1024 | ) |
~FLAC | ( | ) |
void Decode | ( | const std::string & | filename, |
Containers::Wave & | wave | ||
) |
Decodes given FLAC compressed file and fills a wave container.
References FLAC::Decode().
void Decode | ( | const std::vector< Byte > & | input, |
Containers::Wave & | wave | ||
) |
Decodes given FLAC compressed data and fills a wave container.
References Wave::Assume(), Gorgon::Encoding::decode_error(), Gorgon::Encoding::decode_write(), Wave::SetSampleRate(), Gorgon::Audio::StandardChannels(), and Gorgon::Encoding::vector_decode_read().
void Decode | ( | std::istream & | input, |
Containers::Wave & | wave | ||
) |
Decodes given FLAC compressed data and fills a wave container.
References Wave::Assume(), Gorgon::Encoding::decode_error(), Gorgon::Encoding::decode_write(), Wave::SetSampleRate(), Gorgon::Audio::StandardChannels(), and Gorgon::Encoding::stream_decode_read().
void Encode | ( | const Containers::Wave & | input, |
const std::string & | filename, | ||
int | bps = 16 |
||
) |
Encodes the given wave data to FLAC compressed data.
bps is the bit/sample. It is best to use original bit/sample if re-saving a file. Lower values will save disk space while sacrificing quality. Current FLAC implementation supports 4 - 24 bit/sample. Channel layout is saved as is, and it is the responsibility of the caller to make it compatible with the standard layout. This function is not thread safe, you need one FLAC object per thread.
References FLAC::Encode().
void Encode | ( | const Containers::Wave & | input, |
std::ostream & | output, | ||
int | bps = 16 |
||
) |
Encodes the given wave data to FLAC compressed data.
bps is the bit/sample. It is best to use original bit/sample if re-saving a file. Lower values will save disk space while sacrificing quality. Current FLAC implementation supports 4 - 24 bit/sample. Channel layout is saved as is, and it is the responsibility of the caller to make it compatible with the standard layout. This function is not thread safe, you need one FLAC object per thread.
References Gorgon::Encoding::stream_encode_seek(), Gorgon::Encoding::stream_encode_tell(), and Gorgon::Encoding::stream_encode_write().
void Encode | ( | const Containers::Wave & | input, |
std::vector< Byte > & | output, | ||
int | bps = 16 |
||
) |
Encodes the given wave data to FLAC compressed data.
bps is the bit/sample. It is best to use original bit/sample if re-saving a file. Lower values will save disk space while sacrificing quality. Current FLAC implementation supports 4 - 24 bit/sample. Channel layout is saved as is, and it is the responsibility of the caller to make it compatible with the standard layout.
References Gorgon::Encoding::vector_encode_seek(), Gorgon::Encoding::vector_encode_tell(), and Gorgon::Encoding::vector_encode_write().