aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-01-18 19:17:52 +0100
committerMax Kellermann <max@duempel.org>2009-01-18 19:17:52 +0100
commit86f6233f464a6894b2b63faa87e297f99d61a187 (patch)
tree36e6483e6c4f81738500c5a547f5a9932a9683e3 /src
parent70c6cc33f04693c6a2a574541cce076fa84c86a5 (diff)
downloadmpd-86f6233f464a6894b2b63faa87e297f99d61a187.tar.gz
mpd-86f6233f464a6894b2b63faa87e297f99d61a187.tar.xz
mpd-86f6233f464a6894b2b63faa87e297f99d61a187.zip
jack: use audio_output_get_name()
Determine the audio output name with audio_output_get_name() instead of obtaining the name from the configuration again.
Diffstat (limited to '')
-rw-r--r--src/output/jack_plugin.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/src/output/jack_plugin.c b/src/output/jack_plugin.c
index b65ac97ee..8b78d524d 100644
--- a/src/output/jack_plugin.c
+++ b/src/output/jack_plugin.c
@@ -40,7 +40,6 @@ struct jack_data {
struct audio_output *ao;
/* configuration */
- char *name;
char *output_ports[2];
int ringbuffer_size;
@@ -58,7 +57,7 @@ struct jack_data {
static const char *
mpd_jack_name(const struct jack_data *jd)
{
- return jd->name != NULL ? jd->name : "mpd";
+ return audio_output_get_name(jd->ao);
}
static struct jack_data *
@@ -100,8 +99,6 @@ mpd_jack_free(struct jack_data *jd)
mpd_jack_client_free(jd);
- g_free(jd->name);
-
for (unsigned i = 0; i < G_N_ELEMENTS(jd->output_ports); ++i)
g_free(jd->output_ports[i]);
@@ -239,13 +236,6 @@ mpd_jack_init(struct audio_output *ao,
}
}
- if ( (bp = getBlockParam(param, "name"))
- && (strcmp(bp->value, "mpd") != 0) ) {
- jd->name = g_strdup(bp->value);
- g_debug("name=%s", jd->name);
- } else
- jd->name = NULL;
-
return jd;
}