LibDSP: Don't crash on out-of-bounds parameter value

We can just clamp instead.
This commit is contained in:
kleines Filmröllchen 2023-02-09 15:36:30 +01:00 committed by Andrew Kaster
parent 961e263129
commit 1c3050245e

View file

@ -137,8 +137,7 @@ public:
ParameterFixedPoint default_value() const { return m_default_value; }
void set_value(ParameterFixedPoint value)
{
VERIFY(value <= m_max_value && value >= m_min_value);
Detail::ProcessorParameterSingleValue<ParameterFixedPoint>::set_value(value);
Detail::ProcessorParameterSingleValue<ParameterFixedPoint>::set_value(value.clamp(min_value(), max_value()));
}
private: