Diff for /np2/sound/vermouth/midiout.c between versions 1.1 and 1.5

version 1.1, 2003/10/16 17:58:10 version 1.5, 2003/12/01 04:01:42
Line 2 Line 2
 #include        "midiout.h"  #include        "midiout.h"
   
   
 #define MIDIOUT_VERSION         0x101  #define MIDIOUT_VERSION         0x104
 #define MIDIOUT_VERSTRING       "VERMOUTH 1.01"  #define MIDIOUT_VERSTRING       "VERMOUTH 1.04"
   
   
 static const char vermouthver[] = MIDIOUT_VERSTRING;  static const char vermouthver[] = MIDIOUT_VERSTRING;
Line 406  static void allnotesoff(MIDIHDL midi, CH Line 406  static void allnotesoff(MIDIHDL midi, CH
         v = midi->voice;          v = midi->voice;
         vterm = v + VOICE_MAX;          vterm = v + VOICE_MAX;
         do {          do {
   #if 1
                   if ((v->phase & (VOICE_ON | VOICE_SUSTAIN)) && (v->channel == ch)) {
                           voice_off(v);
                   }
   #else
                 if ((v->phase & VOICE_ON) && (v->channel == ch)) {                  if ((v->phase & VOICE_ON) && (v->channel == ch)) {
                         if (ch->flag & CHANNEL_SUSTAIN) {                          if (ch->flag & CHANNEL_SUSTAIN) {
                                 voice_setphase(v, VOICE_SUSTAIN);                                  voice_setphase(v, VOICE_SUSTAIN);
Line 414  static void allnotesoff(MIDIHDL midi, CH Line 419  static void allnotesoff(MIDIHDL midi, CH
                                 voice_off(v);                                  voice_off(v);
                         }                          }
                 }                  }
   #endif
                 v++;                  v++;
         } while(v < vterm);          } while(v < vterm);
 }  }
Line 647  MIDIHDL midiout_create(MIDIMOD module, U Line 653  MIDIHDL midiout_create(MIDIMOD module, U
         worksize = min(worksize, 512);          worksize = min(worksize, 512);
         worksize = max(worksize, 16384);          worksize = max(worksize, 16384);
         size = sizeof(_MIDIHDL);          size = sizeof(_MIDIHDL);
         size += sizeof(SINT32) * worksize;          size += sizeof(SINT32) * 2 * worksize;
         size += sizeof(_SAMPLE) * worksize;          size += sizeof(_SAMPLE) * worksize;
         ret = (MIDIHDL)_MALLOC(size, "MIDIHDL");          ret = (MIDIHDL)_MALLOC(size, "MIDIHDL");
         if (ret) {          if (ret) {
Line 659  MIDIHDL midiout_create(MIDIMOD module, U Line 665  MIDIHDL midiout_create(MIDIMOD module, U
                 ret->bank0[0] = module->tone[0];                  ret->bank0[0] = module->tone[0];
                 ret->bank0[1] = module->tone[1];                  ret->bank0[1] = module->tone[1];
                 ret->sampbuf = (SINT32 *)(ret + 1);                  ret->sampbuf = (SINT32 *)(ret + 1);
                 ret->resampbuf = (SAMPLE)(ret->sampbuf + worksize);                  ret->resampbuf = (SAMPLE)(ret->sampbuf + worksize * 2);
                 allresetmidi(ret);                  allresetmidi(ret);
         }          }
         return(ret);          return(ret);
Line 882  void midiout_setgain(MIDIHDL hdl, int ga Line 888  void midiout_setgain(MIDIHDL hdl, int ga
                 else if (gain > 8) {                  else if (gain > 8) {
                         gain = 8;                          gain = 8;
                 }                  }
                 hdl->gain = (char)gain;                  hdl->gain = (SINT8)gain;
                 allvolupdate(hdl);                  allvolupdate(hdl);
         }          }
 }  }

Removed from v.1.1  
changed lines
  Added in v.1.5


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