QSound: limit max frequency to $EFFF

it appears $F000 and beyond cause glitches (#256)
This commit is contained in:
tildearrow 2022-08-06 23:05:54 -05:00
parent 17dba66fa0
commit 47ea8132b2

View file

@ -358,7 +358,7 @@ void DivPlatformQSound::tick(bool sysTick) {
} }
} }
chan[i].freq=off*parent->calcFreq(chan[i].baseFreq,chan[i].pitch,false,2,chan[i].pitch2,440.0,4096.0); chan[i].freq=off*parent->calcFreq(chan[i].baseFreq,chan[i].pitch,false,2,chan[i].pitch2,440.0,4096.0);
if (chan[i].freq>0xffff) chan[i].freq=0xffff; if (chan[i].freq>0xefff) chan[i].freq=0xefff;
if (chan[i].keyOn) { if (chan[i].keyOn) {
rWrite(q1_reg_map[Q1V_BANK][i], qsound_bank); rWrite(q1_reg_map[Q1V_BANK][i], qsound_bank);
rWrite(q1_reg_map[Q1V_END][i], qsound_end); rWrite(q1_reg_map[Q1V_END][i], qsound_end);