From d51a1330f6027619c5b34deaa17a7031a4bf5b52 Mon Sep 17 00:00:00 2001 From: PA Dev Bot <344001113+pa-devbot@users.noreply.github.com> Date: Sat, 17 Oct 2026 17:13:58 +0000 Subject: [PATCH 1/2] AudioResampler: default to 32 taps. 16 taps is a fairly aggressive truncation of the ideal sinc window; 32 taps is still cheap (the kernels are tap-count agnostic, the cost is one weight table row per tap) and measurably closer to the ideal filter for the sample rates this node targets. --- .../Source/Kernels/AudioResampler/Kernels_AudioResampler.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SerialPrograms/Source/Kernels/AudioResampler/Kernels_AudioResampler.h b/SerialPrograms/Source/Kernels/AudioResampler/Kernels_AudioResampler.h index 45ec31c4b3..be8545aa92 100644 --- a/SerialPrograms/Source/Kernels/AudioResampler/Kernels_AudioResampler.h +++ b/SerialPrograms/Source/Kernels/AudioResampler/Kernels_AudioResampler.h @@ -39,7 +39,7 @@ class AudioResampler : public AudioPipeline::WorkingAudioStreamListener{ size_t out_sample_rate, size_t channels, size_t buffer_size = 4096 + 256, // 4k + break super-alignment - uint32_t taps = 16, + uint32_t taps = 32, double beta = 9.0 ); From 338a637be477ae49c94cf957b7d87816ad77c2ee Mon Sep 17 00:00:00 2001 From: PA Dev Bot <344001113+pa-devbot@users.noreply.github.com> Date: Sat, 17 Oct 2026 17:13:58 +0000 Subject: [PATCH 2/2] AudioResampler: test tap counts from 1 to 64. Stream tests: a 1/2/3/4/5/8/32/48/63/64 sweep on the 1:1 combo (counts below the kernels' tap blocks are zero padded, odd counts exercise the unrolls' final partial group, wide counts stress the carry sizing and Kaiser window width) plus taps 1 and 64 on the strongest upsampling combo, where the tap count dominates the next block's input requirement. Dispatch tests: taps 1, 32, 64 across the kernel families. Default-kernel ULP tests: taps 1 and 64 alongside the standard 16. --- .../Kernels_AudioResampler_Tests.cpp | 30 ++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/SerialPrograms/Source/Kernels/AudioResampler/Kernels_AudioResampler_Tests.cpp b/SerialPrograms/Source/Kernels/AudioResampler/Kernels_AudioResampler_Tests.cpp index 9c68b4c505..e77e5827fa 100644 --- a/SerialPrograms/Source/Kernels/AudioResampler/Kernels_AudioResampler_Tests.cpp +++ b/SerialPrograms/Source/Kernels/AudioResampler/Kernels_AudioResampler_Tests.cpp @@ -443,6 +443,20 @@ void add_tests(UnitTestDatabase& database){ ); } + // A spread of tap counts across the supported range on the 1:1 combo + // (16 taps is the first combo above): counts below the kernels' tap + // blocks are zero padded, odd counts exercise the unrolls' final + // partial group, and the wide counts stress the carry sizing and the + // Kaiser window width. + const uint32_t sweep_taps[] = { 1, 2, 3, 4, 5, 8, 32, 48, 63, 64 }; + for (uint32_t taps : sweep_taps){ + database.add(44100, 44100, 1, 4000, 100, taps, 9.0); + } + // Degenerate and wide tap counts on the strongest upsampling combo, + // where the tap count dominates the next block's input requirement. + database.add(8000, 44100, 1, 4000, 100, 1, 9.0); + database.add(8000, 44100, 1, 4000, 100, 64, 9.0); + // Dispatch choices across rate ratios, with a spread of tap counts // for the table itself. Odd tap counts exercise the unrolls' final // partial group reading the table's zero padded rows. @@ -460,6 +474,11 @@ void add_tests(UnitTestDatabase& database){ { 44100, 22050, 8 }, { 90000, 20000, 4 }, { 8000, 44100, 3 }, + // The tap extremes across the kernel families. + { 44100, 44100, 1 }, + { 44100, 48000, 64 }, + { 88200, 44100, 32 }, + { 128000, 8000, 64 }, }; for (auto& combo : dispatch_combos){ database.add( @@ -467,11 +486,20 @@ void add_tests(UnitTestDatabase& database){ ); } - // The Default kernel doubles as the reference for the SIMD variants. + // The Default kernel doubles as the reference for the SIMD variants, + // with the tap extremes alongside the standard count. + database.add( + "Default", run_block8_Default, + 48000, 44100, 1, 8, 1, 0 + ); database.add( "Default", run_block8_Default, 48000, 44100, 16, 8, 1, 0 ); + database.add( + "Default", run_block8_Default, + 48000, 44100, 64, 8, 1, 0 + ); // The block straddles the table period (147) into the continuing // index columns. database.add(