From 8a238de55141e47b96427bbe5e8aeb8aee923e39 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sun, 1 Dec 2024 23:24:38 +0100 Subject: [PATCH] Add API to check if thread-local buffers are available --- libs/ardour/ardour/process_thread.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libs/ardour/ardour/process_thread.h b/libs/ardour/ardour/process_thread.h index a4ca646d4b..e7c686354e 100644 --- a/libs/ardour/ardour/process_thread.h +++ b/libs/ardour/ardour/process_thread.h @@ -42,6 +42,10 @@ public: void get_buffers (); void drop_buffers (); + static bool have_thread_buffers () { + return 0 != _private_thread_buffers.get (); + } + /* these MUST be called by a process thread's thread, nothing else */ static BufferSet& get_silent_buffers (ChanCount count = ChanCount::ZERO);