[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.20 and 1.21

version 1.20, 2024/04/22 11:07:42 version 1.21, 2024/04/22 14:11:35
Line 834 
Line 834 
     int imin, int imax, int isubmin, int isubmax,      int imin, int imax, int isubmin, int isubmax,
     int omin, int omax, int osubmin, int osubmax)      int omin, int omax, int osubmin, int osubmax)
 {  {
         int cmin, cmax;          int inch, onch, nch;
   
         cmin = -NCHAN_MAX;          /*
         if (osubmin > cmin)           * Ignore channels outside of the available sets
                 cmin = osubmin;           */
         if (omin > cmin)          if (isubmin < imin)
                 cmin = omin;                  isubmin = imin;
         if (isubmin > cmin)          if (isubmax > imax)
                 cmin = isubmin;                  isubmax = imax;
         if (imin > cmin)          if (osubmin < omin)
                 cmin = imin;                  osubmin = omin;
           if (osubmax > omax)
                   osubmax = omax;
   
         cmax = NCHAN_MAX;          /*
         if (osubmax < cmax)           * Shrink the input or the output subset to make both subsets of
                 cmax = osubmax;           * the same size
         if (omax < cmax)           */
                 cmax = omax;          inch = isubmax - isubmin + 1;
         if (isubmax < cmax)          onch = osubmax - osubmin + 1;
                 cmax = isubmax;          nch = (inch < onch) ? inch : onch;
         if (imax < cmax)          isubmax = isubmin + nch - 1;
                 cmax = imax;          osubmax = osubmin + nch - 1;
   
         p->ostart = cmin - omin;          p->ostart = osubmin - omin;
         p->onext = omax - cmax;          p->onext = omax - osubmax;
         p->istart = cmin - imin;          p->istart = isubmin - imin;
         p->inext = imax - cmax;          p->inext = imax - isubmax;
         p->nch = cmax - cmin + 1;          p->nch = nch;
 #ifdef DEBUG  #ifdef DEBUG
         if (log_level >= 3) {          if (log_level >= 3) {
                 log_puts("cmap: nch = ");                  log_puts("cmap: nch = ");

Legend:
Removed from v.1.20  
changed lines
  Added in v.1.21