mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-12 13:30:15 -05:00
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:
parent
f31504fdc9
commit
aef595b5bf
2 changed files with 17 additions and 18 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue