[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.40 and 1.41

version 1.40, 2011/12/02 10:34:50 version 1.41, 2012/03/23 11:59:54
Line 125 
Line 125 
         msg[2] = s->vol;          msg[2] = s->vol;
 }  }
   
   void
   midi_msg_master(struct aproc *p, char *msg)
   {
           struct sysex *x = (struct sysex *)msg;
   
           memset(x, 0, sizeof(struct sysex));
           x->start = SYSEX_START;
           x->type = SYSEX_TYPE_RT;
           x->id0 = SYSEX_CONTROL;
           x->id1 = SYSEX_MASTER;
           x->u.master.fine = 0;
           x->u.master.coarse = p->u.midi.dev->master;
           x->u.master.end = SYSEX_END;
   }
   
 /*  /*
  * send a message to the given output   * send a message to the given output
  */   */
Line 330 
Line 345 
         unsigned char msg[sizeof(struct sysex)];          unsigned char msg[sizeof(struct sysex)];
         struct ctl_slot *s;          struct ctl_slot *s;
   
           midi_msg_master(p, msg);
           midi_copy(NULL, obuf, msg, SYSEX_SIZE(master));
         for (i = 0, s = p->u.midi.dev->slot; i < CTL_NSLOT; i++, s++) {          for (i = 0, s = p->u.midi.dev->slot; i < CTL_NSLOT; i++, s++) {
                 midi_msg_info(p, i, msg);                  midi_msg_info(p, i, msg);
                 midi_copy(NULL, obuf, msg, SYSEX_SIZE(mixinfo));                  midi_copy(NULL, obuf, msg, SYSEX_SIZE(mixinfo));
Line 360 
Line 377 
 }  }
   
 void  void
   midi_send_master(struct aproc *p)
   {
           unsigned char msg[sizeof(struct sysex)];
   
           midi_msg_master(p, msg);
           midi_send(p, NULL, msg, SYSEX_SIZE(master));
   }
   
   void
 midi_send_slot(struct aproc *p, int slot)  midi_send_slot(struct aproc *p, int slot)
 {  {
         unsigned char msg[sizeof(struct sysex)];          unsigned char msg[sizeof(struct sysex)];
Line 431 
Line 457 
                 return;                  return;
         switch (x->type) {          switch (x->type) {
         case SYSEX_TYPE_RT:          case SYSEX_TYPE_RT:
                   if (x->id0 == SYSEX_CONTROL && x->id1 == SYSEX_MASTER) {
                           if (len == SYSEX_SIZE(master))
                                   dev_master(p->u.midi.dev, x->u.master.coarse);
                           return;
                   }
                 if (x->id0 != SYSEX_MMC)                  if (x->id0 != SYSEX_MMC)
                         return;                          return;
                 switch (x->id1) {                  switch (x->id1) {

Legend:
Removed from v.1.40  
changed lines
  Added in v.1.41