diff --git a/CHANGES b/CHANGES index c0be41bf4..c9a836456 100644 --- a/CHANGES +++ b/CHANGES @@ -121,6 +121,7 @@ Misc: - Qt: Show checkmark for window sizes - Qt: Set window path to loaded ROM - GBA Memory: Run multiple DMAs in a tight loop if they all occur before present + - GBA Audio: Process multiple audio events at once, if necessary 0.2.1: (2015-05-13) Bugfixes: diff --git a/src/gba/audio.c b/src/gba/audio.c index 372c7ef25..6fac940b3 100644 --- a/src/gba/audio.c +++ b/src/gba/audio.c @@ -167,7 +167,7 @@ void GBAAudioResizeBuffer(struct GBAAudio* audio, size_t samples) { int32_t GBAAudioProcessEvents(struct GBAAudio* audio, int32_t cycles) { audio->nextEvent -= cycles; audio->eventDiff += cycles; - if (audio->nextEvent <= 0) { + while (audio->nextEvent <= 0) { audio->nextEvent = INT_MAX; if (audio->enable) { if (audio->playingCh1 && !audio->ch1.envelope.dead) {