all repos — mgba @ e2dc5575b9f878c4e823f648903f30745b85f17a

mGBA Game Boy Advance Emulator

GB Audio: Fix channel 3 freeze
Vicki Pfau vi@endrift.com
Mon, 12 Jun 2017 07:26:33 -0700
commit

e2dc5575b9f878c4e823f648903f30745b85f17a

parent

59922fe2e931ef876f10e4e4cbad92b5d76255fb

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

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

@@ -337,6 +337,7 @@ }

} audio->ch3.window = 0; } + mTimingDeschedule(audio->timing, &audio->ch3Fade); mTimingDeschedule(audio->timing, &audio->ch3Event); if (audio->playingCh3) { audio->ch3.readable = audio->style != GB_AUDIO_DMG;

@@ -863,6 +864,7 @@ ch->sample -= 8;

ch->sample *= volume * 4; audio->ch3.readable = true; if (audio->style == GB_AUDIO_DMG) { + mTimingDeschedule(audio->timing, &audio->ch3Fade); mTimingSchedule(timing, &audio->ch3Fade, 2 - cyclesLate); } int cycles = 2 * (2048 - ch->rate);