From 16242a0384d2d967b71c5f85f70791a3a80f972c Mon Sep 17 00:00:00 2001
From: Mike Smith WARNING for windows developers: this function cannot be used on win32 if your application dynamically links to libvorbisfile (see this microsoft page for details of why). Instead, you must use ov_open_callbacks(). A simple set of callbacks that will work is:
+
+ static int _fseek64_wrap(FILE *f,ogg_int64_t off,int whence){
+ if(f==NULL)return(-1);
+ return fseek(f,off,whence);
+ }
+
+ ov_callbacks callbacks = {
+ (size_t (*)(void *, size_t, size_t, void *)) fread,
+ (int (*)(void *, ogg_int64_t, int)) _fseek64_wrap,
+ (int (*)(void *)) fclose,
+ (long (*)(void *)) ftell
+ };
+
+
+