From: Jörn Nettingsmeier Date: Fri, 15 Feb 2019 19:29:24 +0000 (+0000) Subject: Remove option to configure port names. This is very unusual for a JACK client, nothin... X-Git-Tag: 3.3RC0~52^2~26 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0b589cbe6d13d43faa252d70156c7a2e1323734c;p=thirdparty%2Fshairport-sync.git Remove option to configure port names. This is very unusual for a JACK client, nothing is gained by offering this, and it might confuse users. --- diff --git a/audio_jack.c b/audio_jack.c index e4d97439..15f1f49d 100644 --- a/audio_jack.c +++ b/audio_jack.c @@ -163,9 +163,9 @@ static int jack_client_open_if_needed(void) { client = jack_client_open(config.jack_client_name, JackNoStartServer, &status); if (client) { jack_set_process_callback(client, jack_stream_write_cb, 0); - left_port = jack_port_register(client, config.jack_left_channel_name, JACK_DEFAULT_AUDIO_TYPE, + left_port = jack_port_register(client, "out_L", JACK_DEFAULT_AUDIO_TYPE, JackPortIsOutput, 0); - right_port = jack_port_register(client, config.jack_right_channel_name, + right_port = jack_port_register(client, "out_R", JACK_DEFAULT_AUDIO_TYPE, JackPortIsOutput, 0); sample_rate = jack_get_sample_rate(client); // debug(1, "jackaudio sample rate = %" PRId32 ".", sample_rate); @@ -235,14 +235,6 @@ int jack_init(__attribute__((unused)) int argc, __attribute__((unused)) char **a if (config_lookup_string(config.cfg, "jack.client_name", &str)) { config.jack_client_name = (char *)str; } - /* Get the Left Channel Name. */ - if (config_lookup_string(config.cfg, "jack.left_channel_name", &str)) { - config.jack_left_channel_name = (char *)str; - } - /* Get the Right Channel Name. */ - if (config_lookup_string(config.cfg, "jack.right_channel_name", &str)) { - config.jack_right_channel_name = (char *)str; - } /* See if we should attempt to connect to the jack server automatically, and, if so, how often * we should try. */ @@ -263,10 +255,6 @@ int jack_init(__attribute__((unused)) int argc, __attribute__((unused)) char **a if (config.jack_client_name == NULL) config.jack_client_name = strdup("Shairport Sync"); - if (config.jack_left_channel_name == NULL) - config.jack_left_channel_name = strdup("left"); - if (config.jack_right_channel_name == NULL) - config.jack_right_channel_name = strdup("right"); jackbuf = jack_ringbuffer_create(buffer_size); if (jackbuf == NULL) diff --git a/common.h b/common.h index 78c9ddda..a43c2b85 100644 --- a/common.h +++ b/common.h @@ -232,7 +232,7 @@ typedef struct { double diagnostic_drop_packet_fraction; // pseudo randomly drop this fraction of packets, for // debugging. Currently audio packets only... #ifdef CONFIG_JACK - char *jack_client_name, *jack_left_channel_name, *jack_right_channel_name; + char *jack_client_name; int jack_auto_client_open_interval; // will try to open a client automatically every second int jack_auto_client_disconnect; // will disconnect from the server on end of session if set, // normally clear. diff --git a/scripts/shairport-sync.conf b/scripts/shairport-sync.conf index bf6ce4ba..cb927380 100644 --- a/scripts/shairport-sync.conf +++ b/scripts/shairport-sync.conf @@ -109,8 +109,6 @@ pa = jack = { // client_name = "Shairport Sync"; //Set this to the name of the client that should appear in "Connections" when Shairport Sync is active. -// left_channel_name = "left"; //Set this to the name of the left output port that should appear in "Connections" when Shairport Sync is active. -// right_channel_name = "right"; //Set this to the name of the right output port that should appear in "Connections" when Shairport Sync is active. // auto_client_open_interval = 1; // Set this to the interval in seconds between automatic attempts to open a client on the jack server. Set to zero to disable this behaviour. // auto_client_disconnect = "no"; // Set this to "yes" to close the jack client automatically at then end of a play session. Default is no -- the client stays connected. };