mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
audioconvert: Only use rate_scale when working at DSP rate
In convert mode, we will be resampling directly to the output rate, so don't try to scale to driver rate.
This commit is contained in:
parent
db972b5bc1
commit
e57a01594e
1 changed files with 4 additions and 1 deletions
|
|
@ -2164,7 +2164,10 @@ static uint32_t resample_update_rate_match(struct impl *this, bool passthrough,
|
|||
delay_frac = 0;
|
||||
match_size = size;
|
||||
} else {
|
||||
double rate = this->rate_scale / this->props.rate;
|
||||
/* Only apply rate_scale if we're working in DSP mode (i.e. in driver rate) */
|
||||
double scale = this->dir[SPA_DIRECTION_OUTPUT].mode == SPA_PARAM_PORT_CONFIG_MODE_dsp ?
|
||||
this->rate_scale : 1.0;
|
||||
double rate = scale / this->props.rate;
|
||||
double fdelay;
|
||||
|
||||
if (this->io_rate_match &&
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue