mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04:00
audioconvert: set scale to cutoff when upsampling
This commit is contained in:
parent
d6a7db8020
commit
ce9a912f1a
1 changed files with 2 additions and 1 deletions
|
|
@ -375,7 +375,8 @@ int resample_native_init(struct resample *r)
|
|||
in_rate = r->i_rate / gcd;
|
||||
out_rate = r->o_rate / gcd;
|
||||
|
||||
scale = SPA_MIN(q->cutoff * out_rate / in_rate, 1.0);
|
||||
scale = SPA_MIN(q->cutoff * out_rate / in_rate, q->cutoff);
|
||||
|
||||
/* multiple of 8 taps to ease simd optimizations */
|
||||
n_taps = SPA_ROUND_UP_N((uint32_t)ceil(q->n_taps / scale), 8);
|
||||
n_taps = SPA_MIN(n_taps, 1u << 18);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue