From 2ab4895f16d02e57aadd81357df29ce94c9ee66a Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Fri, 1 Jul 2022 13:32:20 +0100 Subject: [PATCH] Stop clipping when mono mixing is selected. --- player.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/player.c b/player.c index f62bc29e..15a8921e 100644 --- a/player.c +++ b/player.c @@ -2201,7 +2201,9 @@ void *player_thread_func(void *arg) { switch (config.playback_mode) { case ST_mono: { - int32_t both = ls + rs; + int32_t lsl = ls; + int32_t rsl = rs; + int32_t both = lsl + rsl; both = both << (16 - 1); // keep all 17 bits of the sum of the 16bit left and right // -- the 17th bit will influence dithering later ll = both;