GB Audio: Fix incorrect channel 4 iteration

This commit is contained in:
Vicki Pfau 2017-07-08 22:02:44 -07:00
parent 539e63d49b
commit 480dc0f97e
2 changed files with 2 additions and 1 deletions

View File

@ -174,6 +174,7 @@ Bugfixes:
- Qt: Fix patch loading while a game is running
- Qt: Fix shader selector on Ubuntu (fixes mgba.io/i/767)
- GB Serialize: Fix timer serialization
- GB Audio: Fix incorrect channel 4 iteration
Misc:
- Qt: Add language selector
- GBA Timer: Improve accuracy of timers

View File

@ -894,7 +894,7 @@ static void _updateChannel4(struct mTiming* timing, void* user, uint32_t cyclesL
ch->lfsr >>= 1;
ch->lfsr ^= (lsb * 0x60) << (ch->power ? 0 : 8);
cycles += baseCycles;
} while (cycles < audio->sampleInterval);
} while (cycles + baseCycles < audio->sampleInterval);
mTimingSchedule(timing, &audio->ch4Event, cycles - cyclesLate);
}