Fixed an incorrect ADLMIDI playback

As DMX uses both 10'th and 16'th channels for percussions, I'll turn a 16'th channel into percussive by XG way on every init/reset.
This commit is contained in:
Vitaly Novichkov 2018-03-22 10:26:44 +03:00 committed by Rachael Alexanderson
parent cea64ea092
commit 4481ebbdd2

View file

@ -75,6 +75,8 @@ ADLMIDIDevice::ADLMIDIDevice(const char *args)
if (Renderer != nullptr) if (Renderer != nullptr)
{ {
adl_setBank(Renderer, 14); adl_setBank(Renderer, 14);
//! Set 16'th channel be percussive (XG way)
adl_rt_bankChange(Renderer, 0x0F, 0x7F00);
} }
} }
@ -107,6 +109,8 @@ int ADLMIDIDevice::Open(MidiCallback callback, void *userdata)
if (ret == 0) if (ret == 0)
{ {
adl_rt_resetState(Renderer); adl_rt_resetState(Renderer);
//! Set 16'th channel be percussive (XG way)
adl_rt_bankChange(Renderer, 0x0F, 0x7F00);
} }
return ret; return ret;
} }
@ -141,7 +145,7 @@ void ADLMIDIDevice::HandleEvent(int status, int parm1, int parm2)
break; break;
case ME_PROGRAM: case ME_PROGRAM:
adl_rt_bankChange(Renderer, chan, parm1); adl_rt_patchChange(Renderer, chan, parm1);
break; break;
case ME_CHANNELPRESSURE: case ME_CHANNELPRESSURE: