From f42f655ea91b50ed60916880271e320d398debe3 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sun, 12 Aug 2012 03:52:38 -0700 Subject: [PATCH] Don't unlock the pulseaudio mainloop when mixing Lock contention could cause a lengthy delay between mixing and writing the audio. There shouldn't be any risk of dead-locking as the device lock should never be held when the mainloop gets locked. --- Alc/backends/pulseaudio.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/Alc/backends/pulseaudio.c b/Alc/backends/pulseaudio.c index 21954699..2621e334 100644 --- a/Alc/backends/pulseaudio.c +++ b/Alc/backends/pulseaudio.c @@ -837,11 +837,9 @@ static ALuint PulseProc(ALvoid *param) buf = pa_xmalloc(newlen); free_func = pa_xfree; } - pa_threaded_mainloop_unlock(data->loop); aluMixData(Device, buf, newlen/frame_size); - pa_threaded_mainloop_lock(data->loop); pa_stream_write(data->stream, buf, newlen, free_func, 0, PA_SEEK_RELATIVE); len -= newlen; } -- 2.11.4.GIT