From ecc85f2959ed77f961b6c9b29b6cd383ec67beb3 Mon Sep 17 00:00:00 2001 From: Niklas Carlsson Date: Mon, 11 May 2026 11:52:57 +0200 Subject: [PATCH] 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. --- spa/plugins/filter-graph/filter-graph.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/spa/plugins/filter-graph/filter-graph.c b/spa/plugins/filter-graph/filter-graph.c index cab91e11e..aebdc9f71 100644 --- a/spa/plugins/filter-graph/filter-graph.c +++ b/spa/plugins/filter-graph/filter-graph.c @@ -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;