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

Diff for /src/usr.bin/aucat/aucat.c between version 1.162 and 1.163

version 1.162, 2016/06/02 05:29:35 version 1.163, 2016/06/07 06:11:32
Line 424 
Line 424 
         free(s);          free(s);
 }  }
   
 static int  static void
 slot_ocnt(struct slot *s, int icnt)  slot_getcnt(struct slot *s, int *icnt, int *ocnt)
 {  {
         return s->resampbuf ? resamp_ocnt(&s->resamp, icnt) : icnt;          int cnt;
 }  
   
 static int          if (s->resampbuf)
 slot_icnt(struct slot *s, int ocnt)                  resamp_getcnt(&s->resamp, icnt, ocnt);
 {          else {
         return s->resampbuf ? resamp_icnt(&s->resamp, ocnt) : ocnt;                  cnt = (*icnt < *ocnt) ? *icnt : *ocnt;
                   *icnt = cnt;
                   *ocnt = cnt;
           }
 }  }
   
 static void  static void
Line 505 
Line 507 
         otodo = dev_round;          otodo = dev_round;
         while (otodo > 0) {          while (otodo > 0) {
                 idata = (adata_t *)abuf_rgetblk(&s->buf, &len);                  idata = (adata_t *)abuf_rgetblk(&s->buf, &len);
   
                 icnt = len / s->bpf;                  icnt = len / s->bpf;
                 ocnt = slot_ocnt(s, icnt);                  ocnt = otodo;
                 if (ocnt > otodo) {                  slot_getcnt(s, &icnt, &ocnt);
                         ocnt = otodo;  
                         icnt = slot_icnt(s, ocnt);  
                 }  
                 if (icnt == 0)                  if (icnt == 0)
                         break;                          break;
                 play_filt_dec(s, idata, odata, icnt, ocnt);                  play_filt_dec(s, idata, odata, icnt, ocnt);
Line 574 
Line 572 
   
         while (itodo > 0) {          while (itodo > 0) {
                 odata = (adata_t *)abuf_wgetblk(&s->buf, &len);                  odata = (adata_t *)abuf_wgetblk(&s->buf, &len);
   
                 ocnt = len / s->bpf;                  ocnt = len / s->bpf;
                 icnt = slot_icnt(s, ocnt);                  icnt = itodo;
                 if (icnt > itodo) {                  slot_getcnt(s, &icnt, &ocnt);
                         icnt = itodo;  
                         ocnt = slot_ocnt(s, icnt);  
                 }  
                 if (ocnt == 0)                  if (ocnt == 0)
                         break;                          break;
                 rec_filt_enc(s, idata, odata, icnt, ocnt);                  rec_filt_enc(s, idata, odata, icnt, ocnt);

Legend:
Removed from v.1.162  
changed lines
  Added in v.1.163