From 63b8b21743f2c9288f03e2e288472f4d307a3bb5 Mon Sep 17 00:00:00 2001 From: KubaPro010 Date: Fri, 14 Mar 2025 18:41:46 +0100 Subject: [PATCH] limit the level --- src/modulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modulator.c b/src/modulator.c index 7c6e0b4..abb0b1f 100644 --- a/src/modulator.c +++ b/src/modulator.c @@ -23,7 +23,7 @@ void init_rds_objects() { } void set_rds_level(float _level) { - level = _level; + level = fminf(1.0f, fmaxf(0.0f, _level)); } /* Get an RDS sample. This generates the envelope of the waveform using