This commit is contained in:
tildearrow 2024-01-31 15:23:33 -05:00
parent 532f00a311
commit dca9262ec2

View file

@ -370,19 +370,9 @@ void DivPlatformAmiga::tick(bool sysTick) {
chan[i].outVol=((chan[i].vol%65)*MIN(64,chan[i].std.vol.val))>>6; chan[i].outVol=((chan[i].vol%65)*MIN(64,chan[i].std.vol.val))>>6;
chan[i].writeVol=true; chan[i].writeVol=true;
} }
double off=1.0;
if (!chan[i].useWave && chan[i].sample>=0 && chan[i].sample<parent->song.sampleLen) {
DivSample* s=parent->getSample(chan[i].sample);
if (s->centerRate<1) {
off=1.0;
} else {
off=8363.0/(double)s->centerRate;
}
}
if (NEW_ARP_STRAT) { if (NEW_ARP_STRAT) {
chan[i].handleArp(); chan[i].handleArp();
} else if (chan[i].std.arp.had) { } else if (chan[i].std.arp.had) {
// TODO: why the off mult? this may be a bug!
chan[i].baseFreq=round(NOTE_PERIODIC_NOROUND(parent->calcArp(chan[i].note,chan[i].std.arp.val))); chan[i].baseFreq=round(NOTE_PERIODIC_NOROUND(parent->calcArp(chan[i].note,chan[i].std.arp.val)));
chan[i].freqChanged=true; chan[i].freqChanged=true;
} }
@ -577,6 +567,8 @@ int DivPlatformAmiga::dispatch(DivCommand c) {
chan[c.chan].updateWave=true; chan[c.chan].updateWave=true;
} }
} }
chan[c.chan].sampleNote=DIV_NOTE_NULL;
chan[c.chan].sampleNoteDelta=0;
} else { } else {
if (c.value!=DIV_NOTE_NULL) { if (c.value!=DIV_NOTE_NULL) {
chan[c.chan].sample=ins->amiga.getSample(c.value); chan[c.chan].sample=ins->amiga.getSample(c.value);