GB Audio: Deschedule channel 1 when disabled by sweep (fixes #1467)

This commit is contained in:
Vicki Pfau 2019-06-26 10:33:36 -07:00
parent 417a749fec
commit 042a77a932
2 changed files with 4 additions and 0 deletions

View File

@ -29,6 +29,7 @@ Emulation fixes:
- GB Audio: Sample inactive channels (fixes mgba.io/i/1455, mgba.io/i/1456) - GB Audio: Sample inactive channels (fixes mgba.io/i/1455, mgba.io/i/1456)
- GB Video: Increment BCPS/OCPS even in mode 3 (fixes mgba.io/i/1462) - GB Video: Increment BCPS/OCPS even in mode 3 (fixes mgba.io/i/1462)
- GB Audio: Deschedule channel 3 when disabled (fixes mgba.io/i/1463) - GB Audio: Deschedule channel 3 when disabled (fixes mgba.io/i/1463)
- GB Audio: Deschedule channel 1 when disabled by sweep (fixes mgba.io/i/1467)
Other fixes: Other fixes:
- Qt: Fix some Qt display driver race conditions - Qt: Fix some Qt display driver race conditions
- Core: Improved lockstep driver reliability (Le Hoang Quyen) - Core: Improved lockstep driver reliability (Le Hoang Quyen)

View File

@ -513,6 +513,9 @@ void GBAudioUpdateFrame(struct GBAudio* audio, struct mTiming* timing) {
audio->playingCh1 = _updateSweep(&audio->ch1, false); audio->playingCh1 = _updateSweep(&audio->ch1, false);
*audio->nr52 &= ~0x0001; *audio->nr52 &= ~0x0001;
*audio->nr52 |= audio->playingCh1; *audio->nr52 |= audio->playingCh1;
if (!audio->playingCh1) {
mTimingDeschedule(audio->timing, &audio->ch1Event);
}
} }
} }
// Fall through // Fall through