# HG changeset patch # User thib # Date 1235750552 0 # Node ID c9e218c2c3f1498e23a0574e27ca4dfe723b8411 # Parent f94d28dcf7bcfb8727cac12fcea759a64e09e662 Makes xclannad buildable without libvorbis diff --git a/music2/koedec.cc b/music2/koedec.cc --- 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;