AY/8930: fix possib silence aftr PCM in forceIns

This commit is contained in:
tildearrow 2024-04-25 16:26:21 -05:00
parent 930e5e9aaa
commit 1c5b50c3c1
2 changed files with 4 additions and 0 deletions

View file

@ -714,6 +714,8 @@ void DivPlatformAY8910::muteChannel(int ch, bool mute) {
void DivPlatformAY8910::forceIns() { void DivPlatformAY8910::forceIns() {
for (int i=0; i<3; i++) { for (int i=0; i<3; i++) {
chan[i].curPSGMode.val&=~8;
chan[i].nextPSGMode.val&=~8;
chan[i].insChanged=true; chan[i].insChanged=true;
chan[i].freqChanged=true; chan[i].freqChanged=true;
} }

View file

@ -715,6 +715,8 @@ void DivPlatformAY8930::muteChannel(int ch, bool mute) {
void DivPlatformAY8930::forceIns() { void DivPlatformAY8930::forceIns() {
for (int i=0; i<3; i++) { for (int i=0; i<3; i++) {
chan[i].insChanged=true; chan[i].insChanged=true;
chan[i].curPSGMode.val&=~8;
chan[i].nextPSGMode.val&=~8;
immWrite(regPeriodL[i],chan[i].envelope.period); immWrite(regPeriodL[i],chan[i].envelope.period);
immWrite(regPeriodH[i],chan[i].envelope.period>>8); immWrite(regPeriodH[i],chan[i].envelope.period>>8);
immWrite(regMode[i],chan[i].envelope.mode); immWrite(regMode[i],chan[i].envelope.mode);