ES5506: Fix frequency for note map

This commit is contained in:
cam900 2023-04-09 10:29:51 +09:00
parent 84eadd7aac
commit 385f7af664

View file

@ -433,7 +433,6 @@ void DivPlatformES5506::tick(bool sysTick) {
off=(double)center/8363.0;
}
if (ins->amiga.useNoteMap) {
off*=(double)noteMapind.freq/((double)MAX(1,center)*pow(2.0,((double)next-48.0)/12.0));
chan[i].pcm.note=next;
}
// get loop mode
@ -618,10 +617,6 @@ void DivPlatformES5506::tick(bool sysTick) {
} else {
off=(double)center/8363.0;
}
if (ins->amiga.useNoteMap) {
DivInstrumentAmiga::SampleMap& noteMapind=ins->amiga.noteMap[chan[i].pcm.note];
off*=(double)noteMapind.freq/((double)MAX(1,center)*pow(2.0,((double)chan[i].pcm.note-48.0)/12.0));
}
chan[i].pcm.loopStart=(chan[i].pcm.start+(s->loopStart<<11))&0xfffff800;
chan[i].pcm.loopEnd=(chan[i].pcm.start+((s->loopEnd-1)<<11))&0xffffff80;
chan[i].pcm.freqOffs=PITCH_OFFSET*off;