all repos — mgba @ db7a0bd6b4d26eb7ec7819b90dade0e6eba31584

mGBA Game Boy Advance Emulator

Wii: Fix swapped audio channels
Jeffrey Pfau jeffrey@endrift.com
Sun, 13 Dec 2015 23:36:56 -0800
commit

db7a0bd6b4d26eb7ec7819b90dade0e6eba31584

parent

df3ee0e2be38095bbfc2385d430fa82542c64334

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

jump to
M src/platform/wii/main.csrc/platform/wii/main.c

@@ -381,8 +381,9 @@ available = SAMPLES - audioBufferSize;

} available &= ~((32 / sizeof(struct GBAStereoSample)) - 1); // Force align to 32 bytes if (available > 0) { - blip_read_samples(runner->context.gba->audio.left, &audioBuffer[currentAudioBuffer][audioBufferSize].left, available, true); - blip_read_samples(runner->context.gba->audio.right, &audioBuffer[currentAudioBuffer][audioBufferSize].right, available, true); + // These appear to be reversed for AUDIO_InitDMA + blip_read_samples(runner->context.gba->audio.left, &audioBuffer[currentAudioBuffer][audioBufferSize].right, available, true); + blip_read_samples(runner->context.gba->audio.right, &audioBuffer[currentAudioBuffer][audioBufferSize].left, available, true); audioBufferSize += available; } if (audioBufferSize == SAMPLES && !AUDIO_GetDMAEnableFlag()) {