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