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

Diff for /src/usr.bin/aucat/Attic/midi.c between version 1.28 and 1.29

version 1.28, 2010/07/06 01:12:45 version 1.29, 2010/10/21 18:57:42
Line 560 
Line 560 
                         umap |= (1 << i);                          umap |= (1 << i);
         }          }
         for (unit = 0; ; unit++) {          for (unit = 0; ; unit++) {
                 if (unit == CTL_NSLOT)                  if (unit == CTL_NSLOT) {
   #ifdef DEBUG
                           if (debug_level >= 1) {
                                   dbg_puts(name);
                                   dbg_puts(": too many instances");
                           }
   #endif
                         return -1;                          return -1;
                   }
                 if ((umap & (1 << unit)) == 0)                  if ((umap & (1 << unit)) == 0)
                         break;                          break;
         }          }
 #ifdef DEBUG  
         if (debug_level >= 3) {  
                 aproc_dbg(p);  
                 dbg_puts(": new control name is ");  
                 dbg_puts(name);  
                 dbg_putu(unit);  
                 dbg_puts("\n");  
         }  
 #endif  
         /*          /*
          * find a free controller slot with the same name/unit           * find a free controller slot with the same name/unit
          */           */
Line 583 
Line 582 
                     slot->unit == unit) {                      slot->unit == unit) {
 #ifdef DEBUG  #ifdef DEBUG
                         if (debug_level >= 3) {                          if (debug_level >= 3) {
                                 aproc_dbg(p);                                  dbg_puts(name);
                                   dbg_putu(unit);
                                 dbg_puts(": found slot ");                                  dbg_puts(": found slot ");
                                 dbg_putu(i);                                  dbg_putu(i);
                                 dbg_puts("\n");                                  dbg_puts("\n");
Line 608 
Line 608 
                         bestidx = i;                          bestidx = i;
                 }                  }
         }          }
         if (bestidx == CTL_NSLOT)          if (bestidx == CTL_NSLOT) {
   #ifdef DEBUG
                   if (debug_level >= 1) {
                           dbg_puts(name);
                           dbg_putu(unit);
                           dbg_puts(": out of mixer slots\n");
                   }
   #endif
                 return -1;                  return -1;
           }
         slot = p->u.ctl.slot + bestidx;          slot = p->u.ctl.slot + bestidx;
         if (slot->name[0] != '\0')          if (slot->name[0] != '\0')
                 slot->vol = MIDI_MAXCTL;                  slot->vol = MIDI_MAXCTL;
Line 618 
Line 626 
         slot->unit = unit;          slot->unit = unit;
 #ifdef DEBUG  #ifdef DEBUG
         if (debug_level >= 3) {          if (debug_level >= 3) {
                 aproc_dbg(p);                  dbg_puts(name);
                   dbg_putu(unit);
                 dbg_puts(": overwritten slot ");                  dbg_puts(": overwritten slot ");
                 dbg_putu(bestidx);                  dbg_putu(bestidx);
                 dbg_puts("\n");                  dbg_puts("\n");

Legend:
Removed from v.1.28  
changed lines
  Added in v.1.29