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

Diff for /src/usr.bin/sndiod/dev.c between version 1.104 and 1.105

version 1.104, 2022/03/15 05:53:37 version 1.105, 2022/04/29 09:12:57
Line 680 
Line 680 
          * check if the device is actually used. If it isn't,           * check if the device is actually used. If it isn't,
          * then close it           * then close it
          */           */
         if (d->slot_list == NULL && (mtc_array[0].dev != d ||          if (d->slot_list == NULL && d->idle >= d->bufsz &&
             mtc_array[0].tstate != MTC_RUN)) {              (mtc_array[0].dev != d || mtc_array[0].tstate != MTC_RUN)) {
                 if (log_level >= 2) {                  if (log_level >= 2) {
                         dev_log(d);                          dev_log(d);
                         log_puts(": device stopped\n");                          log_puts(": device stopped\n");
Line 744 
Line 744 
                         log_puts("\n");                          log_puts("\n");
                 }                  }
 #endif  #endif
                   d->idle = 0;
   
                 /*                  /*
                  * skip cycles for XRUN_SYNC correction                   * skip cycles for XRUN_SYNC correction
                  */                   */
Line 858 
Line 860 
   
         d->delta += delta;          d->delta += delta;
   
           if (d->slot_list == NULL)
                   d->idle += delta;
   
         for (s = d->slot_list; s != NULL; s = snext) {          for (s = d->slot_list; s != NULL; s = snext) {
                 /*                  /*
                  * s->ops->onmove() may remove the slot                   * s->ops->onmove() may remove the slot
Line 1284 
Line 1289 
                 } else {                  } else {
                         d->prime = 0;                          d->prime = 0;
                 }                  }
                   d->idle = 0;
                 d->poffs = 0;                  d->poffs = 0;
   
                 /*                  /*

Legend:
Removed from v.1.104  
changed lines
  Added in v.1.105