From d86e3f6dade53d5ca3b23a5c72c550b8f0583f91 Mon Sep 17 00:00:00 2001 From: Andrew Opalach Date: Fri, 3 Jan 2025 16:53:06 -0500 Subject: Audio buffer, mixer and sink improvements Signed-off-by: Andrew Opalach --- src/util/queue.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/util') diff --git a/src/util/queue.h b/src/util/queue.h index 1d788cb..bd91342 100644 --- a/src/util/queue.h +++ b/src/util/queue.h @@ -9,6 +9,18 @@ struct nn_mutex mutex; \ } +#define camu_queue_lock(q) \ +AL_MACRO_WRAP \ +({ \ + nn_mutex_lock(&(q).mutex); \ +}) + +#define camu_queue_unlock(q) \ +AL_MACRO_WRAP \ +({ \ + nn_mutex_unlock(&(q).mutex); \ +}) + #define camu_queue_size(q, r) \ AL_MACRO_WRAP \ ({ \ -- cgit v1.2.3-101-g0448