From b517c83cb5cbff3f99bf2230f238904669242274 Mon Sep 17 00:00:00 2001 From: Stefano D'Angelo Date: Sat, 24 Aug 2024 17:31:25 +0200 Subject: [PATCH] bw_env_gen added process output bound debugging check --- include/bw_env_gen.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/bw_env_gen.h b/include/bw_env_gen.h index ceedc74..2f81c94 100644 --- a/include/bw_env_gen.h +++ b/include/bw_env_gen.h @@ -48,6 +48,9 @@ * skip_sustain parameter value. *
  • Added debugging checks from bw_env_gen_process() to * bw_env_gen_process_multi().
  • + *
  • Added debugging check in bw_env_gen_process1() to + * ensure that output is in [0.f, + * 1.f].
  • * * *
  • Version 1.1.0: @@ -690,6 +693,7 @@ static inline float bw_env_gen_process1( BW_ASSERT_DEEP(coeffs->state >= bw_env_gen_coeffs_state_reset_coeffs); BW_ASSERT_DEEP(bw_env_gen_state_is_valid(coeffs, state)); BW_ASSERT(bw_is_finite(y)); + BW_ASSERT(y >= 0.f && y <= 1.f); return y; }