mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-05-29 21:37:54 -04:00
filter-graph: sync_volume initializes the control ports
Setting the volume control ports with a volume param also initializes the controls. This ensures the controls are not restored to their default value when the graph is activated. Fixes #5192
This commit is contained in:
parent
ace333338c
commit
b09c8d79c5
1 changed files with 3 additions and 0 deletions
|
|
@ -740,6 +740,9 @@ static int sync_volume(struct graph *graph, struct volume *vol)
|
||||||
}
|
}
|
||||||
v = v * (vol->max[n_port] - vol->min[n_port]) + vol->min[n_port];
|
v = v * (vol->max[n_port] - vol->min[n_port]) + vol->min[n_port];
|
||||||
|
|
||||||
|
p->control_initialized = true;
|
||||||
|
p->control_current = v;
|
||||||
|
|
||||||
n_hndl = SPA_MAX(1u, p->node->n_hndl);
|
n_hndl = SPA_MAX(1u, p->node->n_hndl);
|
||||||
res += port_id_set_control_value(p, i % n_hndl, v);
|
res += port_id_set_control_value(p, i % n_hndl, v);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue