diff music2/koedec_ogg.cc @ 45:53a311ea8289

Patched an old patch of mine (OGG koe files handling)... It's a bit less ugly, and it works with tremor!
author thib
date Wed, 25 Mar 2009 17:32:52 +0000
parents a85cdca1980a
children 15a18fbe6f21
line wrap: on
line diff
--- a/music2/koedec_ogg.cc
+++ b/music2/koedec_ogg.cc
@@ -104,21 +104,6 @@ static int fseek_wrap(FILE *f,ogg_int64_
   return fseek(f,off,whence);
 }
 
-
-int ogg_get_rate(FILE *stream)
-{
-	OggVorbis_File vf;
-	ov_callbacks callback;
-	callback.read_func = (size_t (*)(void*, size_t, size_t, void*))fread;
-	callback.seek_func = (int (*)(void*, ogg_int64_t, int))fseek_wrap;
-	callback.tell_func = (long int (*)(void*))ftell;
-	callback.close_func = NULL;
-	ov_test_callbacks(stream, &vf, NULL, 0, callback);
-	int rate = vf.vi->rate;
-	ov_clear(&vf);
-	return rate;
-}
-
 extern char* decode_koe_ogg(AvgKoeInfo info, int* dest_len) {
 	if (info.stream == 0) return 0;
 	// Voice ファイルを直接指定すると全ストリームを再生してしまうので