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:
Wim Taymans 2026-05-20 11:32:39 +02:00
parent 753ce79c18
commit 6e6fb1207d

View file

@ -773,6 +773,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];
p->control_initialized = true;
p->control_current = v;
n_hndl = SPA_MAX(1u, p->node->n_hndl);
res += port_id_set_control_value(p, i % n_hndl, v);
}