carb::audio::convertToFlac

Defined in carb/audio/AudioUtils.h

inline SoundData *carb::audio::convertToFlac(const IAudioUtils *iface, SoundData *snd, uint32_t compressionLevel = 5, uint32_t bitsPerSample = 0, FlacFileType fileType = FlacFileType::eFlac, bool streamableSubset = true, uint32_t blockSize = 0, bool verifyOutput = false)

Convert a sound to FLAC.

Note

It is not recommended to set the encoder settings, apart from compressionLevel, to anything other than their defaults under most circumstances.

Parameters
Returns

The new sound data created. snd and the returned value must both be released after this call once the caller is finished with them.

Returns

nullptr if the operation failed.

Returns

nullptr if the encoding parameters were invalid.