GB Audio: Fix incorrect channel 4 iteration

This commit is contained in:
Vicki Pfau 2017-07-08 22:02:44 -07:00
parent 14b4f51ad8
commit 01abeb013b
2 changed files with 2 additions and 1 deletions

View File

@ -167,6 +167,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

@ -893,7 +893,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);
}