fix: add missing stdarg.h include and jack_midi_send availability check
Co-authored-by: aider (deepseek/deepseek-reasoner) <aider@aider.chat>
This commit is contained in:
@@ -4,6 +4,7 @@
|
|||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <stdarg.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Integration test for the JACK looper.
|
* Integration test for the JACK looper.
|
||||||
@@ -52,6 +53,14 @@ int main(void) {
|
|||||||
printf("Waiting for looper (pid %d) to register ports...\n", (int)pid);
|
printf("Waiting for looper (pid %d) to register ports...\n", (int)pid);
|
||||||
sleep(3); /* generous, JACK ports must be visible */
|
sleep(3); /* generous, JACK ports must be visible */
|
||||||
|
|
||||||
|
/* check jack_midi_send availability */
|
||||||
|
if (system("which jack_midi_send >/dev/null 2>&1") != 0) {
|
||||||
|
fprintf(stderr, "FATAL: jack_midi_send not available (install jack‑tools)\n");
|
||||||
|
kill(pid, SIGTERM);
|
||||||
|
waitpid(pid, NULL, 0);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
/* 3. send note‑on messages (toggle state machine) */
|
/* 3. send note‑on messages (toggle state machine) */
|
||||||
printf("Sending first note‑on → IDLE → RECORD\n");
|
printf("Sending first note‑on → IDLE → RECORD\n");
|
||||||
run_cmd("jack_midi_send -c looper:control -m '90 01 7f' 2>/dev/null || echo 'jack_midi_send not available'");
|
run_cmd("jack_midi_send -c looper:control -m '90 01 7f' 2>/dev/null || echo 'jack_midi_send not available'");
|
||||||
|
|||||||
Reference in New Issue
Block a user