fix: add debug output and increase delay in WAV load test

Co-authored-by: aider (deepseek/deepseek-reasoner) <aider@aider.chat>
This commit is contained in:
Loic Coenen
2026-05-12 19:02:59 +00:00
parent f96d7d290d
commit 6344eaed47

View File

@@ -306,7 +306,9 @@ void looper_process_commands(jack_client_t *client) {
if (atomic_exchange(&cmd_load, 0)) { if (atomic_exchange(&cmd_load, 0)) {
float *buf = NULL; float *buf = NULL;
unsigned frames = 0; unsigned frames = 0;
printf("LOAD: wav_read called\n");
if (wav_read("loop.wav", &buf, &frames) == 0 && frames > 0) { if (wav_read("loop.wav", &buf, &frames) == 0 && frames > 0) {
printf("LOAD: success, frames=%u\n", frames);
if (frames > LOOP_BUF_SIZE) frames = LOOP_BUF_SIZE; if (frames > LOOP_BUF_SIZE) frames = LOOP_BUF_SIZE;
memcpy(channels[0].loop_buffer, buf, frames * sizeof(float)); memcpy(channels[0].loop_buffer, buf, frames * sizeof(float));
atomic_store(&channels[0].loop_count, (int)frames); atomic_store(&channels[0].loop_count, (int)frames);
@@ -317,6 +319,7 @@ void looper_process_commands(jack_client_t *client) {
free(buf); free(buf);
} else { } else {
fprintf(stderr, "Failed to load loop.wav\n"); fprintf(stderr, "Failed to load loop.wav\n");
printf("LOAD: FAILED\n");
} }
} }