summaryrefslogtreecommitdiff
path: root/plugins/pulse
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-08-25 21:02:30 +0200
committerGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-08-25 21:02:30 +0200
commit1d1abcf227fc7a412da84b4e7d0484933ee3eb3e (patch)
treec82752f6623287592859c2000f415065db60d76d /plugins/pulse
parentf947948d8db225ec89cb219c611f20b9f98c51cb (diff)
don't keep pulseaudio mutex locked all the time
Diffstat (limited to 'plugins/pulse')
-rw-r--r--plugins/pulse/pulse.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/plugins/pulse/pulse.c b/plugins/pulse/pulse.c
index ffb92b07..266ea107 100644
--- a/plugins/pulse/pulse.c
+++ b/plugins/pulse/pulse.c
@@ -220,13 +220,12 @@ static void pulse_thread(void *context)
}
char buf[buffer_size];
- deadbeef->mutex_lock(mutex);
pulse_callback (buf, sizeof (buf));
int error;
+ deadbeef->mutex_lock(mutex);
int res = pa_simple_write(s, buf, sizeof (buf), &error);
deadbeef->mutex_unlock(mutex);
- usleep (1000);
if (res < 0)
{