properly handle note off in PCM

This commit is contained in:
tildearrow 2021-12-09 03:25:00 -05:00
parent e2a41974ff
commit 248cc6d37a
2 changed files with 4 additions and 0 deletions

View file

@ -205,6 +205,9 @@ int DivPlatformGenesis::dispatch(DivCommand c) {
break;
}
case DIV_CMD_NOTE_OFF:
if (c.chan==5) {
dacSample=-1;
}
chan[c.chan].keyOff=true;
chan[c.chan].active=false;
break;

View file

@ -187,6 +187,7 @@ int DivPlatformNES::dispatch(DivCommand c) {
}
break;
case DIV_CMD_NOTE_OFF:
if (c.chan==4) dacSample=-1;
chan[c.chan].active=false;
chan[c.chan].keyOff=true;
chan[c.chan].std.init(NULL);