Given an encoded buffer in C++, what would be the steps using oggvorbis structs to decode the already in-memory data?
OggVorbis_File cannot be used, because assets are w
You also can don't reinvent the wheel and use fmemopen like this:
FILE* memfile = fmemopen(data, len, "r");
Where data
is pointer to memory beginning and len
is length of your data. Then pass memfile
to ov_open
like regular FILE
object.
However, there is downside: this function seems linux-specific (but it can be found in arduino, so I'm a bit confused about its status), so you don't have it on other systems. But there is some implementations for them (check libconfuse for window or for apple OSes).