aboutsummaryrefslogtreecommitdiffstats
path: root/src/output/jack_output_plugin.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/output/jack_output_plugin.c')
-rw-r--r--src/output/jack_output_plugin.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/output/jack_output_plugin.c b/src/output/jack_output_plugin.c
index 5b8926f0f..b099cdb9e 100644
--- a/src/output/jack_output_plugin.c
+++ b/src/output/jack_output_plugin.c
@@ -50,6 +50,8 @@ struct jack_data {
const char *name;
+ const char *server_name;
+
/* configuration */
char *source_ports[MAX_PORTS];
@@ -200,7 +202,8 @@ mpd_jack_connect(struct jack_data *jd, GError **error_r)
jd->shutdown = false;
- jd->client = jack_client_open(jd->name, jd->options, &status);
+ jd->client = jack_client_open(jd->name, jd->options, &status,
+ jd->server_name);
if (jd->client == NULL) {
g_set_error(error_r, jack_output_quark(), 0,
"Failed to connect to JACK server, status=%d",
@@ -281,6 +284,10 @@ mpd_jack_init(G_GNUC_UNUSED const struct audio_format *audio_format,
care about the JackUseExactName option */
jd->name = "Music Player Daemon";
+ jd->server_name = config_get_block_string(param, "server_name", NULL);
+ if (jd->server_name != NULL)
+ jd->options |= JackServerName;
+
if (!config_get_block_bool(param, "autostart", false))
jd->options |= JackNoStartServer;