[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.84 and 1.85

version 1.84, 2021/01/29 10:51:24 version 1.85, 2021/01/29 10:55:19
Line 109 
Line 109 
 struct dev *dev_list = NULL;  struct dev *dev_list = NULL;
 unsigned int dev_sndnum = 0;  unsigned int dev_sndnum = 0;
   
   struct ctlslot ctlslot_array[DEV_NCTLSLOT];
 struct slot slot_array[DEV_NSLOT];  struct slot slot_array[DEV_NSLOT];
 unsigned int slot_serial;               /* for slot allocation */  unsigned int slot_serial;               /* for slot allocation */
   
Line 1033 
Line 1034 
     unsigned int rate, unsigned int hold, unsigned int autovol)      unsigned int rate, unsigned int hold, unsigned int autovol)
 {  {
         struct dev *d;          struct dev *d;
         unsigned int i;  
   
         if (dev_sndnum == DEV_NMAX) {          if (dev_sndnum == DEV_NMAX) {
                 if (log_level >= 1)                  if (log_level >= 1)
Line 1066 
Line 1066 
         d->autovol = autovol;          d->autovol = autovol;
         d->refcnt = 0;          d->refcnt = 0;
         d->pstate = DEV_CFG;          d->pstate = DEV_CFG;
         for (i = 0; i < DEV_NCTLSLOT; i++) {  
                 d->ctlslot[i].ops = NULL;  
                 d->ctlslot[i].dev = d;  
                 d->ctlslot[i].mask = 0;  
                 d->ctlslot[i].mode = 0;  
         }  
         d->slot_list = NULL;          d->slot_list = NULL;
         d->master = MIDI_MAXCTL;          d->master = MIDI_MAXCTL;
         d->mtc.origin = 0;          d->mtc.origin = 0;
Line 1285 
Line 1279 
         }          }
         d->slot_list = NULL;          d->slot_list = NULL;
   
         for (c = d->ctlslot, i = DEV_NCTLSLOT; i > 0; i--, c++) {          for (c = ctlslot_array, i = DEV_NCTLSLOT; i > 0; i--, c++) {
                   if (c->dev != d)
                           continue;
                 if (c->ops)                  if (c->ops)
                         c->ops->exit(c->arg);                          c->ops->exit(c->arg);
                 c->ops = NULL;                  c->ops = NULL;
Line 2320 
Line 2316 
         for (;;) {          for (;;) {
                 if (i == DEV_NCTLSLOT)                  if (i == DEV_NCTLSLOT)
                         return NULL;                          return NULL;
                 s = d->ctlslot + i;                  s = ctlslot_array + i;
                 if (s->ops == NULL)                  if (s->ops == NULL)
                         break;                          break;
                 i++;                  i++;
Line 2425 
Line 2421 
         c->refs_mask = 0;          c->refs_mask = 0;
         for (i = 0; i < DEV_NCTLSLOT; i++) {          for (i = 0; i < DEV_NCTLSLOT; i++) {
                 c->refs_mask |= CTL_DEVMASK;                  c->refs_mask |= CTL_DEVMASK;
                 if (d->ctlslot[i].ops != NULL)                  if (ctlslot_array[i].ops != NULL)
                         c->refs_mask |= 1 << i;                          c->refs_mask |= 1 << i;
         }          }
         for (pc = &d->ctl_list; *pc != NULL; pc = &(*pc)->next)          for (pc = &d->ctl_list; *pc != NULL; pc = &(*pc)->next)
Line 2511 
Line 2507 
                     "output", -1, "level", NULL, -1, 127, d->master);                      "output", -1, "level", NULL, -1, 127, d->master);
         }          }
   
         for (s = d->ctlslot, i = DEV_NCTLSLOT; i > 0; i--, s++) {          for (s = ctlslot_array, i = DEV_NCTLSLOT; i > 0; i--, s++) {
                 if (s->ops)                  if (s->dev == d && s->ops)
                         s->ops->sync(s->arg);                          s->ops->sync(s->arg);
         }          }
 }  }

Legend:
Removed from v.1.84  
changed lines
  Added in v.1.85