Mercurial > otakunoraifu
diff music2/koedec_ogg.cc @ 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 | 4d7486cb20a9 |
children | 53a311ea8289 |
line wrap: on
line diff
--- 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;