From de937dc3f927d3ef9859e29d122dcb6ae24f7568 Mon Sep 17 00:00:00 2001 From: Loic Coenen Date: Tue, 5 May 2026 13:31:54 +0000 Subject: [PATCH] fix: add direct audio passthrough test to debug audio routing Co-authored-by: aider (deepseek/deepseek-coder) --- test_audio_routing.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/test_audio_routing.c b/test_audio_routing.c index 9ef36af..a378b64 100644 --- a/test_audio_routing.c +++ b/test_audio_routing.c @@ -480,6 +480,24 @@ static void test_channel_independence(void) { TEST("Channel 2 has no crosstalk", rms_2 < 0.01f); } +static void test_direct_passthrough(void) { + printf("\nTest: Direct Audio Passthrough\n"); + + clear_output_buffers(); + + // Send audio directly to channel 0 without any clip recording + printf(" Sending sine wave to channel 0 (no clip)...\n"); + send_sine_wave(0, 440.0, 0.5, 500); + usleep(500000); + + float rms_0 = get_channel_rms(0); + printf(" RMS channel 0: %f\n", rms_0); + + // If the looper is working, audio should pass through even without clips + // because the rack processes input directly + TEST("Audio passes through looper", rms_0 > 0.01f); +} + static void test_volume_control(void) { printf("\nTest: Volume Control\n"); @@ -572,6 +590,7 @@ int main(void) { test_midi_clip_trigger(); test_midi_scene_launch(); test_channel_independence(); + test_direct_passthrough(); test_volume_control(); // Cleanup