From b81138bda1c6cb1b3d1fd8ecbf4174ac939b5f44 Mon Sep 17 00:00:00 2001 From: Diomendius <42310725+Diomendius@users.noreply.github.com> Date: Fri, 2 Aug 2019 17:47:45 +1200 Subject: [PATCH] Fix JACK plugin outputting only to left channel The JACK output plugin would not correctly upmix mono input files when exactly 2 output ports were configured. This fixes that. --- NEWS | 2 ++ src/output/plugins/JackOutputPlugin.cxx | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index d67bbb26a..d6bed1990 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,8 @@ ver 0.21.12 (not yet released) * decoder - opus: ignore case in replay gain tag names - opus, vorbis: decode the "end of stream" packet +* output + - jack: fix mono-to-stereo conversion * Windows - support backslash in relative URIs loaded from playlists diff --git a/src/output/plugins/JackOutputPlugin.cxx b/src/output/plugins/JackOutputPlugin.cxx index f9535386e..6b82b8bf7 100644 --- a/src/output/plugins/JackOutputPlugin.cxx +++ b/src/output/plugins/JackOutputPlugin.cxx @@ -540,7 +540,7 @@ JackOutput::Start() std::fill(dports + num_dports, dports + audio_format.channels, dports[0]); } else if (num_dports > audio_format.channels) { - if (audio_format.channels == 1 && num_dports > 2) { + if (audio_format.channels == 1 && num_dports >= 2) { /* mono input file: connect the one source channel to the both destination channels */ duplicate_port = dports[1];