add duty macro

This commit is contained in:
LTVA1 2024-08-02 19:08:25 +03:00
parent 8cd045b04a
commit 4235167416
2 changed files with 16 additions and 0 deletions

View file

@ -185,6 +185,16 @@ void DivPlatformSID3::tick(bool sysTick)
}
chan[i].freqChanged=true;
}
if (chan[i].std.duty.had) {
DivInstrument* ins=parent->getIns(chan[i].ins,DIV_INS_SID3);
if (ins->c64.dutyIsAbs) {
chan[i].duty=chan[i].std.duty.val;
} else {
chan[i].duty-=chan[i].std.duty.val;
}
chan[i].duty&=65535;
updateDuty(i);
}
if (chan[i].freqChanged || chan[i].keyOn || chan[i].keyOff)
{