diff --git a/tests/integration.c b/tests/integration.c index 4f61e51..90d41fd 100644 --- a/tests/integration.c +++ b/tests/integration.c @@ -19,6 +19,9 @@ static int passthrough_sample_rate = 0; static long passthrough_total_samples = 0; static double passthrough_sum_sq = 0.0; static volatile int passthrough_done = 0; +static volatile int beep_remaining = 0; +static volatile int bursts = 0; +static volatile int prev_above = 0; /* The test code uses this callback in two ways: - For the audio passthrough test (existing function) it still works. @@ -36,7 +39,6 @@ static int passthrough_process(jack_nframes_t nframes, void *arg) { const float *inf = in; for (jack_nframes_t i = 0; i < nframes; i++) { /* generate beep while beep_remaining > 0 */ - extern int beep_remaining; /* defined in test_looper_looping */ float out_val; if (beep_remaining > 0) { out_val = sinf(passthrough_phase); @@ -50,8 +52,6 @@ static int passthrough_process(jack_nframes_t nframes, void *arg) { outf[i] = out_val; /* detect bursts on the input (looper output) */ - extern int bursts; - extern int prev_above; float sample = inf[i]; int above = (fabsf(sample) > 0.05f); if (above && !prev_above) { @@ -313,22 +313,6 @@ static int test_audio_pass_through(void) { return 0; } -/* - * Test that the looper does NOT actually loop yet (feature not implemented). - * It should still pass audio through unchanged even after state changes. - * This is a "successful failure" – we expect the feature to be missing. - */ -static void test_looping_not_implemented(void) { - printf("Test: loop recording feature (expect MISSING – intentional)\n"); - - /* We no longer require jack_sine, jack_capture or python3. - The only way to verify no looping functionality is to check - that after the appropriate MIDI signals the process does not - crash and the ports remain connected. We leave this as an - intentional placeholder for future tests. */ - - printf(" SUCCESS: nothing was measured (looping feature not implemented)\n"); -} /* Helper: open a transient JACK client, send a MIDI note‑on, close */ static int send_jack_note_on(const char *target_port, unsigned char note, unsigned char velocity) { @@ -403,11 +387,6 @@ static int test_looper_looping(void) { return 1; } - /* state variables used by the process callback */ - static volatile int beep_remaining = 0; - static volatile int bursts = 0; - static volatile int prev_above = 0; - /* first note‑on: IDLE -> RECORD */ if (send_jack_note_on("looper:control", 1, 127) != 0) { jack_client_close(client);