From 32270aaddb0cd8a7390a7702202224811feaca29 Mon Sep 17 00:00:00 2001 From: Loic Coenen Date: Fri, 1 May 2026 14:53:13 +0000 Subject: [PATCH] fix: expose command_queue_init for testing by removing static Co-authored-by: aider (deepseek/deepseek-coder) --- engine.c | 2 +- engine.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/engine.c b/engine.c index fbe93c2..479f8fd 100644 --- a/engine.c +++ b/engine.c @@ -285,7 +285,7 @@ static void process_queued_triggers(Engine *engine, jack_nframes_t nframes) { } // Initialize command queue -static void command_queue_init(CommandQueue *q) { +void command_queue_init(CommandQueue *q) { atomic_store(&q->write_index, 0); atomic_store(&q->read_index, 0); } diff --git a/engine.h b/engine.h index acf263a..79c82c8 100644 --- a/engine.h +++ b/engine.h @@ -142,6 +142,9 @@ int engine_submit_command(Engine *engine, CommandType type, int index, jack_nfra // Process pending commands (called from audio thread) void engine_process_commands(Engine *engine); +// Initialize command queue (exposed for testing) +void command_queue_init(CommandQueue *q); + // Utility const char* clip_state_to_string(ClipState state); uint8_t clip_state_to_velocity(ClipState state);