mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
audioconvert: don't overwrite port
Make a new variable to iterate the other ports so that we can use the original port to emit notifications. Fixes Latency and other params set on DSP ports.
This commit is contained in:
parent
43d02410e6
commit
bb558b7d95
2 changed files with 17 additions and 15 deletions
|
|
@ -897,10 +897,11 @@ static void convert_node_info(void *data, const struct spa_node_info *info)
|
||||||
(this->params[idx].flags & SPA_PARAM_INFO_SERIAL) |
|
(this->params[idx].flags & SPA_PARAM_INFO_SERIAL) |
|
||||||
(info->params[i].flags & SPA_PARAM_INFO_READWRITE);
|
(info->params[i].flags & SPA_PARAM_INFO_READWRITE);
|
||||||
|
|
||||||
if (!this->add_listener) {
|
if (this->add_listener)
|
||||||
this->params[idx].user++;
|
continue;
|
||||||
spa_log_debug(this->log, "param %d changed", info->params[i].id);
|
|
||||||
}
|
this->params[idx].user++;
|
||||||
|
spa_log_debug(this->log, "param %d changed", info->params[i].id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
emit_node_info(this, false);
|
emit_node_info(this, false);
|
||||||
|
|
@ -1005,10 +1006,11 @@ static void follower_info(void *data, const struct spa_node_info *info)
|
||||||
(this->params[idx].flags & SPA_PARAM_INFO_SERIAL) |
|
(this->params[idx].flags & SPA_PARAM_INFO_SERIAL) |
|
||||||
(info->params[i].flags & SPA_PARAM_INFO_READWRITE);
|
(info->params[i].flags & SPA_PARAM_INFO_READWRITE);
|
||||||
|
|
||||||
if (!this->add_listener) {
|
if (this->add_listener)
|
||||||
this->params[idx].user++;
|
continue;
|
||||||
spa_log_debug(this->log, "param %d changed", info->params[i].id);
|
|
||||||
}
|
this->params[idx].user++;
|
||||||
|
spa_log_debug(this->log, "param %d changed", info->params[i].id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
emit_node_info(this, false);
|
emit_node_info(this, false);
|
||||||
|
|
@ -1085,17 +1087,17 @@ static void follower_port_info(void *data,
|
||||||
default:
|
default:
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this->add_listener &&
|
if (!this->add_listener &&
|
||||||
this->follower_params_flags[idx] == info->params[i].flags)
|
this->follower_params_flags[idx] == info->params[i].flags)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
this->info.change_mask |= SPA_NODE_CHANGE_MASK_PARAMS;
|
||||||
this->follower_params_flags[idx] = info->params[i].flags;
|
this->follower_params_flags[idx] = info->params[i].flags;
|
||||||
this->params[idx].flags =
|
this->params[idx].flags =
|
||||||
(this->params[idx].flags & SPA_PARAM_INFO_SERIAL) |
|
(this->params[idx].flags & SPA_PARAM_INFO_SERIAL) |
|
||||||
(info->params[i].flags & SPA_PARAM_INFO_READWRITE);
|
(info->params[i].flags & SPA_PARAM_INFO_READWRITE);
|
||||||
|
|
||||||
this->info.change_mask |= SPA_NODE_CHANGE_MASK_PARAMS;
|
|
||||||
|
|
||||||
if (this->add_listener)
|
if (this->add_listener)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1869,7 +1869,7 @@ static int port_set_latency(void *object,
|
||||||
const struct spa_pod *latency)
|
const struct spa_pod *latency)
|
||||||
{
|
{
|
||||||
struct impl *this = object;
|
struct impl *this = object;
|
||||||
struct port *port;
|
struct port *port, *oport;
|
||||||
enum spa_direction other = SPA_DIRECTION_REVERSE(direction);
|
enum spa_direction other = SPA_DIRECTION_REVERSE(direction);
|
||||||
uint32_t i;
|
uint32_t i;
|
||||||
|
|
||||||
|
|
@ -1891,10 +1891,10 @@ static int port_set_latency(void *object,
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < this->dir[other].n_ports; i++) {
|
for (i = 0; i < this->dir[other].n_ports; i++) {
|
||||||
port = GET_PORT(this, other, i);
|
oport = GET_PORT(this, other, i);
|
||||||
port->info.change_mask |= SPA_PORT_CHANGE_MASK_PARAMS;
|
oport->info.change_mask |= SPA_PORT_CHANGE_MASK_PARAMS;
|
||||||
port->params[IDX_Latency].user++;
|
oport->params[IDX_Latency].user++;
|
||||||
emit_port_info(this, port, false);
|
emit_port_info(this, oport, false);
|
||||||
}
|
}
|
||||||
port->info.change_mask |= SPA_PORT_CHANGE_MASK_PARAMS;
|
port->info.change_mask |= SPA_PORT_CHANGE_MASK_PARAMS;
|
||||||
port->params[IDX_Latency].user++;
|
port->params[IDX_Latency].user++;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue