mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-17 08:56:49 -05:00
audioconvert: use target_rate/quantum when starting
When the node is starting and negotiating, use the target_rate and quantum because that is what is going to be used in the next cycle.
This commit is contained in:
parent
045cb95a27
commit
e3cfd73b9e
1 changed files with 3 additions and 3 deletions
|
|
@ -1701,7 +1701,7 @@ static int setup_convert(struct impl *this)
|
||||||
if (!in->have_format || !out->have_format)
|
if (!in->have_format || !out->have_format)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
rate = this->io_position ? this->io_position->clock.rate.denom : DEFAULT_RATE;
|
rate = this->io_position ? this->io_position->clock.target_rate.denom : DEFAULT_RATE;
|
||||||
|
|
||||||
/* in DSP mode we always convert to the DSP rate */
|
/* in DSP mode we always convert to the DSP rate */
|
||||||
if (in->mode == SPA_PARAM_PORT_CONFIG_MODE_dsp)
|
if (in->mode == SPA_PARAM_PORT_CONFIG_MODE_dsp)
|
||||||
|
|
@ -1856,7 +1856,7 @@ static int port_enum_formats(void *object,
|
||||||
SPA_FORMAT_mediaSubtype, SPA_POD_Id(SPA_MEDIA_SUBTYPE_control));
|
SPA_FORMAT_mediaSubtype, SPA_POD_Id(SPA_MEDIA_SUBTYPE_control));
|
||||||
} else {
|
} else {
|
||||||
uint32_t rate = this->io_position ?
|
uint32_t rate = this->io_position ?
|
||||||
this->io_position->clock.rate.denom : DEFAULT_RATE;
|
this->io_position->clock.target_rate.denom : DEFAULT_RATE;
|
||||||
|
|
||||||
*param = spa_pod_builder_add_object(builder,
|
*param = spa_pod_builder_add_object(builder,
|
||||||
SPA_TYPE_OBJECT_Format, SPA_PARAM_EnumFormat,
|
SPA_TYPE_OBJECT_Format, SPA_PARAM_EnumFormat,
|
||||||
|
|
@ -1977,7 +1977,7 @@ impl_node_port_enum_params(void *object, int seq,
|
||||||
/* collect the other port rate */
|
/* collect the other port rate */
|
||||||
dir = &this->dir[SPA_DIRECTION_REVERSE(direction)];
|
dir = &this->dir[SPA_DIRECTION_REVERSE(direction)];
|
||||||
if (dir->mode == SPA_PARAM_PORT_CONFIG_MODE_dsp)
|
if (dir->mode == SPA_PARAM_PORT_CONFIG_MODE_dsp)
|
||||||
orate = this->io_position ? this->io_position->clock.rate.denom : DEFAULT_RATE;
|
orate = this->io_position ? this->io_position->clock.target_rate.denom : DEFAULT_RATE;
|
||||||
else
|
else
|
||||||
orate = dir->format.info.raw.rate;
|
orate = dir->format.info.raw.rate;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue