fix: use pointer to dispatcher state in process callback for real-time access

Co-authored-by: aider (deepseek/deepseek-coder) <aider@aider.chat>
This commit is contained in:
Loic Coenen
2026-05-04 22:25:33 +00:00
parent 4eed81ae06
commit d4ba1589ff
4 changed files with 18 additions and 5 deletions

View File

@@ -210,6 +210,11 @@ void dispatcher_stop(void);
// Get current state (thread-safe snapshot)
void dispatcher_get_state(AppState *out);
// Get pointer to dispatcher's state (for real-time threads that can't block)
// WARNING: This is NOT thread-safe. Only use in JACK process callback
// which is serialized per client.
AppState* dispatcher_get_state_ptr(void);
// ============================================================
// Reducer - pure function
// ============================================================