mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-03-14 05:34:06 -04:00
adapter: Improve convert setup
Always do configure_convert, even when the passthrough state didn't change, for example when going from none to convert.
This commit is contained in:
parent
1adc9e5445
commit
da69bddb95
2 changed files with 19 additions and 22 deletions
|
|
@ -750,18 +750,17 @@ static int reconfigure_mode(struct impl *this, enum spa_param_port_config_mode m
|
||||||
|
|
||||||
this->mode = mode;
|
this->mode = mode;
|
||||||
|
|
||||||
if (old_passthrough != passthrough) {
|
if (old_passthrough != passthrough && passthrough) {
|
||||||
if (passthrough) {
|
/* add follower ports */
|
||||||
/* add follower ports */
|
spa_zero(l);
|
||||||
spa_zero(l);
|
spa_node_add_listener(this->follower, &l, &follower_node_events, this);
|
||||||
spa_node_add_listener(this->follower, &l, &follower_node_events, this);
|
spa_hook_remove(&l);
|
||||||
spa_hook_remove(&l);
|
} else {
|
||||||
} else {
|
/* add converter ports */
|
||||||
/* add converter ports */
|
configure_convert(this, mode);
|
||||||
configure_convert(this, mode);
|
|
||||||
}
|
|
||||||
link_io(this);
|
|
||||||
}
|
}
|
||||||
|
link_io(this);
|
||||||
|
|
||||||
this->info.change_mask |= SPA_NODE_CHANGE_MASK_FLAGS | SPA_NODE_CHANGE_MASK_PARAMS;
|
this->info.change_mask |= SPA_NODE_CHANGE_MASK_FLAGS | SPA_NODE_CHANGE_MASK_PARAMS;
|
||||||
SPA_FLAG_CLEAR(this->info.flags, SPA_NODE_FLAG_NEED_CONFIGURE);
|
SPA_FLAG_CLEAR(this->info.flags, SPA_NODE_FLAG_NEED_CONFIGURE);
|
||||||
SPA_FLAG_UPDATE(this->info.flags, SPA_NODE_FLAG_ASYNC,
|
SPA_FLAG_UPDATE(this->info.flags, SPA_NODE_FLAG_ASYNC,
|
||||||
|
|
|
||||||
|
|
@ -757,18 +757,16 @@ static int reconfigure_mode(struct impl *this, enum spa_param_port_config_mode m
|
||||||
|
|
||||||
this->mode = mode;
|
this->mode = mode;
|
||||||
|
|
||||||
if (old_passthrough != passthrough) {
|
if (old_passthrough != passthrough && passthrough) {
|
||||||
if (passthrough) {
|
/* add follower ports */
|
||||||
/* add follower ports */
|
spa_zero(l);
|
||||||
spa_zero(l);
|
spa_node_add_listener(this->follower, &l, &follower_node_events, this);
|
||||||
spa_node_add_listener(this->follower, &l, &follower_node_events, this);
|
spa_hook_remove(&l);
|
||||||
spa_hook_remove(&l);
|
} else {
|
||||||
} else {
|
configure_convert(this, mode);
|
||||||
/* add converter ports */
|
|
||||||
configure_convert(this, mode);
|
|
||||||
}
|
|
||||||
link_io(this);
|
|
||||||
}
|
}
|
||||||
|
link_io(this);
|
||||||
|
|
||||||
this->info.change_mask |= SPA_NODE_CHANGE_MASK_FLAGS | SPA_NODE_CHANGE_MASK_PARAMS;
|
this->info.change_mask |= SPA_NODE_CHANGE_MASK_FLAGS | SPA_NODE_CHANGE_MASK_PARAMS;
|
||||||
SPA_FLAG_CLEAR(this->info.flags, SPA_NODE_FLAG_NEED_CONFIGURE);
|
SPA_FLAG_CLEAR(this->info.flags, SPA_NODE_FLAG_NEED_CONFIGURE);
|
||||||
SPA_FLAG_UPDATE(this->info.flags, SPA_NODE_FLAG_ASYNC,
|
SPA_FLAG_UPDATE(this->info.flags, SPA_NODE_FLAG_ASYNC,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue