resample: avoid calculating GCD in rate updates

We don't actually need to calculate the GCD for each resampler rate
update. The GCD is only used to scale the in/out rates when using the
full resampler and this we can cache and reuse when we did the setup.

The interpolating resampler can work perfectly fine with a GCD of 1 and
so we can just assume that.
This commit is contained in:
Wim Taymans 2025-07-23 12:23:20 +02:00
parent 4a22b53b74
commit f04e8164a6
2 changed files with 17 additions and 18 deletions

View file

@ -34,6 +34,7 @@ struct native_data {
uint32_t frac;
uint32_t filter_stride;
uint32_t filter_stride_os;
uint32_t gcd;
uint32_t hist;
float **history;
resample_func_t func;