VIC-20: fix on/off unmute

This commit is contained in:
tildearrow 2024-06-16 19:08:10 -05:00
parent 629c57a086
commit b3448c1f16

View file

@ -263,17 +263,26 @@ int DivPlatformVIC20::dispatch(DivCommand c) {
void DivPlatformVIC20::muteChannel(int ch, bool mute) {
isMuted[ch]=mute;
if (chan[ch].onOff) {
if (mute) {
chan[ch].keyOff=true;
} else if (chan[ch].active) {
chan[ch].keyOn=true;
}
}
}
void DivPlatformVIC20::forceIns() {
for (int i=0; i<4; i++) {
chan[i].insChanged=true;
// I give up!
if (chan[i].onOff) {
chan[i].freqChanged=true;
} else {
chan[i].freqChanged=false;
chan[i].keyOff=true;
chan[i].keyOn=false;
}
writeOutVol(i);
}
}