From 209d09ae1347974142abb07d67efc80702e1e8b5 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Mon, 19 Nov 2012 16:50:03 -0800 Subject: Avoid locking PulseAudio's mainloop when starting and stopping capture The mainloop is already locked by the caller, and double-locking interferes with the subsequent wait. --- Alc/backends/pulseaudio.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'Alc/backends/pulseaudio.c') diff --git a/Alc/backends/pulseaudio.c b/Alc/backends/pulseaudio.c index 55df219f..af44e3de 100644 --- a/Alc/backends/pulseaudio.c +++ b/Alc/backends/pulseaudio.c @@ -1288,10 +1288,8 @@ static void pulse_start_capture(ALCdevice *device) pulse_data *data = device->ExtraData; pa_operation *o; - pa_threaded_mainloop_lock(data->loop); o = pa_stream_cork(data->stream, 0, stream_success_callback, device); wait_for_operation(o, data->loop); - pa_threaded_mainloop_unlock(data->loop); } static void pulse_stop_capture(ALCdevice *device) @@ -1299,10 +1297,8 @@ static void pulse_stop_capture(ALCdevice *device) pulse_data *data = device->ExtraData; pa_operation *o; - pa_threaded_mainloop_lock(data->loop); o = pa_stream_cork(data->stream, 1, stream_success_callback, device); wait_for_operation(o, data->loop); - pa_threaded_mainloop_unlock(data->loop); } static ALCenum pulse_capture_samples(ALCdevice *device, ALCvoid *buffer, ALCuint samples) -- cgit v1.2.3