changeset 24:c9e218c2c3f1

Makes xclannad buildable without libvorbis
author thib
date Fri, 27 Feb 2009 16:02:32 +0000
parents f94d28dcf7bc
children 2110e0cf64ac
files music2/koedec.cc
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/music2/koedec.cc
+++ b/music2/koedec.cc
@@ -86,7 +86,9 @@ static AvgKoeCache koe_cache;
 AvgKoeInfo FindKoe(int file_number, int index) {
 	return koe_cache.Find(file_number, index);
 };
+#if HAVE_LIBVORBISFILE || HAVE_LIBVORBISIDEC
 extern int ogg_get_rate(FILE*);
+#endif
 AvgKoeInfo AvgKoeCache::Find(int file_number, int index) {
 	AvgKoeInfo info;
 	info.stream = 0; info.length = 0; info.offset = 0;
@@ -109,6 +111,7 @@ AvgKoeInfo AvgKoeCache::Find(int file_nu
 			sprintf(fname, "z%04d.ovk", file_number);
 			arcinfo = file_searcher.Find(FILESEARCH::KOE,fname,".ovk");
 		}
+#if HAVE_LIBVORBISFILE || HAVE_LIBVORBISIDEC
 		if (arcinfo == 0) {
 			DIRFILE* koedir = (DIRFILE*) file_searcher.MakeARCFILE((FILESEARCH::ARCTYPE)0, "koe");
 			sprintf(fname, "%04d", file_number);
@@ -127,6 +130,7 @@ AvgKoeInfo AvgKoeCache::Find(int file_nu
 			info.stream = stream;
 			return info;
 		}
+#endif
 		if (arcinfo == 0) return info;
 		FILE* stream = arcinfo->OpenFile();
 		delete arcinfo;