diff --git a/include/bw_ap1.h b/include/bw_ap1.h index 3c2d3c2..4b77c02 100644 --- a/include/bw_ap1.h +++ b/include/bw_ap1.h @@ -579,9 +579,7 @@ static inline char bw_ap1_state_is_valid( return 0; #endif - (void)coeffs; - - return bw_lp1_state_is_valid(&coeffs->lp1_coeffs, &state->lp1_state); + return bw_lp1_state_is_valid(coeffs ? &coeffs->lp1_coeffs : NULL, &state->lp1_state); } #ifdef __cplusplus diff --git a/include/bw_ap2.h b/include/bw_ap2.h index 209e664..fd3a66d 100644 --- a/include/bw_ap2.h +++ b/include/bw_ap2.h @@ -607,9 +607,7 @@ static inline char bw_ap2_state_is_valid( return 0; #endif - (void)coeffs; - - return bw_svf_state_is_valid(&coeffs->svf_coeffs, &state->svf_state); + return bw_svf_state_is_valid(coeffs ? &coeffs->svf_coeffs : NULL, &state->svf_state); } #ifdef __cplusplus diff --git a/include/bw_comp.h b/include/bw_comp.h index 1248a57..245704e 100644 --- a/include/bw_comp.h +++ b/include/bw_comp.h @@ -773,9 +773,7 @@ static inline char bw_comp_state_is_valid( return 0; #endif - (void)coeffs; - - return bw_env_follow_state_is_valid(&coeffs->env_follow_coeffs, &state->env_follow_state); + return bw_env_follow_state_is_valid(coeffs ? &coeffs->env_follow_coeffs : NULL, &state->env_follow_state); } #ifdef __cplusplus diff --git a/include/bw_dist.h b/include/bw_dist.h index 346fa08..7ff220b 100644 --- a/include/bw_dist.h +++ b/include/bw_dist.h @@ -627,13 +627,11 @@ static inline char bw_dist_state_is_valid( return 0; #endif - (void)coeffs; - - return bw_hp1_state_is_valid(&coeffs->hp1_coeffs, &state->hp1_state) - && bw_peak_state_is_valid(&coeffs->peak_coeffs, &state->peak_state) - && bw_clip_state_is_valid(&coeffs->clip_coeffs, &state->clip_state) - && bw_satur_state_is_valid(&coeffs->satur_coeffs, &state->satur_state) - && bw_lp1_state_is_valid(&coeffs->lp1_coeffs, &state->lp1_state); + return bw_hp1_state_is_valid(coeffs ? &coeffs->hp1_coeffs : NULL, &state->hp1_state) + && bw_peak_state_is_valid(coeffs ? &coeffs->peak_coeffs : NULL, &state->peak_state) + && bw_clip_state_is_valid(coeffs ? &coeffs->clip_coeffs : NULL, &state->clip_state) + && bw_satur_state_is_valid(coeffs ? &coeffs->satur_coeffs : NULL, &state->satur_state) + && bw_lp1_state_is_valid(coeffs ? &coeffs->lp1_coeffs : NULL, &state->lp1_state); } #ifdef __cplusplus diff --git a/include/bw_drive.h b/include/bw_drive.h index fd01afd..56b1794 100644 --- a/include/bw_drive.h +++ b/include/bw_drive.h @@ -628,13 +628,11 @@ static inline char bw_drive_state_is_valid( return 0; #endif - (void)coeffs; - - return bw_svf_state_is_valid(&coeffs->hp2_coeffs, &state->hp2_state) - && bw_hs1_state_is_valid(&coeffs->hs1_coeffs, &state->hs1_state) - && bw_peak_state_is_valid(&coeffs->peak_coeffs, &state->peak_state) - && bw_satur_state_is_valid(&coeffs->satur_coeffs, &state->satur_state) - && bw_lp1_state_is_valid(&coeffs->lp1_coeffs, &state->lp1_state); + return bw_svf_state_is_valid(coeffs ? &coeffs->hp2_coeffs : NULL, &state->hp2_state) + && bw_hs1_state_is_valid(coeffs ? &coeffs->hs1_coeffs : NULL, &state->hs1_state) + && bw_peak_state_is_valid(coeffs ? &coeffs->peak_coeffs : NULL, &state->peak_state) + && bw_satur_state_is_valid(coeffs ? &coeffs->satur_coeffs : NULL, &state->satur_state) + && bw_lp1_state_is_valid(coeffs ? &coeffs->lp1_coeffs : NULL, &state->lp1_state); } #ifdef __cplusplus diff --git a/include/bw_fuzz.h b/include/bw_fuzz.h index b4fa71c..bbd8b08 100644 --- a/include/bw_fuzz.h +++ b/include/bw_fuzz.h @@ -599,14 +599,12 @@ static inline char bw_fuzz_state_is_valid( return 0; #endif - (void)coeffs; - - return bw_hp1_state_is_valid(&coeffs->hp1_in_coeffs, &state->hp1_in_state) - && bw_svf_state_is_valid(&coeffs->lp2_coeffs, &state->lp2_1_state) - && bw_svf_state_is_valid(&coeffs->lp2_coeffs, &state->lp2_2_state) - && bw_peak_state_is_valid(&coeffs->peak_coeffs, &state->peak_state) - && bw_satur_state_is_valid(&coeffs->satur_coeffs, &state->satur_state) - && bw_hp1_state_is_valid(&coeffs->hp1_out_coeffs, &state->hp1_out_state); + return bw_hp1_state_is_valid(coeffs ? &coeffs->hp1_in_coeffs : NULL, &state->hp1_in_state) + && bw_svf_state_is_valid(coeffs ? &coeffs->lp2_coeffs : NULL, &state->lp2_1_state) + && bw_svf_state_is_valid(coeffs ? &coeffs->lp2_coeffs : NULL, &state->lp2_2_state) + && bw_peak_state_is_valid(coeffs ? &coeffs->peak_coeffs : NULL, &state->peak_state) + && bw_satur_state_is_valid(coeffs ? &coeffs->satur_coeffs : NULL, &state->satur_state) + && bw_hp1_state_is_valid(coeffs ? &coeffs->hp1_out_coeffs : NULL, &state->hp1_out_state); } #ifdef __cplusplus diff --git a/include/bw_hp1.h b/include/bw_hp1.h index 9d2ca63..509a0da 100644 --- a/include/bw_hp1.h +++ b/include/bw_hp1.h @@ -576,9 +576,7 @@ static inline char bw_hp1_state_is_valid( return 0; #endif - (void)coeffs; - - return bw_lp1_state_is_valid(&coeffs->lp1_coeffs, &state->lp1_state); + return bw_lp1_state_is_valid(coeffs ? &coeffs->lp1_coeffs : NULL, &state->lp1_state); } #ifdef __cplusplus diff --git a/include/bw_hs1.h b/include/bw_hs1.h index 8609696..df663ab 100644 --- a/include/bw_hs1.h +++ b/include/bw_hs1.h @@ -693,9 +693,7 @@ static inline char bw_hs1_state_is_valid( return 0; #endif - (void)coeffs; - - return bw_mm1_state_is_valid(&coeffs->mm1_coeffs, &state->mm1_state); + return bw_mm1_state_is_valid(coeffs ? &coeffs->mm1_coeffs : NULL, &state->mm1_state); } #ifdef __cplusplus diff --git a/include/bw_hs2.h b/include/bw_hs2.h index 2686f95..f008908 100644 --- a/include/bw_hs2.h +++ b/include/bw_hs2.h @@ -749,9 +749,7 @@ static inline char bw_hs2_state_is_valid( return 0; #endif - (void)coeffs; - - return bw_mm2_state_is_valid(&coeffs->mm2_coeffs, &state->mm2_state); + return bw_mm2_state_is_valid(coeffs ? &coeffs->mm2_coeffs : NULL, &state->mm2_state); } #undef BW_HS2_PARAM_CUTOFF diff --git a/include/bw_ls1.h b/include/bw_ls1.h index 307e2f8..a6cbad3 100644 --- a/include/bw_ls1.h +++ b/include/bw_ls1.h @@ -694,9 +694,7 @@ static inline char bw_ls1_state_is_valid( return 0; #endif - (void)coeffs; - - return bw_mm1_state_is_valid(&coeffs->mm1_coeffs, &state->mm1_state); + return bw_mm1_state_is_valid(coeffs ? &coeffs->mm1_coeffs : NULL, &state->mm1_state); } #ifdef __cplusplus diff --git a/include/bw_ls2.h b/include/bw_ls2.h index daf1de0..5f2524e 100644 --- a/include/bw_ls2.h +++ b/include/bw_ls2.h @@ -740,9 +740,7 @@ static inline char bw_ls2_state_is_valid( return 0; #endif - (void)coeffs; - - return bw_mm2_state_is_valid(&coeffs->mm2_coeffs, &state->mm2_state); + return bw_mm2_state_is_valid(coeffs ? &coeffs->mm2_coeffs : NULL, &state->mm2_state); } #undef BW_LS2_PARAM_CUTOFF diff --git a/include/bw_mm1.h b/include/bw_mm1.h index eff84f0..d8d52f9 100644 --- a/include/bw_mm1.h +++ b/include/bw_mm1.h @@ -645,9 +645,7 @@ static inline char bw_mm1_state_is_valid( return 0; #endif - (void)coeffs; - - return bw_lp1_state_is_valid(&coeffs->lp1_coeffs, &state->lp1_state); + return bw_lp1_state_is_valid(coeffs ? &coeffs->lp1_coeffs : NULL, &state->lp1_state); } #ifdef __cplusplus diff --git a/include/bw_mm2.h b/include/bw_mm2.h index 52cf2e9..e78f7c2 100644 --- a/include/bw_mm2.h +++ b/include/bw_mm2.h @@ -753,9 +753,7 @@ static inline char bw_mm2_state_is_valid( return 0; #endif - (void)coeffs; - - return bw_svf_state_is_valid(&coeffs->svf_coeffs, &state->svf_state); + return bw_svf_state_is_valid(coeffs ? &coeffs->svf_coeffs : NULL, &state->svf_state); } #ifdef __cplusplus diff --git a/include/bw_noise_gate.h b/include/bw_noise_gate.h index 0af77b8..1645117 100644 --- a/include/bw_noise_gate.h +++ b/include/bw_noise_gate.h @@ -702,9 +702,7 @@ static inline char bw_noise_gate_state_is_valid( return 0; #endif - (void)coeffs; - - return bw_env_follow_state_is_valid(&coeffs->env_follow_coeffs, &state->env_follow_state); + return bw_env_follow_state_is_valid(coeffs ? &coeffs->env_follow_coeffs : NULL, &state->env_follow_state); } #ifdef __cplusplus diff --git a/include/bw_notch.h b/include/bw_notch.h index ffcbbcc..fe4864b 100644 --- a/include/bw_notch.h +++ b/include/bw_notch.h @@ -605,9 +605,7 @@ static inline char bw_notch_state_is_valid( return 0; #endif - (void)coeffs; - - return bw_svf_state_is_valid(&coeffs->svf_coeffs, &state->svf_state); + return bw_svf_state_is_valid(coeffs ? &coeffs->svf_coeffs : NULL, &state->svf_state); } #ifdef __cplusplus diff --git a/include/bw_peak.h b/include/bw_peak.h index 2ec1293..bdb70d6 100644 --- a/include/bw_peak.h +++ b/include/bw_peak.h @@ -835,9 +835,7 @@ static inline char bw_peak_state_is_valid( return 0; #endif - (void)coeffs; - - return bw_mm2_state_is_valid(&coeffs->mm2_coeffs, &state->mm2_state); + return bw_mm2_state_is_valid(coeffs ? &coeffs->mm2_coeffs : NULL, &state->mm2_state); } #undef BW_PEAK_PARAM_Q diff --git a/include/bw_wah.h b/include/bw_wah.h index d816946..b5755c2 100644 --- a/include/bw_wah.h +++ b/include/bw_wah.h @@ -535,9 +535,7 @@ static inline char bw_wah_state_is_valid( return 0; #endif - (void)coeffs; - - return bw_svf_state_is_valid(&coeffs->svf_coeffs, &state->svf_state); + return bw_svf_state_is_valid(coeffs ? &coeffs->svf_coeffs : NULL, &state->svf_state); } #ifdef __cplusplus