From 5b4f22023f851875df0410c28fd19b92ad42edb5 Mon Sep 17 00:00:00 2001 From: Brad Barnett <127794626+bdbarnett@users.noreply.github.com> Date: Tue, 10 Nov 2026 08:54:28 -0600 Subject: [PATCH] Level ramps: build under CircuitPython's -Werror=float-equal audiodsp_level_ramp_aim compared two floats with ==, which CircuitPython's espressif builds refuse. Every audiodynamics, delay and shaper binding includes the header, so no CircuitPython firmware with audiodsp built at 84b8b45 or later. The test is now written with < and >, as SamplerVoice already does; a NaN target now leaves the walk alone instead of aiming it at NaN. --- src/shared/audiodsp_level_ramp.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/shared/audiodsp_level_ramp.h b/src/shared/audiodsp_level_ramp.h index 55aba84..f6b2ca7 100644 --- a/src/shared/audiodsp_level_ramp.h +++ b/src/shared/audiodsp_level_ramp.h @@ -65,7 +65,8 @@ static inline void audiodsp_level_ramp_aim(audiodsp_level_ramp_t *ramp, ramp->primed = true; return; } - if (target == ramp->target) { + // Not ==: CircuitPython builds with -Werror=float-equal. + if (!(target < ramp->target || target > ramp->target)) { return; } ramp->target = target;