bw_{delay,env_gen}: fix BW_DEBUG_DEEP

This commit is contained in:
Stefano D'Angelo 2024-11-10 10:53:07 +01:00
parent b214bc896e
commit ff99bda751
2 changed files with 2 additions and 2 deletions

View File

@ -683,7 +683,7 @@ static inline void bw_delay_process_multi(
for (size_t i = 0; i < n_channels; i++) {
BW_ASSERT(state[i] != BW_NULL);
BW_ASSERT_DEEP(bw_delay_state_is_valid(coeffs, state[i]));
BW_ASSERT_DEEP(state->state[i] >= bw_delay_state_state_reset_state);
BW_ASSERT_DEEP(state[i]->state >= bw_delay_state_state_reset_state);
}
for (size_t i = 0; i < n_channels; i++)
for (size_t j = i + 1; j < n_channels; j++)

View File

@ -933,7 +933,7 @@ static inline char bw_env_gen_coeffs_is_valid(
return 0;
#ifdef BW_DEBUG_DEEP
if (coeffs->state >= bw_env_gen_coeffs_state_set_sample_rate && coeffs->k_T <= 0.f)
if (coeffs->state >= bw_env_gen_coeffs_state_set_sample_rate && (!bw_is_finite(coeffs->T) || coeffs->T <= 0.f))
return 0.f;
#endif