aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorZoĆ« Sparks <[email protected]>2020-08-10 19:56:47 -0400
committerPaul Adenot <[email protected]>2020-09-28 14:19:32 +0200
commitdafe69a653042553b6bd0fb111c8294889772de5 (patch)
tree84ccd4873c4bb31c18aa2c1acaf90629d1ab8ed3
parent1358724f731b9813410f1ef4015ea8c26a201ab2 (diff)
downloadcubeb-dafe69a653042553b6bd0fb111c8294889772de5.tar.gz
cubeb-dafe69a653042553b6bd0fb111c8294889772de5.zip
jack: Special case playing mono source in stereo
-rw-r--r--src/cubeb_jack.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/cubeb_jack.cpp b/src/cubeb_jack.cpp
index d913b15..a922cad 100644
--- a/src/cubeb_jack.cpp
+++ b/src/cubeb_jack.cpp
@@ -261,6 +261,14 @@ cbjack_connect_ports (cubeb_stream * stream)
api_jack_connect (stream->context->jack_client, src_port, phys_in_ports[c]);
}
+
+ // Special case playing mono source in stereo
+ if (stream->out_params.channels == 1 && phys_in_ports[1] != NULL) {
+ const char *src_port = api_jack_port_name (stream->output_ports[0]);
+
+ api_jack_connect (stream->context->jack_client, src_port, phys_in_ports[1]);
+ }
+
r = CUBEB_OK;
skipplayback: