mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 23:02:08 +00:00
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:
parent
cea64ea092
commit
4481ebbdd2
1 changed files with 5 additions and 1 deletions
|
@ -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:
|
||||||
|
|
Loading…
Reference in a new issue