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.

This commit is contained in:
Jörn Nettingsmeier
2019-02-15 19:29:24 +00:00
parent 89a8add7af
commit 0b589cbe6d
3 changed files with 3 additions and 17 deletions
+2 -14
View File
@@ -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)