Ticket #21741: patch-src-adpcm.c.diff
File patch-src-adpcm.c.diff, 1.0 KB (added by null.atou@…, 15 years ago) |
---|
-
src/adpcm.c
old new 149 148 top = obuff + n*chans; 150 149 151 150 ch = 0; 152 while (op < top) {151 while (op < top) { /*** N.B. Without int casts, crashes on 64-bit arch ***/ 153 152 b = *ip++; 154 153 tmp = op; 155 *op++ = AdpcmDecode(b >> 4, state+ch, tmp[-chans], tmp[-(2*chans)]);154 *op++ = AdpcmDecode(b >> 4, state+ch, tmp[-(int)chans], tmp[-(int)(2*chans)]); 156 155 if (++ch == chans) ch = 0; 157 /* ch = ++ch % chans; */158 156 tmp = op; 159 *op++ = AdpcmDecode(b&0x0f, state+ch, tmp[-chans], tmp[-(2*chans)]);157 *op++ = AdpcmDecode(b&0x0f, state+ch, tmp[-(int)chans], tmp[-(int)(2*chans)]); 160 158 if (++ch == chans) ch = 0; 161 /* ch = ++ch % chans; */162 159 } 163 160 } 164 161 return errmsg;