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

Diff for /src/usr.bin/aucat/Attic/aproc.c between version 1.4 and 1.5

version 1.4, 2008/06/02 17:05:12 version 1.5, 2008/06/02 17:06:36
Line 388 
Line 388 
         ocount = obuf->mixtodo;          ocount = obuf->mixtodo;
         for (i = LIST_FIRST(&p->ibuflist); i != LIST_END(&p->ibuflist); i = inext) {          for (i = LIST_FIRST(&p->ibuflist); i != LIST_END(&p->ibuflist); i = inext) {
                 inext = LIST_NEXT(i, ient);                  inext = LIST_NEXT(i, ient);
                 if (!ABUF_ROK(i) && i->mixdone == 0) {                  if (!ABUF_ROK(i)) {
                         drop = obuf->mixtodo;                          if ((p->u.mix.flags & MIX_DROP) && i->mixdone == 0) {
                         i->mixdone += drop;                                  if (i->xrun == XRUN_ERROR) {
                         i->mixdrop += drop;                                          mix_rm(p, i);
                         DPRINTF("mix_out: xrun, drop = %u\n", i->mixdrop);                                          abuf_hup(i);
                                           continue;
                                   }
                                   drop = obuf->mixtodo;
                                   i->mixdone += drop;
                                   if (i->xrun == XRUN_SYNC)
                                           i->mixdrop += drop;
                                   DPRINTF("mix_out: xrun, drop = %u\n",
                                       i->mixdrop);
                           }
                 } else                  } else
                         mix_badd(i, obuf);                          mix_badd(i, obuf);
                 if (ocount > i->mixdone)                  if (ocount > i->mixdone)
Line 455 
Line 464 
         ibuf->mixdone = 0;          ibuf->mixdone = 0;
         ibuf->mixdrop = 0;          ibuf->mixdrop = 0;
         ibuf->mixvol = ADATA_UNIT;          ibuf->mixvol = ADATA_UNIT;
           ibuf->xrun = XRUN_IGNORE;
 }  }
   
 void  void
Line 474 
Line 484 
         struct aproc *p;          struct aproc *p;
   
         p = aproc_new(&mix_ops, "softmix");          p = aproc_new(&mix_ops, "softmix");
           p->u.mix.flags = 0;
         return p;          return p;
 }  }
   
Line 523 
Line 534 
         done = ibuf->used;          done = ibuf->used;
         for (i = LIST_FIRST(&p->obuflist); i != LIST_END(&p->obuflist); i = inext) {          for (i = LIST_FIRST(&p->obuflist); i != LIST_END(&p->obuflist); i = inext) {
                 inext = LIST_NEXT(i, oent);                  inext = LIST_NEXT(i, oent);
                 if (!ABUF_WOK(i) && i->subdone == 0) {                  if (!ABUF_WOK(i)) {
                         drop = ibuf->used;                          if ((p->u.sub.flags & SUB_DROP) && i->subdone == 0) {
                         i->subdrop += drop;                                  if (i->xrun == XRUN_ERROR) {
                         i->subdone += drop;                                          sub_rm(p, i);
                         DPRINTF("sub_in: xrun, drop =  %u\n", i->subdrop);                                          abuf_eof(i);
                                           continue;
                                   }
                                   drop = ibuf->used;
                                   if (i->xrun == XRUN_SYNC)
                                           i->subdrop += drop;
                                   i->subdone += drop;
                                   DPRINTF("sub_in: xrun, drop =  %u\n",
                                       i->subdrop);
                           }
                 } else {                  } else {
                         sub_bcopy(ibuf, i);                          sub_bcopy(ibuf, i);
                         abuf_flush(i);                          abuf_flush(i);
                 }                  }
 #ifdef sub_xrun_disabled  
                 if (!ABUF_WOK(i))                  if (!ABUF_WOK(i))
                         again = 0;                          again = 0;
 #endif  
                 if (done > i->subdone)                  if (done > i->subdone)
                         done = i->subdone;                          done = i->subdone;
         }          }
Line 570 
Line 588 
                 memset(odata, 0, ocount);                  memset(odata, 0, ocount);
                 obuf->used += ocount;                  obuf->used += ocount;
                 obuf->subdrop -= ocount;                  obuf->subdrop -= ocount;
                 DPRINTF("sub_out: catched, drop = %u\n", obuf->subdrop);                  DPRINTF("sub_out: catch, drop = %u\n", obuf->subdrop);
         }          }
   
         if (obuf->subdone >= ibuf->used)          if (obuf->subdone >= ibuf->used)
Line 646 
Line 664 
 {  {
         obuf->subdone = 0;          obuf->subdone = 0;
         obuf->subdrop = 0;          obuf->subdrop = 0;
           obuf->xrun = XRUN_IGNORE;
 }  }
   
 struct aproc_ops sub_ops = {  struct aproc_ops sub_ops = {
Line 658 
Line 677 
         struct aproc *p;          struct aproc *p;
   
         p = aproc_new(&sub_ops, "copy");          p = aproc_new(&sub_ops, "copy");
           p->u.sub.flags = 0;
         return p;          return p;
 }  }
   

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5