all repos — mgba @ 4880a1e04116dd01de878116ceb45eef4be4b035

mGBA Game Boy Advance Emulator

GB Audio: Fix initial sweep state
Vicki Pfau vi@endrift.com
Mon, 10 Aug 2020 18:07:39 -0700
commit

4880a1e04116dd01de878116ceb45eef4be4b035

parent

83397d5618c5290c102b83ec68d350750468f9f4

2 files changed, 2 insertions(+), 1 deletions(-)

jump to
M CHANGESCHANGES

@@ -1,5 +1,6 @@

0.8.4: (Future) Emulation fixes: + - GB Audio: Fix initial sweep state - GBA Video: Invalidate map cache when modifying BGCNT (fixes mgba.io/i/1846) Other fixes: - 3DS: Redo video sync to be more precise
M src/gb/audio.csrc/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 };