OPN: apply max freq limit

This commit is contained in:
tildearrow 2022-02-17 22:07:20 -05:00
parent eafc3078cf
commit 36eaea0fa7
4 changed files with 4 additions and 0 deletions

View file

@ -234,6 +234,7 @@ void DivPlatformYM2610Ext::tick() {
if (extMode) for (int i=0; i<4; i++) {
if (opChan[i].freqChanged) {
opChan[i].freq=parent->calcFreq(opChan[i].baseFreq,opChan[i].pitch);
if (opChan[i].freq>262143) opChan[i].freq=262143;
int freqt=toFreq(opChan[i].freq);
opChan[i].freqH=freqt>>8;
opChan[i].freqL=freqt&0xff;