aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-11-07 17:26:21 +0100
committerMax Kellermann <max@duempel.org>2009-11-07 17:26:21 +0100
commit375fd5ed4c33343a82f9e7b728c720e396431e5d (patch)
treee7b9ea0e5b07624e7947cf3f8f79d6ef01ec4879
parentec25cda68bf4f71de24c067775660781d885843c (diff)
downloadmpd-375fd5ed4c33343a82f9e7b728c720e396431e5d.tar.gz
mpd-375fd5ed4c33343a82f9e7b728c720e396431e5d.tar.xz
mpd-375fd5ed4c33343a82f9e7b728c720e396431e5d.zip
output/jack: added option "server_name"
-rw-r--r--NEWS2
-rw-r--r--doc/user.xml9
-rw-r--r--src/output/jack_output_plugin.c9
3 files changed, 18 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index a920d5015..d68d51ca5 100644
--- a/NEWS
+++ b/NEWS
@@ -36,7 +36,7 @@ ver 0.16 (20??/??/??)
- jack: require libjack 0.100
- jack: don't disconnect during pause
- jack: connect to server on MPD startup
- - jack: added option "client_name"
+ - jack: added options "client_name", "server_name"
- jack: clear ring buffers before activating
- jack: renamed option "ports" to "destination_ports"
- jack: support more than two audio channels
diff --git a/doc/user.xml b/doc/user.xml
index aabbd33f6..21f9e9d3d 100644
--- a/doc/user.xml
+++ b/doc/user.xml
@@ -747,6 +747,15 @@ cd mpd-version</programlisting>
</row>
<row>
<entry>
+ <varname>server_name</varname>
+ <parameter>NAME</parameter>
+ </entry>
+ <entry>
+ Optional name of the JACK server.
+ </entry>
+ </row>
+ <row>
+ <entry>
<varname>autostart</varname>
<parameter>yes|no</parameter>
</entry>
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;