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

Diff for /src/usr.bin/aucat/Attic/wav.c between version 1.16 and 1.17

version 1.16, 2010/04/21 06:13:07 version 1.17, 2010/04/24 06:18:23
Line 307 
Line 307 
         struct abuf *rbuf = NULL, *wbuf = NULL;          struct abuf *rbuf = NULL, *wbuf = NULL;
   
         if (f->mode & MODE_PLAY)          if (f->mode & MODE_PLAY)
                 rbuf = LIST_FIRST(&f->pipe.file.rproc->obuflist);                  rbuf = LIST_FIRST(&f->pipe.file.rproc->outs);
         if (f->mode & MODE_RECMASK)          if (f->mode & MODE_RECMASK)
                 wbuf = LIST_FIRST(&f->pipe.file.wproc->ibuflist);                  wbuf = LIST_FIRST(&f->pipe.file.wproc->ins);
         f->pstate = WAV_RUN;          f->pstate = WAV_RUN;
 #ifdef DEBUG  #ifdef DEBUG
         if (debug_level >= 3) {          if (debug_level >= 3) {
Line 374 
Line 374 
         struct abuf *rbuf = NULL, *wbuf = NULL;          struct abuf *rbuf = NULL, *wbuf = NULL;
   
         if (f->mode & MODE_PLAY)          if (f->mode & MODE_PLAY)
                 rbuf = LIST_FIRST(&f->pipe.file.rproc->obuflist);                  rbuf = LIST_FIRST(&f->pipe.file.rproc->outs);
         if (f->mode & MODE_RECMASK)          if (f->mode & MODE_RECMASK)
                 wbuf = LIST_FIRST(&f->pipe.file.wproc->ibuflist);                  wbuf = LIST_FIRST(&f->pipe.file.wproc->ins);
         f->pstate = WAV_INIT;          f->pstate = WAV_INIT;
 #ifdef DEBUG  #ifdef DEBUG
         if (debug_level >= 3) {          if (debug_level >= 3) {
Line 472 
Line 472 
         struct abuf *obuf;          struct abuf *obuf;
   
         p = f->pipe.file.rproc;          p = f->pipe.file.rproc;
         obuf = LIST_FIRST(&p->obuflist);          obuf = LIST_FIRST(&p->outs);
         if (obuf == NULL)          if (obuf == NULL)
                 return 0;                  return 0;
         if (!ABUF_WOK(obuf) || !(f->pipe.file.state & FILE_ROK))          if (!ABUF_WOK(obuf) || !(f->pipe.file.state & FILE_ROK))
Line 519 
Line 519 
         if (!(f->pipe.file.state & FILE_WOK))          if (!(f->pipe.file.state & FILE_WOK))
                 return 0;                  return 0;
         p = f->pipe.file.wproc;          p = f->pipe.file.wproc;
         ibuf = LIST_FIRST(&p->ibuflist);          ibuf = LIST_FIRST(&p->ins);
         if (ibuf == NULL)          if (ibuf == NULL)
                 return 0;                  return 0;
         if (!ABUF_ROK(ibuf))          if (!ABUF_ROK(ibuf))
Line 540 
Line 540 
   
         f->vol = vol;          f->vol = vol;
         if ((f->mode & MODE_PLAY) && f->pstate == WAV_RUN) {          if ((f->mode & MODE_PLAY) && f->pstate == WAV_RUN) {
                 rbuf = LIST_FIRST(&f->pipe.file.rproc->obuflist);                  rbuf = LIST_FIRST(&f->pipe.file.rproc->outs);
                 dev_setvol(rbuf, MIDI_TO_ADATA(vol));                  dev_setvol(rbuf, MIDI_TO_ADATA(vol));
         }          }
 }  }
Line 775 
Line 775 
   
         if (!wav_rdata(f))          if (!wav_rdata(f))
                 return 0;                  return 0;
         obuf = LIST_FIRST(&p->obuflist);          obuf = LIST_FIRST(&p->outs);
         if (obuf && f->pstate >= WAV_RUN) {          if (obuf && f->pstate >= WAV_RUN) {
                 if (!abuf_flush(obuf))                  if (!abuf_flush(obuf))
                         return 0;                          return 0;
Line 837 
Line 837 
 int  int
 wwav_out(struct aproc *p, struct abuf *obuf_dummy)  wwav_out(struct aproc *p, struct abuf *obuf_dummy)
 {  {
         struct abuf *ibuf = LIST_FIRST(&p->ibuflist);          struct abuf *ibuf = LIST_FIRST(&p->ins);
         struct wav *f = (struct wav *)p->u.io.file;          struct wav *f = (struct wav *)p->u.io.file;
   
         if (ibuf && f->pstate == WAV_RUN) {          if (ibuf && f->pstate == WAV_RUN) {

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