From 756c0a80c9abdf1df9b08ec244314aaaac5976c2 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Thu, 11 May 2023 19:30:49 +0200 Subject: [PATCH] Emit Xrun in case process-lock cannot be acquired --- libs/ardour/audioengine.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/ardour/audioengine.cc b/libs/ardour/audioengine.cc index 70c6a8b34d..ea14191b2d 100644 --- a/libs/ardour/audioengine.cc +++ b/libs/ardour/audioengine.cc @@ -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? } }