Iterate PulseAudio mainLoop and wait for context state (#3216)

* Iterate PulseAudio mainLoop and wait for context state

* Fixed indentation
This commit is contained in:
fholmer
2017-02-05 19:14:50 +01:00
committed by Tres Finocchiaro
parent 54d0922cea
commit c10af18c1b

View File

@@ -227,7 +227,9 @@ void AudioPulseAudio::run()
// connect the context
pa_context_connect( context, NULL, (pa_context_flags) 0, NULL );
m_connectedSemaphore.acquire();
while (!m_connectedSemaphore.tryAcquire()) {
pa_mainloop_iterate(mainLoop, 1, NULL);
}
// run the main loop
if( m_connected )