From 08da31f96cbced10c3fd34be32199e97d6694b73 Mon Sep 17 00:00:00 2001 From: Christopher Snowhill Date: Mon, 7 Feb 2022 04:17:53 -0800 Subject: [PATCH] Cog Audio: Fix generic downmix to stereo Code ordering was wrong, it was writing the output samples repeatedly for each input speaker, now it will only write them once. Signed-off-by: Christopher Snowhill --- Audio/Chain/Downmix.m | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Audio/Chain/Downmix.m b/Audio/Chain/Downmix.m index cb7d29572..98a0bf3f0 100644 --- a/Audio/Chain/Downmix.m +++ b/Audio/Chain/Downmix.m @@ -135,10 +135,9 @@ static void downmix_to_stereo(const float *inBuffer, int channels, uint32_t conf default: break; } - - outBuffer[i * 2 + 0] = left; - outBuffer[i * 2 + 1] = right; } + outBuffer[i * 2 + 0] = left; + outBuffer[i * 2 + 1] = right; } }