From 7e9866844f4e24fe03d7f36259808b0408a58bf4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Mon, 4 Nov 2024 16:54:34 +0000 Subject: [PATCH] audioresample: skip pointless loop in broken test_fft unit test Variable f1 is never used, so just skip that loop for now. The test has never actually tested actual resampling because of that bug it seems, and the test fails if fixed to actually resample. For now we just avoid the pointless 126*12 pipelines that were just testing the same thing (nothing) over and over again. Part-of: --- .../gst-plugins-base/tests/check/elements/audioresample.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/subprojects/gst-plugins-base/tests/check/elements/audioresample.c b/subprojects/gst-plugins-base/tests/check/elements/audioresample.c index 96b364c974..815f28f9f8 100644 --- a/subprojects/gst-plugins-base/tests/check/elements/audioresample.c +++ b/subprojects/gst-plugins-base/tests/check/elements/audioresample.c @@ -1216,14 +1216,17 @@ run_fft_pipeline (int inrate, int outrate, int quality, int width, GST_START_TEST (test_fft) { int quality; - size_t f0, f1; + size_t f0; static const int frequencies[] = { 8000, 16000, 44100, 48000, 128000, 12345, 54321 }; /* audioresample uses a mixed float/double code path for floats with quality>8, make sure we test it */ for (quality = 0; quality <= 10; quality += 5) { for (f0 = 0; f0 < G_N_ELEMENTS (frequencies); ++f0) { - for (f1 = 0; f1 < G_N_ELEMENTS (frequencies); ++f1) { + // FIXME: actually use f1, currently we just test without resampling! + // (Needs fixes somewhere though because the test fails if fixed) + // for (size_t f1 = 0; f1 < G_N_ELEMENTS (frequencies); ++f1) + { run_fft_pipeline (frequencies[f0], frequencies[f0], quality, 32, GST_AUDIO_NE (F32), &init_float_silence, &compare_ffts_F32); run_fft_pipeline (frequencies[f0], frequencies[f0], quality, 32,