diff options
author | waker <wakeroid@gmail.com> | 2011-04-01 19:47:00 +0200 |
---|---|---|
committer | waker <wakeroid@gmail.com> | 2011-04-01 19:47:00 +0200 |
commit | c91ffdcf2b53871e88bfdd15f6572b102bcb532e (patch) | |
tree | 1b4246c6c0a225e807f5b3defe1fbc4e7fa4acc8 /plugins/pulse | |
parent | fc076fa1fb5e0a9f91c121564c9b58376f80a2fb (diff) |
pulseaudio compile fix
Diffstat (limited to 'plugins/pulse')
-rw-r--r-- | plugins/pulse/pulse.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/plugins/pulse/pulse.c b/plugins/pulse/pulse.c index 3a6eacbd..9a08ff08 100644 --- a/plugins/pulse/pulse.c +++ b/plugins/pulse/pulse.c @@ -126,13 +126,6 @@ static int pulse_set_spec(ddb_waveformat_t *fmt) pa_simple_free(s); } - // Read serveraddr from config - const char * server = deadbeef->conf_get_str(CONFSTR_PULSE_SERVERADDR, NULL); - - if (server) { - server = strcmp(server, "default") ? server : NULL; - } - pa_buffer_attr * attr = NULL; //attr->maxlength = Maximum length of the buffer. //attr->tlength = Playback only: target length of the buffer. @@ -147,7 +140,17 @@ static int pulse_set_spec(ddb_waveformat_t *fmt) int error; + // Read serveraddr from config + deadbeef->conf_lock (); + const char * server = deadbeef->conf_get_str_fast (CONFSTR_PULSE_SERVERADDR, NULL); + + if (server) { + server = strcmp(server, "default") ? server : NULL; + } + s = pa_simple_new(server, "Deadbeef", PA_STREAM_PLAYBACK, dev, "Music", &ss, &channel_map, attr, &error); + deadbeef->conf_unlock (); + if (!s) { trace ("pulse_init failed (%d)\n", error); |