13
0

PA-backend: Flush buffer and wake up main thread at stop

This commit is contained in:
Robin Gareus 2019-07-26 21:38:40 +02:00
parent 0717c4c71a
commit 8a969b56c9
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -649,6 +649,10 @@ PulseAudioBackend::stop ()
}
_run = false;
pa_threaded_mainloop_lock (p_mainloop);
sync_pulse (pa_stream_flush (p_stream, stream_operation_cb, this));
if (pthread_join (_main_thread, &status)) {
PBD::error << _("PulseAudioBackend: failed to terminate.") << endmsg;
return -1;