use state instead of accessing ins for block

This commit is contained in:
tildearrow 2025-01-28 04:24:10 -05:00
parent e713742985
commit dd9d220f33
16 changed files with 59 additions and 59 deletions

View file

@ -296,7 +296,7 @@ void DivPlatformOPLL::tick(bool sysTick) {
for (int i=0; i<11; i++) {
if (chan[i].freqChanged) {
int mul=2;
int fixedBlock=parent->getIns(chan[i].ins)->fm.block;
int fixedBlock=chan[i].state.block;
if (parent->song.linearPitch!=2) {
mul=octave(chan[i].baseFreq,fixedBlock)*2;
}
@ -640,7 +640,7 @@ int DivPlatformOPLL::dispatch(DivCommand c) {
int mul=1;
int fixedBlock=0;
if (parent->song.linearPitch!=2) {
fixedBlock=parent->getIns(chan[c.chan].ins)->fm.block;
fixedBlock=chan[c.chan].state.block;
mul=octave(chan[c.chan].baseFreq,fixedBlock);
}
if (destFreq>chan[c.chan].baseFreq) {