From 0db7c4131b9b1da7a70c845a2ff3e5ab62c67e20 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sat, 18 Aug 2012 17:20:20 -0700 Subject: [PATCH] Hold the device lock with PulseAudio between mixing and writing --- Alc/backends/pulseaudio.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Alc/backends/pulseaudio.c b/Alc/backends/pulseaudio.c index de8a40d0..059f841a 100644 --- a/Alc/backends/pulseaudio.c +++ b/Alc/backends/pulseaudio.c @@ -826,6 +826,7 @@ static ALuint PulseProc(ALvoid *param) } len -= len%update_size; + ALCdevice_Lock(Device); while(len > 0) { size_t newlen = len; @@ -846,6 +847,7 @@ static ALuint PulseProc(ALvoid *param) pa_stream_write(data->stream, buf, newlen, free_func, 0, PA_SEEK_RELATIVE); len -= newlen; } + ALCdevice_Unlock(Device); } while(!data->killNow && Device->Connected); pa_threaded_mainloop_unlock(data->loop); -- 2.11.4.GIT