From 3fba3492d249c9c75d8e2c7239dda0af22d59c20 Mon Sep 17 00:00:00 2001 From: qwertymodo Date: Sat, 26 May 2018 20:01:02 -0700 Subject: [PATCH] Fix MSU-1 channel swap on loop --- msu1.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/msu1.cpp b/msu1.cpp index e54c4004..2b4434d7 100644 --- a/msu1.cpp +++ b/msu1.cpp @@ -322,6 +322,8 @@ static bool AudioOpen() audioLoopPos <<= 2; audioLoopPos += 8; + MSU1.MSU1_AUDIO_POS = 8; + MSU1.MSU1_STATUS &= ~AudioError; return true; } @@ -437,12 +439,6 @@ void S9xMSU1Generate(size_t sample_count) else if (bytes_read >= 0) { - sample = (int16)((double)(int16)GET_LE16(&sample) * (double)MSU1.MSU1_VOLUME / 255.0); - - *(bufPos++) = sample; - MSU1.MSU1_AUDIO_POS += 2; - partial_samples -= 3204; - if (MSU1.MSU1_STATUS & AudioRepeating) { MSU1.MSU1_AUDIO_POS = audioLoopPos;