From 40ba9db4066369d77648760b3b6919249e22f519 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sat, 31 Jul 2010 16:07:04 -0700 Subject: Only call Pulse functions from under a lock --- Alc/pulseaudio.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Alc/pulseaudio.c') diff --git a/Alc/pulseaudio.c b/Alc/pulseaudio.c index 92dfc417..c615dc2c 100644 --- a/Alc/pulseaudio.c +++ b/Alc/pulseaudio.c @@ -536,7 +536,6 @@ static ALuint PulseProc(ALvoid *param) ppa_threaded_mainloop_wait(data->loop); continue; } - ppa_threaded_mainloop_unlock(data->loop); while(len > 0) { @@ -552,13 +551,14 @@ static ALuint PulseProc(ALvoid *param) buf = ppa_xmalloc(newlen); free_func = ppa_xfree; } + ppa_threaded_mainloop_unlock(data->loop); aluMixData(Device, buf, newlen/data->frame_size); + + ppa_threaded_mainloop_lock(data->loop); ppa_stream_write(data->stream, buf, newlen, free_func, 0, PA_SEEK_RELATIVE); len -= newlen; } - - ppa_threaded_mainloop_lock(data->loop); } while(Device->Connected && !data->killNow); ppa_threaded_mainloop_unlock(data->loop); -- cgit v1.2.3