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.
This commit is contained in:
Diomendius 2019-08-02 17:47:45 +12:00 committed by Max Kellermann
parent 6de088140b
commit b81138bda1
2 changed files with 3 additions and 1 deletions

2
NEWS
View File

@ -2,6 +2,8 @@ ver 0.21.12 (not yet released)
* decoder * decoder
- opus: ignore case in replay gain tag names - opus: ignore case in replay gain tag names
- opus, vorbis: decode the "end of stream" packet - opus, vorbis: decode the "end of stream" packet
* output
- jack: fix mono-to-stereo conversion
* Windows * Windows
- support backslash in relative URIs loaded from playlists - support backslash in relative URIs loaded from playlists

View File

@ -540,7 +540,7 @@ JackOutput::Start()
std::fill(dports + num_dports, dports + audio_format.channels, std::fill(dports + num_dports, dports + audio_format.channels,
dports[0]); dports[0]);
} else if (num_dports > audio_format.channels) { } 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 /* mono input file: connect the one source
channel to the both destination channels */ channel to the both destination channels */
duplicate_port = dports[1]; duplicate_port = dports[1];