mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -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;
|
||||
|
||||
if (old_passthrough != passthrough) {
|
||||
if (passthrough) {
|
||||
/* add follower ports */
|
||||
spa_zero(l);
|
||||
spa_node_add_listener(this->follower, &l, &follower_node_events, this);
|
||||
spa_hook_remove(&l);
|
||||
} else {
|
||||
/* add converter ports */
|
||||
configure_convert(this, mode);
|
||||
}
|
||||
link_io(this);
|
||||
if (old_passthrough != passthrough && passthrough) {
|
||||
/* add follower ports */
|
||||
spa_zero(l);
|
||||
spa_node_add_listener(this->follower, &l, &follower_node_events, this);
|
||||
spa_hook_remove(&l);
|
||||
} else {
|
||||
/* add converter ports */
|
||||
configure_convert(this, mode);
|
||||
}
|
||||
link_io(this);
|
||||
|
||||
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_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;
|
||||
|
||||
if (old_passthrough != passthrough) {
|
||||
if (passthrough) {
|
||||
/* add follower ports */
|
||||
spa_zero(l);
|
||||
spa_node_add_listener(this->follower, &l, &follower_node_events, this);
|
||||
spa_hook_remove(&l);
|
||||
} else {
|
||||
/* add converter ports */
|
||||
configure_convert(this, mode);
|
||||
}
|
||||
link_io(this);
|
||||
if (old_passthrough != passthrough && passthrough) {
|
||||
/* add follower ports */
|
||||
spa_zero(l);
|
||||
spa_node_add_listener(this->follower, &l, &follower_node_events, this);
|
||||
spa_hook_remove(&l);
|
||||
} else {
|
||||
configure_convert(this, mode);
|
||||
}
|
||||
link_io(this);
|
||||
|
||||
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_UPDATE(this->info.flags, SPA_NODE_FLAG_ASYNC,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue