all repos — mgba @ 480dc0f97e63711de4403facf59917b01d6ab9b5

mGBA Game Boy Advance Emulator

GB Audio: Fix incorrect channel 4 iteration
Vicki Pfau vi@endrift.com
Sat, 08 Jul 2017 22:02:44 -0700
commit

480dc0f97e63711de4403facf59917b01d6ab9b5

parent

539e63d49b86c097d149c4e6b003783db53d2422

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

jump to
M CHANGESCHANGES

@@ -174,6 +174,7 @@ - GBA SIO: Improve SIO Normal dummy driver (fixes mgba.io/i/520)

- 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
M src/gb/audio.csrc/gb/audio.c

@@ -894,7 +894,7 @@ ch->sample *= ch->envelope.currentVolume;

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); }