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

Diff for /src/usr.bin/aucat/Attic/siofile.c between version 1.5 and 1.6

version 1.5, 2010/05/02 11:54:26 version 1.6, 2010/06/04 06:15:28
Line 198 
Line 198 
     struct aparams *ipar, struct aparams *opar,      struct aparams *ipar, struct aparams *opar,
     unsigned *bufsz, unsigned *round)      unsigned *bufsz, unsigned *round)
 {  {
           char *siopath;
         struct sio_par par;          struct sio_par par;
         struct sio_hdl *hdl;          struct sio_hdl *hdl;
         struct siofile *f;          struct siofile *f;
         unsigned mode = *rmode;          unsigned mode = *rmode;
   
         hdl = sio_open(path, mode, 1);          siopath = (strcmp(path, "default") == 0) ? NULL : path;
           hdl = sio_open(siopath, mode, 1);
         if (hdl == NULL) {          if (hdl == NULL) {
                 if (mode != (SIO_PLAY | SIO_REC))                  if (mode != (SIO_PLAY | SIO_REC))
                         return NULL;                          return NULL;
                 hdl = sio_open(path, SIO_PLAY, 1);                  hdl = sio_open(siopath, SIO_PLAY, 1);
                 if (hdl != NULL)                  if (hdl != NULL)
                         mode = SIO_PLAY;                          mode = SIO_PLAY;
                 else {                  else {
                         hdl = sio_open(path, SIO_REC, 1);                          hdl = sio_open(siopath, SIO_REC, 1);
                         if (hdl != NULL)                          if (hdl != NULL)
                                 mode = SIO_REC;                                  mode = SIO_REC;
                         else                          else
Line 272 
Line 274 
         *rmode = mode;          *rmode = mode;
         *bufsz = par.bufsz;          *bufsz = par.bufsz;
         *round = par.round;          *round = par.round;
         if (path == NULL)  
                 path = "default";  
         f = (struct siofile *)file_new(ops, path, sio_nfds(hdl));          f = (struct siofile *)file_new(ops, path, sio_nfds(hdl));
         if (f == NULL)          if (f == NULL)
                 goto bad_close;                  goto bad_close;

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