From a43034f559dad7bb516b0b2f7a50574821b2c048 Mon Sep 17 00:00:00 2001 From: tildearrow Date: Tue, 29 Mar 2022 23:58:50 -0500 Subject: [PATCH] OPN: fix portaPause not resetting on new note --- src/engine/platform/genesis.cpp | 1 + src/engine/platform/genesisext.cpp | 1 + src/engine/platform/ym2610.cpp | 1 + src/engine/platform/ym2610b.cpp | 1 + src/engine/platform/ym2610bext.cpp | 1 + src/engine/platform/ym2610ext.cpp | 1 + 6 files changed, 6 insertions(+) diff --git a/src/engine/platform/genesis.cpp b/src/engine/platform/genesis.cpp index 10a8762c0..0aff2b43a 100644 --- a/src/engine/platform/genesis.cpp +++ b/src/engine/platform/genesis.cpp @@ -542,6 +542,7 @@ int DivPlatformGenesis::dispatch(DivCommand c) { if (c.value!=DIV_NOTE_NULL) { chan[c.chan].baseFreq=NOTE_FREQUENCY(c.value); + chan[c.chan].portaPause=false; chan[c.chan].note=c.value; chan[c.chan].freqChanged=true; } diff --git a/src/engine/platform/genesisext.cpp b/src/engine/platform/genesisext.cpp index 02305a9aa..b53cd3894 100644 --- a/src/engine/platform/genesisext.cpp +++ b/src/engine/platform/genesisext.cpp @@ -73,6 +73,7 @@ int DivPlatformGenesisExt::dispatch(DivCommand c) { if (c.value!=DIV_NOTE_NULL) { opChan[ch].baseFreq=NOTE_FREQUENCY(c.value); + opChan[ch].portaPause=false; opChan[ch].freqChanged=true; } opChan[ch].keyOn=true; diff --git a/src/engine/platform/ym2610.cpp b/src/engine/platform/ym2610.cpp index 8d7626632..eb5fa86a7 100644 --- a/src/engine/platform/ym2610.cpp +++ b/src/engine/platform/ym2610.cpp @@ -829,6 +829,7 @@ int DivPlatformYM2610::dispatch(DivCommand c) { if (c.value!=DIV_NOTE_NULL) { chan[c.chan].baseFreq=NOTE_FREQUENCY(c.value); + chan[c.chan].portaPause=false; chan[c.chan].freqChanged=true; chan[c.chan].note=c.value; } diff --git a/src/engine/platform/ym2610b.cpp b/src/engine/platform/ym2610b.cpp index 1d954ebe6..745efa224 100644 --- a/src/engine/platform/ym2610b.cpp +++ b/src/engine/platform/ym2610b.cpp @@ -892,6 +892,7 @@ int DivPlatformYM2610B::dispatch(DivCommand c) { if (c.value!=DIV_NOTE_NULL) { chan[c.chan].baseFreq=NOTE_FREQUENCY(c.value); + chan[c.chan].portaPause=false; chan[c.chan].freqChanged=true; chan[c.chan].note=c.value; } diff --git a/src/engine/platform/ym2610bext.cpp b/src/engine/platform/ym2610bext.cpp index 5b3c3872e..e85215730 100644 --- a/src/engine/platform/ym2610bext.cpp +++ b/src/engine/platform/ym2610bext.cpp @@ -63,6 +63,7 @@ int DivPlatformYM2610BExt::dispatch(DivCommand c) { if (c.value!=DIV_NOTE_NULL) { opChan[ch].baseFreq=NOTE_FREQUENCY(c.value); + opChan[ch].portaPause=false; opChan[ch].freqChanged=true; } opChan[ch].keyOn=true; diff --git a/src/engine/platform/ym2610ext.cpp b/src/engine/platform/ym2610ext.cpp index 5e633eb2c..63d584d04 100644 --- a/src/engine/platform/ym2610ext.cpp +++ b/src/engine/platform/ym2610ext.cpp @@ -63,6 +63,7 @@ int DivPlatformYM2610Ext::dispatch(DivCommand c) { if (c.value!=DIV_NOTE_NULL) { opChan[ch].baseFreq=NOTE_FREQUENCY(c.value); + opChan[ch].portaPause=false; opChan[ch].freqChanged=true; } opChan[ch].keyOn=true;