all repos — mgba @ 00f5e2ea2a585cf71a545a2150e382d9129ab4fb

mGBA Game Boy Advance Emulator

GB Audio: Fix channel 1, 2 reset
Vicki Pfau vi@endrift.com
Mon, 24 Sep 2018 08:31:38 -0700
commit

00f5e2ea2a585cf71a545a2150e382d9129ab4fb

parent

5d28145b525e81de9c531b1dbc531203d9827e03

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

jump to
M src/gb/audio.csrc/gb/audio.c

@@ -95,7 +95,7 @@ audio->ch4Event.priority = 0x15;

audio->sampleEvent.context = audio; audio->sampleEvent.name = "GB Audio Sample"; audio->sampleEvent.callback = _sample; - audio->ch1Event.priority = 0x18; + audio->sampleEvent.priority = 0x18; } void GBAudioDeinit(struct GBAudio* audio) {

@@ -218,6 +218,7 @@ --audio->ch1.control.length;

} } if (audio->playingCh1 && audio->ch1.envelope.dead != 2) { + _updateSquareChannel(&audio->ch1); mTimingDeschedule(audio->timing, &audio->ch1Event); mTimingSchedule(audio->timing, &audio->ch1Event, 0); }

@@ -266,6 +267,7 @@ --audio->ch2.control.length;

} } if (audio->playingCh2 && audio->ch2.envelope.dead != 2) { + _updateSquareChannel(&audio->ch2); mTimingDeschedule(audio->timing, &audio->ch2Event); mTimingSchedule(audio->timing, &audio->ch2Event, 0); }