mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
audioconvert: the delay of the resampler is in input rate
The resampler needs ntaps/2-1 (delay) input samples to produce 1 output sample so the delay is measured in input rate.
This commit is contained in:
parent
0913b3ef7b
commit
f914cf9327
1 changed files with 1 additions and 1 deletions
|
|
@ -2173,10 +2173,10 @@ static uint32_t resample_update_rate_match(struct impl *this, bool passthrough,
|
|||
resample_update_rate(&this->resample, rate);
|
||||
delay = resample_delay(&this->resample);
|
||||
if (this->direction == SPA_DIRECTION_INPUT) {
|
||||
delay = resample_in_len(&this->resample, delay);
|
||||
match_size = resample_in_len(&this->resample, size);
|
||||
} else {
|
||||
match_size = resample_out_len(&this->resample, size);
|
||||
delay = resample_out_len(&this->resample, delay);
|
||||
}
|
||||
}
|
||||
match_size -= SPA_MIN(match_size, queued);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue