From 46b36574ed27544e1dd15daa204f1eb484e9a840 Mon Sep 17 00:00:00 2001 From: lovyan03 <42724151+lovyan03@users.noreply.github.com> Date: Mon, 5 Sep 2022 05:27:05 +0900 Subject: [PATCH] fix: Invalid data is assigned to the right channel when playing a mono MP3. (#559) --- src/AudioGeneratorMP3.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/AudioGeneratorMP3.cpp b/src/AudioGeneratorMP3.cpp index d962c9e..8045d90 100644 --- a/src/AudioGeneratorMP3.cpp +++ b/src/AudioGeneratorMP3.cpp @@ -248,6 +248,10 @@ retry: running = false; goto done; } + if (lastChannels == 1) + { + lastSample[1] = lastSample[0]; + } } while (running && output->ConsumeSample(lastSample)); done: