Mercurial > otakunoraifu
changeset 44:a85cdca1980a
* fixed itoa_ws
* now, configure fails if the requested vorbis lib is not found (so it doesn't build with the wrong lib)
* removed unused current_section in koe_ogg.cc
author | thib |
---|---|
date | Wed, 25 Mar 2009 16:00:52 +0000 |
parents | 01aa5ddf7dc8 |
children | 53a311ea8289 |
files | configure.ac music2/koedec_ogg.cc scn2k/scn2k_cmd.cc |
diffstat | 3 files changed, 15 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/configure.ac +++ b/configure.ac @@ -86,9 +86,11 @@ if test X$with_vorbis != X"no"; then AC_CHECK_LIB(ogg, ogg_stream_init) AC_CHECK_LIB(vorbis, vorbis_book_decode,,,-logg) if test X$enable_tremor = X"yes"; then - AC_CHECK_LIB(vorbisidec, ov_read,,,-logg -lvorbis) + AC_CHECK_LIB(vorbisidec, ov_read,, + AC_MSG_ERROR(vorbisidec (tremor) not found),-logg -lvorbis) else - AC_CHECK_LIB(vorbisfile, ov_read,,,-logg -lvorbis) + AC_CHECK_LIB(vorbisfile, ov_read,, + AC_MSG_ERROR(vorbisfile not found),-logg -lvorbis) fi fi
--- a/music2/koedec_ogg.cc +++ b/music2/koedec_ogg.cc @@ -150,12 +150,11 @@ extern char* decode_koe_ogg(AvgKoeInfo i cur_size = INITSIZE; out = (char*)malloc(cur_size); - int current_section; do { #if HAVE_LIBVORBISFILE - r = ov_read(&vf, out+cur, cur_size-cur, 0, 2, 1, 0); + r = ov_read(&vf, out+cur, cur_size-cur, 0, 2, 1, NULL); #else /* HAVE_LIBVORBISIDEC */ - r = ov_read(&vf, out+cur, cur_size-cur, ¤t_section); + r = ov_read(&vf, out+cur, cur_size-cur, NULL); #endif if (r <= 0) break; cur += r; @@ -211,20 +210,19 @@ OggFILE::~OggFILE() { } int OggFILE::Read(char* buf, int blksize, int blklen) { if (pimpl == 0) return -1; - int current_section; #if HAVE_LIBVORBISFILE - int r = ov_read( &(pimpl->vf), buf, blksize*blklen, 0, 2, 1, 0); + int r = ov_read( &(pimpl->vf), buf, blksize*blklen, 0, 2, 1, NULL); #else /* HAVE_LIBVORBISIDEC */ - int r = ov_read( &(pimpl->vf), buf, blksize*blklen, ¤t_section); + int r = ov_read( &(pimpl->vf), buf, blksize*blklen, NULL); #endif if (r <= 0) { // end of file return -1; } while(r < blksize*blklen) { #if HAVE_LIBVORBISFILE - int dr = ov_read(&(pimpl->vf), buf+r, blksize*blklen-r, 0, 2, 1, 0); + int dr = ov_read(&(pimpl->vf), buf+r, blksize*blklen-r, 0, 2, 1, NULL); #else /* HAVE_LIBVORBISIDEC */ - int dr = ov_read(&(pimpl->vf), buf+r, blksize*blklen-r, ¤t_section); + int dr = ov_read(&(pimpl->vf), buf+r, blksize*blklen-r, NULL); #endif if (dr <= 0) break; r += dr;
--- a/scn2k/scn2k_cmd.cc +++ b/scn2k/scn2k_cmd.cc @@ -487,13 +487,13 @@ bool Flags::Exec(Cmd& cmd) { int i; for (i=0; buf[i] != 0; i++) { if (buf[i] == ' ') { - wc[0] = 0x81; - wc[0] = 0x40; + wc[0] = 0x81; // ' ' in SHIFT_JIS + wc[1] = 0x40; } else if (buf[i] == '-') { - wc[0] = 0x81; - wc[0] = 0x7c; + wc[0] = 0x81; // '-' in SHIFT_JIS + wc[1] = 0x7c; } else if (isdigit(buf[i])) { - wc[0] = 0x82; + wc[0] = 0x82; // number in SHIFT_JIS wc[1] = buf[i] - '0' + 0x4f; } else { continue;