--- np2/x11/cmmidi.c 2003/11/16 16:43:45 1.1 +++ np2/x11/cmmidi.c 2011/01/15 16:01:52 1.5 @@ -2,13 +2,13 @@ #include "np2.h" #include "commng.h" -#include "keydisp.h" +#include "kdispwin.h" #include "mimpidef.h" #include "sound.h" -#if defined(VERMOUTH_LIB) #include "vermouth.h" +#if defined(VERMOUTH_LIB) extern MIDIMOD vermouth_module; const char cmmidi_vermouth[] = "VERMOUTH"; @@ -68,9 +68,7 @@ enum { CMMIDI_MIDIOUT = 0x01, CMMIDI_MIDIIN = 0x02, CMMIDI_MIDIINSTART = 0x04, -#if defined(VERMOUTH_LIB) CMMIDI_VERMOUTH = 0x08, -#endif MIDICTRL_READY = 0, MIDICTRL_2BYTES, @@ -97,9 +95,7 @@ struct _cmmidi { int hmidiin; int hmidiout; struct timeval hmidiout_nextstart; -#if defined(VERMOUTH_LIB) MIDIHDL vermouth; -#endif UINT midictrl; UINT midisyscnt; @@ -256,9 +252,7 @@ static void midiout_none(CMMIDI midi, UINT32 msg, UINT cnt) { - UNUSED(midi); - UNUSED(msg); - UNUSED(cnt); + /* Nothing to do */ } static void @@ -279,8 +273,6 @@ static void midiout_vermouth(CMMIDI midi, UINT32 msg, UINT cnt) { - UNUSED(cnt); - sound_sync(); midiout_shortmsg(midi->vermouth, msg); } @@ -527,12 +519,12 @@ midiwrite(COMMNG self, BYTE data) if (midi->buffer[1] == 123) { mch->press = 0; mch->bend = 0x4000; - mch->ctrl[1] = 0; // Modulation - mch->ctrl[5] = 127; // Explession - mch->ctrl[6] = 0; // Hold - mch->ctrl[7] = 0; // Portament - mch->ctrl[8] = 0; // Sostenute - mch->ctrl[9] = 0; // Soft + mch->ctrl[1+1] = 0; // Modulation + mch->ctrl[5+1] = 127; // Explession + mch->ctrl[6+1] = 0; // Hold + mch->ctrl[7+1] = 0; // Portament + mch->ctrl[8+1] = 0; // Sostenute + mch->ctrl[9+1] = 0; // Soft } else { mch->ctrl[midictrlindex[midi->buffer[1]]] = midi->buffer[2]; } @@ -593,8 +585,6 @@ static BYTE midigetstat(COMMNG self) { - UNUSED(self); - return 0x00; }