all repos — mgba @ c3c3bdc20c515892c9adf31336b928ac50bd5dc0

mGBA Game Boy Advance Emulator

GB Audio: Fix wrong register being updated with playing state
Jeffrey Pfau jeffrey@endrift.com
Fri, 05 Feb 2016 03:24:17 -0800
commit

c3c3bdc20c515892c9adf31336b928ac50bd5dc0

parent

770b80f2b21333ffbae641d4d8d7d598b56d9a7c

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

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

@@ -398,11 +398,11 @@ }

} if (audio->p) { - audio->p->memory.io[REG_NR51] &= ~0x000F; - audio->p->memory.io[REG_NR51] |= audio->playingCh1; - audio->p->memory.io[REG_NR51] |= audio->playingCh2 << 1; - audio->p->memory.io[REG_NR51] |= audio->playingCh3 << 2; - audio->p->memory.io[REG_NR51] |= audio->playingCh4 << 3; + audio->p->memory.io[REG_NR52] &= ~0x000F; + audio->p->memory.io[REG_NR52] |= audio->playingCh1; + audio->p->memory.io[REG_NR52] |= audio->playingCh2 << 1; + audio->p->memory.io[REG_NR52] |= audio->playingCh3 << 2; + audio->p->memory.io[REG_NR52] |= audio->playingCh4 << 3; audio->nextSample -= audio->eventDiff; if (audio->nextSample <= 0) { _sample(audio, audio->sampleInterval);