MultiPCM: only set new params on ins change

fixes an issue regarding level direct effect
This commit is contained in:
tildearrow 2025-02-07 04:15:20 -05:00
parent cb616ae594
commit f09fd02971

View file

@ -1713,6 +1713,7 @@ int DivPlatformOPL::dispatch(DivCommand c) {
chan[c.chan].freqChanged=true;
chan[c.chan].note=c.value;
}
if (chan[c.chan].insChanged) {
if (ins->type==DIV_INS_MULTIPCM) {
chan[c.chan].lfo=ins->multipcm.lfo;
chan[c.chan].vib=ins->multipcm.vib;
@ -1742,6 +1743,8 @@ int DivPlatformOPL::dispatch(DivCommand c) {
chan[c.chan].levelDirect=true;
chan[c.chan].lfoReset=false;
}
chan[c.chan].insChanged=false;
}
chan[c.chan].active=true;
chan[c.chan].keyOn=true;
chan[c.chan].macroInit(ins);