[BACK]Return to dsp.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / sndiod

Diff for /src/usr.bin/sndiod/dsp.c between version 1.17 and 1.18

version 1.17, 2021/01/12 15:46:53 version 1.18, 2021/07/05 08:29:59
Line 321 
Line 321 
                         todo--;                          todo--;
                 } else {                  } else {
   
                         for (c = nch; c > 0; c--)                          for (c = 0; c < nch; c++)
                                 f[c] = 0;                                  f[c] = 0;
   
                         q = diff * p->filt_step;                          q = diff * p->filt_step;
Line 334 
Line 334 
                                 ds = resamp_filt[qi + 1] - s;                                  ds = resamp_filt[qi + 1] - s;
                                 s += (int64_t)qf * ds >> RESAMP_STEP_BITS;                                  s += (int64_t)qf * ds >> RESAMP_STEP_BITS;
                                 ctx = ctxbuf;                                  ctx = ctxbuf;
                                 for (c = nch; c > 0; c--) {                                  for (c = 0; c < nch; c++) {
                                         f[c] += (int64_t)ctx[n] * s;                                          f[c] += (int64_t)ctx[n] * s;
                                         ctx += RESAMP_NCTX;                                          ctx += RESAMP_NCTX;
                                 }                                  }
Line 342 
Line 342 
                                 n = (n + 1) & (RESAMP_NCTX - 1);                                  n = (n + 1) & (RESAMP_NCTX - 1);
                         }                          }
   
                         for (c = nch; c > 0; c--) {                          for (c = 0; c < nch; c++) {
                                 s = f[c] >> RESAMP_BITS;                                  s = f[c] >> RESAMP_BITS;
                                 s = (int64_t)s * p->filt_cutoff >> RESAMP_BITS;                                  s = (int64_t)s * p->filt_cutoff >> RESAMP_BITS;
 #if ADATA_BITS == 16  #if ADATA_BITS == 16

Legend:
Removed from v.1.17  
changed lines
  Added in v.1.18