mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-02-20 01:40:28 -05:00
resample: keep fractional part of in_rate when interpolating
When interpolating with rate correction != 1.0, don't floor the resulting input rate to the nearest smallest integer. This allows rate corrections < 1/in_rate to have some effect, and reduces jumps in the response. One of the jumps is inconveniently between rate=1.0 and rate=1.0+eps and will cause rate corrections to oscillate if target rate varies close to 1.0.
This commit is contained in:
parent
244d5a1cc1
commit
847982eb0e
2 changed files with 11 additions and 10 deletions
|
|
@ -39,7 +39,7 @@ struct native_data {
|
|||
double rate;
|
||||
uint32_t n_taps;
|
||||
uint32_t n_phases;
|
||||
uint32_t in_rate;
|
||||
struct fixp in_rate;
|
||||
uint32_t out_rate;
|
||||
struct fixp phase;
|
||||
float pm;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue