mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-03 09:01:54 -05:00
audioconvert: ignore latency param on monitor ports
Ignore latency params on the monitor ports of merger. They interfere with the latency reporting set by the adapter. The adapter will set the latency param from the follower on port 0 in the converter, so pass this on to the merger as the latency and ignore all other updates. Fixes a case where the latency of a sink would become 0 when a monitor port was recorded from.
This commit is contained in:
parent
b7279a1728
commit
3666c4810e
2 changed files with 11 additions and 6 deletions
|
|
@ -1112,11 +1112,12 @@ impl_node_port_set_param(void *object,
|
|||
|
||||
switch (id) {
|
||||
case SPA_PARAM_Latency:
|
||||
if (port_id == 0) {
|
||||
target = this->fmt[SPA_DIRECTION_REVERSE(direction)];
|
||||
port_id = 0;
|
||||
if ((res = spa_node_port_set_param(target,
|
||||
direction, port_id, id, flags, param)) < 0)
|
||||
return res;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1031,7 +1031,11 @@ static int port_set_latency(void *object,
|
|||
enum spa_direction other = SPA_DIRECTION_REVERSE(direction);
|
||||
uint32_t i;
|
||||
|
||||
spa_log_debug(this->log, "%p: set latency direction:%d", this, direction);
|
||||
spa_log_debug(this->log, "%p: set latency direction:%d id:%d",
|
||||
this, direction, port_id);
|
||||
|
||||
if (direction == SPA_DIRECTION_OUTPUT && port_id != 0)
|
||||
return 0;
|
||||
|
||||
if (latency == NULL) {
|
||||
this->latency[other] = SPA_LATENCY_INFO(other);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue