Diff for /np2/sound/vermouth/midiout.c between versions 1.6 and 1.11

version 1.6, 2003/12/24 19:15:51 version 1.11, 2005/03/18 09:23:11
Line 2 Line 2
 #include        "midiout.h"  #include        "midiout.h"
   
   
 #define MIDIOUT_VERSION         0x104  #define MIDIOUT_VERSION         0x105
 #define MIDIOUT_VERSTRING       "VERMOUTH 1.04"  #define MIDIOUT_VERSTRING       "VERMOUTH 1.05"
   
   
 static const char vermouthver[] = MIDIOUT_VERSTRING;  static const OEMCHAR vermouthver[] = OEMTEXT(MIDIOUT_VERSTRING);
   
 static const int gaintbl[24+1] =  static const int gaintbl[24+1] =
                                 { 16,  19,  22,  26,  32,  38,  45,  53,                                  { 16,  19,  22,  26,  32,  38,  45,  53,
Line 637  static void allresetmidi(MIDIHDL midi) { Line 637  static void allresetmidi(MIDIHDL midi) {
   
 // ----  // ----
   
 UINT midiout_getver(char *string, int leng) {  UINT midiout_getver(OEMCHAR *string, int leng) {
   
         milstr_ncpy(string, vermouthver, leng);          milstr_ncpy(string, vermouthver, leng);
         return((MIDIOUT_VERSION << 8) | 0x00);          return((MIDIOUT_VERSION << 8) | 0x00);
Line 732  void midiout_shortmsg(MIDIHDL hdl, UINT3 Line 732  void midiout_shortmsg(MIDIHDL hdl, UINT3
         }          }
 }  }
   
 static void longmsg_gm(MIDIHDL hdl, const BYTE *msg, UINT size) {  static void longmsg_gm(MIDIHDL hdl, const UINT8 *msg, UINT size) {
   
         if ((size > 5) && (msg[2] == 0x7f) && (msg[3] == 0x09)) {          if ((size > 5) && (msg[2] == 0x7f) && (msg[3] == 0x09)) {
                 allresetmidi(hdl);                                              // GM reset                  allresetmidi(hdl);                                              // GM reset
         }          }
 }  }
   
 static void longmsg_roland(MIDIHDL hdl, const BYTE *msg, UINT size) {  static void longmsg_roland(MIDIHDL hdl, const UINT8 *msg, UINT size) {
   
         UINT    addr;          UINT    addr;
           UINT    part;
           CHANNEL ch;
   
         if ((size > 10) && (msg[2] == 0x10) &&          if ((size > 10) && (msg[2] == 0x10) &&
                 (msg[3] == 0x42) && (msg[4] == 0x12)) {         // GS data set                  (msg[3] == 0x42) && (msg[4] == 0x12)) {         // GS data set
Line 754  static void longmsg_roland(MIDIHDL hdl,  Line 756  static void longmsg_roland(MIDIHDL hdl, 
                         hdl->master = msg[8] & 0x7f;                          hdl->master = msg[8] & 0x7f;
                         allvolupdate(hdl);                          allvolupdate(hdl);
                 }                  }
                   else if ((addr & (~(0x000f00))) == 0x401015) {  // Tone/Rhythm
                           part = (addr >> 8) & 0x0f;
                           if (part == 0) {                                                        // part10
                                   part = 9;
                           }
                           else if (part < 10) {                                           // part1-9
                                   part--;
                           }
                           ch = hdl->channel + part;
                           if (msg[8] == 0) {
                                   ch->flag &= ~CHANNEL_RHYTHM;
                                   TRACEOUT(("ch%d - tone", part + 1));
                           }
                           else if ((msg[8] == 1) || (msg[8] == 2)) {
                                   ch->flag |= CHANNEL_RHYTHM;
                                   TRACEOUT(("ch%d - rhythm", part + 1));
                           }
                   }
                 else {                  else {
                         TRACEOUT(("Roland GS - %.6x", addr));                          TRACEOUT(("Roland GS - %.6x", addr));
                 }                  }
         }          }
 }  }
   
 void midiout_longmsg(MIDIHDL hdl, const BYTE *msg, UINT size) {  void midiout_longmsg(MIDIHDL hdl, const UINT8 *msg, UINT size) {
   
         UINT    id;          UINT    id;
   

Removed from v.1.6  
changed lines
  Added in v.1.11


RetroPC.NET-CVS <cvs@retropc.net>