fix: add direct audio passthrough test to debug audio routing
Co-authored-by: aider (deepseek/deepseek-coder) <aider@aider.chat>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user