GB Audio: Fix initial sweep state

This commit is contained in:
Vicki Pfau 2020-08-10 18:07:39 -07:00
parent a1e43c91a1
commit 3bedc8ec91
2 changed files with 2 additions and 1 deletions

View File

@ -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

View File

@ -117,7 +117,7 @@ void GBAudioReset(struct GBAudio* audio) {
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 };