all repos — mgba @ 4c8e08d2b00dda0015e6929fa963c95ab2bdeb9c

mGBA Game Boy Advance Emulator

GBA Audio: Fix serializing/deserializing flags
Vicki Pfau vi@endrift.com
Mon, 24 Aug 2020 01:57:51 -0700
commit

4c8e08d2b00dda0015e6929fa963c95ab2bdeb9c

parent

27b31024cee96991735069a72d5d709dcb9ebb9e

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

jump to
M src/gba/audio.csrc/gba/audio.c

@@ -405,7 +405,7 @@ flags = GBASerializedAudioFlagsSetFIFOSamplesA(flags, fifoSizeA);

flags = GBASerializedAudioFlagsSetFIFOSamplesB(flags, fifoSizeB); flags = GBASerializedAudioFlagsSetFIFOInternalSamplesA(flags, audio->chA.internalRemaining); flags = GBASerializedAudioFlagsSetFIFOInternalSamplesB(flags, audio->chB.internalRemaining); - STORE_32(flags, 0, &state->audio.gbaFlags); + STORE_16(flags, 0, &state->audio.gbaFlags); STORE_32(audio->sampleEvent.when - mTimingCurrentTime(&audio->p->timing), 0, &state->audio.nextSample); }

@@ -430,7 +430,7 @@ audio->chA.fifoRead = 0;

audio->chB.fifoRead = 0; GBASerializedAudioFlags flags; - LOAD_32(flags, 0, &state->audio.gbaFlags); + LOAD_16(flags, 0, &state->audio.gbaFlags); audio->chA.fifoWrite = GBASerializedAudioFlagsGetFIFOSamplesA(flags); audio->chB.fifoWrite = GBASerializedAudioFlagsGetFIFOSamplesB(flags); audio->chA.internalRemaining = GBASerializedAudioFlagsGetFIFOInternalSamplesA(flags);