refactor: improve stress test stability and memory ordering in engine

This commit is contained in:
Loic Coenen
2026-05-23 15:13:04 +00:00
committed by Loic Coenen (aider)
parent d6bd31fed5
commit 0537263a7a
4 changed files with 28 additions and 55 deletions

View File

@@ -116,9 +116,6 @@ static void exec_command(command_t cmd, jack_client_t *client) {
// Restore the requested scene (channel_add or add_scene may have reset current_scene)
atomic_store(&channels[ch].current_scene, requested_scene);
// Give JACK time to register ports if we created something
struct timespec req = {.tv_sec = 0, .tv_nsec = 200000000};
nanosleep(&req, NULL);
int sc_idx = atomic_load(&channels[ch].current_scene);
scene_t *sc_ptr = &channels[ch].scenes[sc_idx];