mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-05-12 23:50:35 -04:00
filter-graph: warn on clamped control values
Print a warning if a control value is clamped instead of silently failing as the user might want to know if the intended configuration was not applied successfully, such as filter parameters.
This commit is contained in:
parent
f1b1f2d97b
commit
ecc85f2959
1 changed files with 6 additions and 1 deletions
|
|
@ -617,7 +617,12 @@ static int port_set_control_value(struct port *port, float *value)
|
|||
|
||||
p = &node->desc->desc->ports[port->p];
|
||||
get_ranges(impl, p, &def, &min, &max);
|
||||
v = SPA_CLAMP(value ? *value : def, min, max);
|
||||
v = value ? *value : def;
|
||||
if (v < min || v > max) {
|
||||
spa_log_warn(impl->log, "control value %f out of range [%f, %f]",
|
||||
v, min, max);
|
||||
v = SPA_CLAMP(v, min, max);
|
||||
}
|
||||
|
||||
port->control_current = v;
|
||||
port->control_initialized = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue