From d8a7a794d3e089c03c3c19b562a04be1c9293fad Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Thu, 3 Sep 2015 09:35:37 -0700 Subject: [PATCH] PulseAudio: fix microphone regression introduced by adb3cd88ee6 --- src/pulseaudio.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/pulseaudio.cpp b/src/pulseaudio.cpp index 9c9231f..dfad82e 100644 --- a/src/pulseaudio.cpp +++ b/src/pulseaudio.cpp @@ -929,13 +929,6 @@ static int instream_open_pa(SoundIoPrivate *si, SoundIoInStreamPrivate *is) { ispa->buffer_attr.fragsize = buffer_length; } - int err; - pa_operation *update_timing_info_op = pa_stream_update_timing_info(ispa->stream, timing_update_callback, si); - if ((err = perform_operation(si, update_timing_info_op))) { - pa_threaded_mainloop_unlock(sipa->main_loop); - return err; - } - pa_threaded_mainloop_unlock(sipa->main_loop); return 0; @@ -962,6 +955,13 @@ static int instream_start_pa(SoundIoPrivate *si, SoundIoInStreamPrivate *is) { while (!ispa->stream_ready) pa_threaded_mainloop_wait(sipa->main_loop); + pa_operation *update_timing_info_op = pa_stream_update_timing_info(ispa->stream, timing_update_callback, si); + if ((err = perform_operation(si, update_timing_info_op))) { + pa_threaded_mainloop_unlock(sipa->main_loop); + return err; + } + + pa_threaded_mainloop_unlock(sipa->main_loop); return 0; }