The standard way to open an Ogg Vorbis file is to use ov_fopen or ov_open. However, neither function works on Windows if the file path contains non-ASCII characters.
In this case, it is possible to wrap an existing std::ifstream (or a different input stream) and open it via ov_open_callbacks. When I tried to do this, I found the documentation a bit sketchy regarding the exact semantics of the required wrapper functions.
How can I wrap an existing stream in order to pass it to ov_open_callbacks?
Here's a working sample that opens an .ogg file and prints out some basic information. All wrapper functions (except
close, which isn't needed in this scenario) are implemented, so the resultingOggVorbis_Filestruct is fully seekable.