feat: add logging system, orchestrator, and documentation
This commit is contained in:
@@ -85,7 +85,7 @@ static int global_sample_rate = 0;
|
||||
/* execute a single command (called from looper_process_commands) */
|
||||
static void exec_command(command_t cmd, jack_client_t *client) {
|
||||
int ch = cmd.channel;
|
||||
if (ch < 0)
|
||||
if (ch < 0 || ch >= MAX_CHANNELS)
|
||||
ch = 0;
|
||||
|
||||
switch (cmd.type) {
|
||||
@@ -569,8 +569,10 @@ void looper_process_commands(jack_client_t *client) {
|
||||
wav_write("save.wav", data, (unsigned)lc, sr);
|
||||
free(data);
|
||||
}
|
||||
/* Reactivate channel */
|
||||
/* Reactivate channel – use a shorter sleep to reduce xrun risk */
|
||||
if (was_active) {
|
||||
struct timespec req = {.tv_sec = 0, .tv_nsec = 200000000}; /* 200 ms */
|
||||
nanosleep(&req, NULL);
|
||||
atomic_store(&channels[0].active, 1);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user