GBA Audio: Process multiple audio events at once, if necessary

This commit is contained in:
Jeffrey Pfau 2015-08-11 21:12:59 -07:00
parent b4dec1df53
commit ebfcc70b3d
2 changed files with 2 additions and 1 deletions

View File

@ -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:

View File

@ -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) {