mirror of https://github.com/mgba-emu/mgba.git
GB Audio: Fix channel 1 restarting if sweep applies after stop (fixes #2965)
This commit is contained in:
parent
491879da95
commit
c5a7b1a9b7
1
CHANGES
1
CHANGES
|
@ -8,6 +8,7 @@ Features:
|
||||||
Emulation fixes:
|
Emulation fixes:
|
||||||
- ARM: Remove obsolete force-alignment in `bx pc` (fixes mgba.io/i/2964)
|
- ARM: Remove obsolete force-alignment in `bx pc` (fixes mgba.io/i/2964)
|
||||||
- GB Audio: Fix channels 1/2 staying muted if restarted after long silence
|
- GB Audio: Fix channels 1/2 staying muted if restarted after long silence
|
||||||
|
- GB Audio: Fix channel 1 restarting if sweep applies after stop (fixes mgba.io/i/2965)
|
||||||
- GB I/O: Read back proper SVBK value after writing 0 (fixes mgba.io/i/2921)
|
- GB I/O: Read back proper SVBK value after writing 0 (fixes mgba.io/i/2921)
|
||||||
- GB Serialize: Add missing Pocket Cam state to savestates
|
- GB Serialize: Add missing Pocket Cam state to savestates
|
||||||
- GB SIO: Disabling SIO should cancel pending transfers (fixes mgba.io/i/2537)
|
- GB SIO: Disabling SIO should cancel pending transfers (fixes mgba.io/i/2537)
|
||||||
|
|
|
@ -651,7 +651,9 @@ void GBAudioUpdateFrame(struct GBAudio* audio) {
|
||||||
if (audio->ch1.sweep.enable) {
|
if (audio->ch1.sweep.enable) {
|
||||||
--audio->ch1.sweep.step;
|
--audio->ch1.sweep.step;
|
||||||
if (audio->ch1.sweep.step == 0) {
|
if (audio->ch1.sweep.step == 0) {
|
||||||
audio->playingCh1 = _updateSweep(&audio->ch1, false);
|
if (!_updateSweep(&audio->ch1, false)) {
|
||||||
|
audio->playingCh1 = false;
|
||||||
|
}
|
||||||
*audio->nr52 &= ~0x0001;
|
*audio->nr52 &= ~0x0001;
|
||||||
*audio->nr52 |= audio->playingCh1;
|
*audio->nr52 |= audio->playingCh1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue