all repos — mgba @ aec8b8275622c3b54ee2bebfd903d5fc051255bc

mGBA Game Boy Advance Emulator

GB, GBA Core: Reset audio when loading mVL states so audio sync works
Vicki Pfau vi@endrift.com
Mon, 24 Apr 2017 12:44:51 -0700
commit

aec8b8275622c3b54ee2bebfd903d5fc051255bc

parent

25beafcc11af80cdd3192ec3a363ba5e45f4d9b2

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

jump to
M src/gb/core.csrc/gb/core.c

@@ -818,6 +818,7 @@ gb->cpu->memory.setActiveRegion(gb->cpu, gb->cpu->pc);

GBVideoDeserialize(&gb->video, state); GBIODeserialize(gb, state); + GBAudioReset(&gb->audio); // Make sure CPU loop never spins GBHalt(gb->cpu);
M src/gba/core.csrc/gba/core.c

@@ -838,6 +838,7 @@ gba->cpu->memory.store16(gba->cpu, BASE_IO | REG_IME, 0, NULL);

gba->cpu->memory.store16(gba->cpu, BASE_IO | REG_IE, 0, NULL); GBAVideoDeserialize(&gba->video, state); GBAIODeserialize(gba, state); + GBAAudioReset(&gba->audio); return true; }