PulseAudio: spin waiting for enough capacity to write
pa_threaded_mainloop_wait might wake up for several reasons. And there is no point (but possibly harm) in moving on before we have verified that PA actually is ready to receive our write without overflow.
This commit is contained in:
parent
27a2bf1f59
commit
06b3d5ba33
@ -1040,7 +1040,7 @@ PulseAudioBackend::main_process_thread ()
|
||||
pa_threaded_mainloop_lock (p_mainloop);
|
||||
|
||||
size_t bytes_to_write = sizeof (float) * _samples_per_period * N_CHANNELS;
|
||||
if (pa_stream_writable_size (p_stream) < bytes_to_write) {
|
||||
while (pa_stream_writable_size (p_stream) < bytes_to_write) {
|
||||
/* wait until stream_request_cb triggers */
|
||||
pa_threaded_mainloop_wait (p_mainloop);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user