Mercurial > otakunoraifu
comparison music2/koedec.cc @ 50:35ce1a30f3f9
* Added va_end where there is a va_start
* Used NULL instead of 0 (so it works on 64b)
author | thib |
---|---|
date | Fri, 17 Apr 2009 18:38:06 +0000 |
parents | 53a311ea8289 |
children | 15a18fbe6f21 |
comparison
equal
deleted
inserted
replaced
49:6581f7eccd26 | 50:35ce1a30f3f9 |
---|---|
112 #if HAVE_LIBVORBISFILE || HAVE_LIBVORBISIDEC | 112 #if HAVE_LIBVORBISFILE || HAVE_LIBVORBISIDEC |
113 if (arcinfo == 0) { | 113 if (arcinfo == 0) { |
114 //FIXME: OMG that's ugly, improve it as soon as you can! | 114 //FIXME: OMG that's ugly, improve it as soon as you can! |
115 DIRFILE* koedir = (DIRFILE*) file_searcher.MakeARCFILE((FILESEARCH::ARCTYPE)0, "koe"); | 115 DIRFILE* koedir = (DIRFILE*) file_searcher.MakeARCFILE((FILESEARCH::ARCTYPE)0, "koe"); |
116 sprintf(fname, "%04d", file_number); | 116 sprintf(fname, "%04d", file_number); |
117 koedir = new DIRFILE(koedir->SearchFile(fname)); | 117 char* dirname = koedir->SearchFile(fname); |
118 delete koedir; | |
119 koedir = new DIRFILE(dirname); | |
120 delete[] dirname; | |
118 sprintf(fname, "z%04d%05d.ogg", file_number, index); | 121 sprintf(fname, "z%04d%05d.ogg", file_number, index); |
119 arcinfo = koedir->Find(fname, ".ogg"); | 122 arcinfo = koedir->Find(fname, ".ogg"); |
120 delete koedir; | 123 delete koedir; |
121 | 124 |
122 if (arcinfo == 0) return info; | 125 if (arcinfo == 0) return info; |
123 FILE* stream = arcinfo->OpenFile(&info.length); | 126 FILE* stream = arcinfo->OpenFile(&info.length); |
127 delete arcinfo; | |
124 info.type = koe_ogg; | 128 info.type = koe_ogg; |
125 info.stream = stream; | 129 info.stream = stream; |
126 return info; | 130 return info; |
127 } | 131 } |
128 #endif | 132 #endif |