GB Audio: Fix initial sweep state
Vicki Pfau vi@endrift.com
Mon, 10 Aug 2020 18:07:39 -0700
2 files changed,
2 insertions(+),
1 deletions(-)
M
CHANGES
→
CHANGES
@@ -9,6 +9,7 @@ Emulation fixes:
- ARM: Fix ALU reading PC after shifting - ARM: Fix STR storing PC after address calculation - GB: Partially fix timing for skipped BIOS + - GB Audio: Fix initial sweep state - GB MBC: Fix MBC1 mode changing behavior - GB Video: Fix state after skipping BIOS (fixes mgba.io/i/1715 and mgba.io/i/1716) - GBA: Fix timing advancing too quickly in rare cases
M
src/gb/audio.c
→
src/gb/audio.c
@@ -117,7 +117,7 @@ }
if (audio->style == GB_AUDIO_GBA) { mTimingSchedule(audio->timing, &audio->frameEvent, 0); } - audio->ch1 = (struct GBAudioSquareChannel) { .envelope = { .dead = 2 } }; + audio->ch1 = (struct GBAudioSquareChannel) { .sweep = { .time = 8 }, .envelope = { .dead = 2 } }; audio->ch2 = (struct GBAudioSquareChannel) { .envelope = { .dead = 2 } }; audio->ch3 = (struct GBAudioWaveChannel) { .bank = 0 }; audio->ch4 = (struct GBAudioNoiseChannel) { .nSamples = 0 };