[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.30 and 1.31

version 1.30, 2008/12/29 17:59:08 version 1.31, 2009/01/23 17:38:15
Line 188 
Line 188 
         if (f->refs > 0)          if (f->refs > 0)
                 return 0;                  return 0;
         DPRINTFN(3, "rpipe_out: %s\n", p->name);          DPRINTFN(3, "rpipe_out: %s\n", p->name);
   
         if (ABUF_FULL(obuf) || !(f->state & FILE_ROK))          if (ABUF_FULL(obuf) || !(f->state & FILE_ROK))
                 return 0;                  return 0;
         data = abuf_wgetblk(obuf, &count, 0);          data = abuf_wgetblk(obuf, &count, 0);
Line 246 
Line 246 
   
         p = aproc_new(&rpipe_ops, f->name);          p = aproc_new(&rpipe_ops, f->name);
         p->u.io.file = f;          p->u.io.file = f;
         f->rproc = p;          f->rproc = p;
         return p;          return p;
 }  }
   
Line 295 
Line 295 
         DPRINTFN(3, "wpipe_out: %s\n", p->name);          DPRINTFN(3, "wpipe_out: %s\n", p->name);
   
         if (!abuf_fill(ibuf)) {          if (!abuf_fill(ibuf)) {
                 DPRINTFN(3, "wpipe_out: fill failed\n");                  DPRINTFN(3, "wpipe_out: fill failed\n");
                 return 0;                  return 0;
         }          }
         if (ABUF_EMPTY(ibuf) || !(f->state & FILE_WOK))          if (ABUF_EMPTY(ibuf) || !(f->state & FILE_WOK))
Line 407 
Line 407 
                 return;                  return;
   
         vol = (ibuf->mixweight * ibuf->mixvol) >> ADATA_SHIFT;          vol = (ibuf->mixweight * ibuf->mixvol) >> ADATA_SHIFT;
         ostart = ibuf->cmin - obuf->cmin;          ostart = ibuf->cmin - obuf->cmin;
         onext = obuf->cmax - ibuf->cmax + ostart;          onext = obuf->cmax - ibuf->cmax + ostart;
         icnt = ibuf->cmax - ibuf->cmin + 1;          icnt = ibuf->cmax - ibuf->cmin + 1;
         odata += ostart;          odata += ostart;
Line 434 
Line 434 
 mix_xrun(struct abuf *i, struct abuf *obuf)  mix_xrun(struct abuf *i, struct abuf *obuf)
 {  {
         unsigned fdrop;          unsigned fdrop;
   
         if (i->mixodone > 0)          if (i->mixodone > 0)
                 return 1;                  return 1;
         if (i->xrun == XRUN_ERROR) {          if (i->xrun == XRUN_ERROR) {
Line 466 
Line 466 
   
         DPRINTFN(4, "mix_in: used/len = %u/%u, done/todo = %u/%u\n",          DPRINTFN(4, "mix_in: used/len = %u/%u, done/todo = %u/%u\n",
             ibuf->used, ibuf->len, ibuf->mixodone, obuf->mixitodo);              ibuf->used, ibuf->len, ibuf->mixodone, obuf->mixitodo);
   
         if (!ABUF_ROK(ibuf))          if (!ABUF_ROK(ibuf))
                 return 0;                  return 0;
         odone = obuf->len;          odone = obuf->len;
Line 501 
Line 501 
             obuf->used, obuf->len, obuf->mixitodo, obuf->len);              obuf->used, obuf->len, obuf->mixitodo, obuf->len);
   
         if (!ABUF_WOK(obuf))          if (!ABUF_WOK(obuf))
                 return 0;                  return 0;
         odone = obuf->len;          odone = obuf->len;
         for (i = LIST_FIRST(&p->ibuflist); i != NULL; i = inext) {          for (i = LIST_FIRST(&p->ibuflist); i != NULL; i = inext) {
                 inext = LIST_NEXT(i, ient);                  inext = LIST_NEXT(i, ient);
Line 700 
Line 700 
                 }                  }
                 idata += inext;                  idata += inext;
         }          }
         abuf_wcommit(obuf, scount * obuf->bpf);          abuf_wcommit(obuf, scount * obuf->bpf);
         obuf->subidone += scount * ibuf->bpf;          obuf->subidone += scount * ibuf->bpf;
         DPRINTFN(4, "sub_bcopy: %u frames\n", scount);          DPRINTFN(4, "sub_bcopy: %u frames\n", scount);
 }  }
Line 740 
Line 740 
 {  {
         struct abuf *i, *inext;          struct abuf *i, *inext;
         unsigned idone;          unsigned idone;
   
         if (!ABUF_ROK(ibuf))          if (!ABUF_ROK(ibuf))
                 return 0;                  return 0;
         idone = ibuf->len;          idone = ibuf->len;
Line 916 
Line 916 
         unsigned iblksz;          unsigned iblksz;
         unsigned ofr;          unsigned ofr;
         unsigned c;          unsigned c;
         short *ctxbuf, *ctx;          short *ctxbuf, *ctx;
         unsigned ctx_start;          unsigned ctx_start;
         unsigned icount, ocount;          unsigned icount, ocount;
   
Line 1036 
Line 1036 
 void  void
 resamp_ipos(struct aproc *p, struct abuf *ibuf, int delta)  resamp_ipos(struct aproc *p, struct abuf *ibuf, int delta)
 {  {
         struct abuf *obuf = LIST_FIRST(&p->obuflist);          struct abuf *obuf = LIST_FIRST(&p->obuflist);
         long long ipos;          long long ipos;
         int ifac, ofac;          int ifac, ofac;
   
Line 1539 
Line 1539 
         }          }
 #ifdef DEBUG  #ifdef DEBUG
         if (debug_level > 0) {          if (debug_level > 0) {
                 fprintf(stderr, "dec_new: %s: ", p->name);                  fprintf(stderr, "dec_new: %s: ", p->name);
                 aparams_print(par);                  aparams_print(par);
                 fprintf(stderr, "\n");                  fprintf(stderr, "\n");
         }          }

Legend:
Removed from v.1.30  
changed lines
  Added in v.1.31