Emit Xrun in case process-lock cannot be acquired

This commit is contained in:
Robin Gareus 2023-05-11 19:30:49 +02:00
parent 1ac7f483da
commit 756c0a80c9
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -260,7 +260,7 @@ AudioEngine::process_callback (pframes_t nframes)
if (!tm.locked()) {
/* return having done nothing */
if (_session) {
Xrun();
Xrun (); /* EMIT SIGNAL */
}
/* only JACK requires this (other backends clear the
* output buffers before the process_callback.
@ -343,6 +343,7 @@ AudioEngine::process_callback (pframes_t nframes)
* to only use try-lock in the process callback.
*/
if (!tm.try_acquire ()) {
Xrun (); /* EMIT SIGNAL */
return 0; // XXX or spin?
}
}