4-implement-scene-switching-engine #4

Merged
boomjacky merged 16 commits from 4-implement-scene-switching-engine into master 2026-05-13 12:51:04 -04:00
Showing only changes of commit 4dfb7a87c1 - Show all commits

View File

@@ -337,21 +337,24 @@ int process_callback(jack_nframes_t nframes, void *arg) {
switch (msg) { switch (msg) {
case 0xFA: { case 0xFA: {
struct channel_t *cur = atomic_load(&channels); struct channel_t *cur = atomic_load(&channels);
int s = atomic_load(&cur[0].state); int sc_idx = cur[0].current_scene;
int s = atomic_load(&cur[0].scenes[sc_idx].state);
if (s == STATE_IDLE) if (s == STATE_IDLE)
atomic_store(&cur[0].state, STATE_RECORD); atomic_store(&cur[0].scenes[sc_idx].state, STATE_RECORD);
break; break;
} }
case 0xFC: { case 0xFC: {
struct channel_t *cur = atomic_load(&channels); struct channel_t *cur = atomic_load(&channels);
atomic_store(&cur[0].state, STATE_IDLE); int sc_idx = cur[0].current_scene;
atomic_store(&cur[0].scenes[sc_idx].state, STATE_IDLE);
break; break;
} }
case 0xFB: { case 0xFB: {
struct channel_t *cur = atomic_load(&channels); struct channel_t *cur = atomic_load(&channels);
int s = atomic_load(&cur[0].state); int sc_idx = cur[0].current_scene;
int s = atomic_load(&cur[0].scenes[sc_idx].state);
if (s == STATE_PAUSED) if (s == STATE_PAUSED)
atomic_store(&cur[0].state, STATE_LOOPING); atomic_store(&cur[0].scenes[sc_idx].state, STATE_LOOPING);
break; break;
} }
default: default: