GB Audio: Fix channel 1, 2 reset
Vicki Pfau vi@endrift.com
Mon, 24 Sep 2018 08:31:38 -0700
1 files changed,
3 insertions(+),
1 deletions(-)
jump to
M
src/gb/audio.c
→
src/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); }