=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/sndiod/dsp.c,v retrieving revision 1.17 retrieving revision 1.18 diff -c -r1.17 -r1.18 *** src/usr.bin/sndiod/dsp.c 2021/01/12 15:46:53 1.17 --- src/usr.bin/sndiod/dsp.c 2021/07/05 08:29:59 1.18 *************** *** 1,4 **** ! /* $OpenBSD: dsp.c,v 1.17 2021/01/12 15:46:53 naddy Exp $ */ /* * Copyright (c) 2008-2012 Alexandre Ratchov * --- 1,4 ---- ! /* $OpenBSD: dsp.c,v 1.18 2021/07/05 08:29:59 ratchov Exp $ */ /* * Copyright (c) 2008-2012 Alexandre Ratchov * *************** *** 321,327 **** todo--; } else { ! for (c = nch; c > 0; c--) f[c] = 0; q = diff * p->filt_step; --- 321,327 ---- todo--; } else { ! for (c = 0; c < nch; c++) f[c] = 0; q = diff * p->filt_step; *************** *** 334,340 **** ds = resamp_filt[qi + 1] - s; s += (int64_t)qf * ds >> RESAMP_STEP_BITS; ctx = ctxbuf; ! for (c = nch; c > 0; c--) { f[c] += (int64_t)ctx[n] * s; ctx += RESAMP_NCTX; } --- 334,340 ---- ds = resamp_filt[qi + 1] - s; s += (int64_t)qf * ds >> RESAMP_STEP_BITS; ctx = ctxbuf; ! for (c = 0; c < nch; c++) { f[c] += (int64_t)ctx[n] * s; ctx += RESAMP_NCTX; } *************** *** 342,348 **** n = (n + 1) & (RESAMP_NCTX - 1); } ! for (c = nch; c > 0; c--) { s = f[c] >> RESAMP_BITS; s = (int64_t)s * p->filt_cutoff >> RESAMP_BITS; #if ADATA_BITS == 16 --- 342,348 ---- n = (n + 1) & (RESAMP_NCTX - 1); } ! for (c = 0; c < nch; c++) { s = f[c] >> RESAMP_BITS; s = (int64_t)s * p->filt_cutoff >> RESAMP_BITS; #if ADATA_BITS == 16