--- src/adpcm.c.orig	2008-10-24 11:09:13.000000000 +0900
+++ src/adpcm.c	2009-10-02 18:51:34.000000000 +0900
@@ -149,16 +148,14 @@
                 top = obuff + n*chans;
 
                 ch = 0;
-                while (op < top) {
+    while (op < top) { /*** N.B. Without int casts, crashes on 64-bit arch ***/
                         b = *ip++;
                         tmp = op;
-                        *op++ = AdpcmDecode(b >> 4, state+ch, tmp[-chans], tmp[-(2*chans)]);
+      *op++ = AdpcmDecode(b >> 4, state+ch, tmp[-(int)chans], tmp[-(int)(2*chans)]);
                         if (++ch == chans) ch = 0;
-                        /* ch = ++ch % chans; */
                         tmp = op;
-                        *op++ = AdpcmDecode(b&0x0f, state+ch, tmp[-chans], tmp[-(2*chans)]);
+      *op++ = AdpcmDecode(b&0x0f, state+ch, tmp[-(int)chans], tmp[-(int)(2*chans)]);
                         if (++ch == chans) ch = 0;
-                        /* ch = ++ch % chans; */
                 }
         }
         return errmsg;

