Function libcacaoaudiodecode::DecodeAudio

Function Documentation

Result libcacaoaudiodecode::DecodeAudio(std::istream &encoded)

Convenience function for decoding audio data.

Supports MP3, WAV, Ogg Vorbis, and Ogg Opus

Parameters:

encoded – The encoded audio data to decode, provided via stream

Throws:

std::runtime_error – If the provided data is not of the correct size, is of an unsupported format, or the audio decoding fails

Returns:

The decoded audio buffer and metadata