aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJ. Alexander Treuman <jat@spatialrift.net>2006-07-14 20:39:18 +0000
committerJ. Alexander Treuman <jat@spatialrift.net>2006-07-14 20:39:18 +0000
commitfdf1afc8b3c4916e77fd12726fdcd4d90b40706d (patch)
tree73b3d757167ce7f679966548a384bdc0cd5100c6 /src
parentb4945959abe26d2cd748417880cc796d97577260 (diff)
downloadmpd-fdf1afc8b3c4916e77fd12726fdcd4d90b40706d.tar.gz
mpd-fdf1afc8b3c4916e77fd12726fdcd4d90b40706d.tar.xz
mpd-fdf1afc8b3c4916e77fd12726fdcd4d90b40706d.zip
Use audio_output { name } for the stream name in PulseAudio, but do it The Right Way
git-svn-id: https://svn.musicpd.org/mpd/trunk@4342 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r--src/audioOutputs/audioOutput_pulse.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/audioOutputs/audioOutput_pulse.c b/src/audioOutputs/audioOutput_pulse.c
index 684914771..08f2f3f46 100644
--- a/src/audioOutputs/audioOutput_pulse.c
+++ b/src/audioOutputs/audioOutput_pulse.c
@@ -33,7 +33,6 @@
typedef struct _PulseData {
char * server;
char * sink;
- char * name;
pa_simple * s;
} PulseData;
@@ -44,7 +43,6 @@ static PulseData * newPulseData()
ret = malloc(sizeof(PulseData));
ret->server = NULL;
ret->sink = NULL;
- ret->name = NULL;
ret->s = NULL;
return ret;
}
@@ -53,7 +51,6 @@ static void freePulseData(PulseData * ad)
{
if (ad->server) free(ad->server);
if (ad->sink) free(ad->sink);
- if (ad->name) free(ad->name);
free(ad);
}
@@ -61,19 +58,16 @@ static int pulse_initDriver(AudioOutput * audioOutput, ConfigParam * param)
{
BlockParam * server = NULL;
BlockParam * sink = NULL;
- BlockParam * name = NULL;
PulseData * ad;
if (param) {
server = getBlockParam(param, "server");
sink = getBlockParam(param, "sink");
- name = getBlockParam(param, "name");
}
ad = newPulseData();
ad->server = server ? strdup(server->value) : NULL;
ad->sink = sink ? strdup(sink->value) : NULL;
- ad->name = strdup(name->value);
audioOutput->data = ad;
return 0;
@@ -128,7 +122,8 @@ static int pulse_openDevice(AudioOutput * audioOutput)
ss.channels = audioFormat->channels;
ad->s = pa_simple_new(ad->server, MPD_PULSE_NAME, PA_STREAM_PLAYBACK,
- ad->sink, ad->name, &ss, NULL, NULL, &error);
+ ad->sink, audioOutput->name, &ss, NULL, NULL,
+ &error);
if (!ad->s) {
ERROR("Cannot connect to server in PulseAudio output " \
"\"%s\": %s\n", audioOutput->name, pa_strerror(error));