diff --git a/include/bw_cab.h b/include/bw_cab.h
index 2fd615f..9eb95a5 100644
--- a/include/bw_cab.h
+++ b/include/bw_cab.h
@@ -33,7 +33,7 @@
*
Version 1.0.1:
*
* - Added debugging checks from
bw_cab_process()
to
- * bw_cab_process_multi()
.
+ * bw_cab_process_multi()
.
* - Added debugging checks in
bw_cab_process_multi()
to
* ensure that buffers used for both input and output appear at the
* same channel indices.
diff --git a/include/bw_chorus.h b/include/bw_chorus.h
index ada423a..73aab76 100644
--- a/include/bw_chorus.h
+++ b/include/bw_chorus.h
@@ -39,7 +39,7 @@
* - Version 1.1.1:
*
* - Added debugging checks from
bw_chorus_process()
to
- * bw_chorus_process_multi()
.
+ * bw_chorus_process_multi()
.
* - Added debugging checks in
bw_chorus_process_multi()
* to ensure that buffers used for both input and output appear at
* the same channel indices.
diff --git a/include/bw_clip.h b/include/bw_clip.h
index 537e5cb..b1130ab 100644
--- a/include/bw_clip.h
+++ b/include/bw_clip.h
@@ -48,7 +48,7 @@
* - Version 1.1.1:
*
* - Added debugging checks from
bw_clip_process()
to
- * bw_clip_process_multi()
.
+ * bw_clip_process_multi()
.
* - Added debugging checks in
bw_clip_process_multi()
* to ensure that buffers used for both input and output appear at
* the same channel indices.
diff --git a/include/bw_comb.h b/include/bw_comb.h
index 1352ef5..df2b4f6 100644
--- a/include/bw_comb.h
+++ b/include/bw_comb.h
@@ -40,7 +40,7 @@
* - Version 1.1.1:
*
* - Added debugging checks from
bw_comb_process()
to
- * bw_comb_process_multi()
.
+ * bw_comb_process_multi()
.
* - Added debugging checks in
bw_comb_process_multi()
* to ensure that buffers used for both input and output appear at
* the same channel indices.
diff --git a/include/bw_comp.h b/include/bw_comp.h
index 6dd44d1..853b3e7 100644
--- a/include/bw_comp.h
+++ b/include/bw_comp.h
@@ -32,7 +32,7 @@
* - Version 1.1.1:
*
* - Added debugging checks from
bw_comp_process()
to
- * bw_comp_process_multi()
.
+ * bw_comp_process_multi()
.
* - Added debugging checks in
bw_comp_process_multi()
* to ensure that buffers used for both input and output appear at
* the same channel indices.
diff --git a/include/bw_delay.h b/include/bw_delay.h
index 106b558..72aed68 100644
--- a/include/bw_delay.h
+++ b/include/bw_delay.h
@@ -34,7 +34,7 @@
* - Version 1.1.1:
*
* - Added debugging checks from
bw_delay_process()
to
- * bw_delay_process_multi()
.
+ * bw_delay_process_multi()
.
* - Added debugging checks in
bw_delay_process_multi()
* to ensure that buffers used for both input and output appear at
* the same channel indices.
diff --git a/include/bw_dist.h b/include/bw_dist.h
index 9086885..dece4ac 100644
--- a/include/bw_dist.h
+++ b/include/bw_dist.h
@@ -34,6 +34,8 @@
*
* - Version 1.1.1:
*
+ * - Added debugging checks from
bw_dist_process()
to
+ * bw_dist_process_multi()
.
* - Added debugging checks in
bw_dist_process_multi()
* to ensure that buffers used for both input and output appear at
* the same channel indices.
@@ -555,6 +557,10 @@ static inline void bw_dist_process_multi(
BW_ASSERT_DEEP(coeffs->state >= bw_dist_coeffs_state_reset_coeffs);
BW_ASSERT(state != BW_NULL);
#ifndef BW_NO_DEBUG
+ for (size_t i = 0; i < n_channels; i++) {
+ BW_ASSERT(state[i] != BW_NULL);
+ BW_ASSERT_DEEP(bw_dist_state_is_valid(coeffs, state[i]));
+ }
for (size_t i = 0; i < n_channels; i++)
for (size_t j = i + 1; j < n_channels; j++)
BW_ASSERT(state[i] != state[j]);
@@ -562,6 +568,11 @@ static inline void bw_dist_process_multi(
BW_ASSERT(x != BW_NULL);
BW_ASSERT(y != BW_NULL);
#ifndef BW_NO_DEBUG
+ for (size_t i = 0; i < n_channels; i++) {
+ BW_ASSERT(x[i] != BW_NULL);
+ BW_ASSERT_DEEP(bw_has_only_finite(x[i], n_samples));
+ BW_ASSERT(y[i] != BW_NULL);
+ }
for (size_t i = 0; i < n_channels; i++)
for (size_t j = i + 1; j < n_channels; j++)
BW_ASSERT(y[i] != y[j]);
@@ -579,6 +590,12 @@ static inline void bw_dist_process_multi(
BW_ASSERT_DEEP(bw_dist_coeffs_is_valid(coeffs));
BW_ASSERT_DEEP(coeffs->state >= bw_dist_coeffs_state_reset_coeffs);
+#ifndef BW_NO_DEBUG
+ for (size_t i = 0; i < n_channels; i++) {
+ BW_ASSERT_DEEP(bw_dist_state_is_valid(coeffs, state[i]));
+ BW_ASSERT_DEEP(bw_has_only_finite(y[i], n_samples));
+ }
+#endif
}
static inline void bw_dist_set_distortion(
diff --git a/include/bw_drive.h b/include/bw_drive.h
index 50ac11f..df18264 100644
--- a/include/bw_drive.h
+++ b/include/bw_drive.h
@@ -34,6 +34,8 @@
*
* - Version 1.1.1:
*
+ * - Added debugging checks from
bw_drive_process()
to
+ * bw_drive_process_multi()
.
* - Added debugging checks in
bw_drive_process_multi()
* to ensure that buffers used for both input and output appear at
* the same channel indices.
@@ -558,6 +560,10 @@ static inline void bw_drive_process_multi(
BW_ASSERT_DEEP(coeffs->state >= bw_drive_coeffs_state_reset_coeffs);
BW_ASSERT(state != BW_NULL);
#ifndef BW_NO_DEBUG
+ for (size_t i = 0; i < n_channels; i++) {
+ BW_ASSERT(state[i] != BW_NULL);
+ BW_ASSERT_DEEP(bw_drive_state_is_valid(coeffs, state[i]));
+ }
for (size_t i = 0; i < n_channels; i++)
for (size_t j = i + 1; j < n_channels; j++)
BW_ASSERT(state[i] != state[j]);
@@ -565,6 +571,11 @@ static inline void bw_drive_process_multi(
BW_ASSERT(x != BW_NULL);
BW_ASSERT(y != BW_NULL);
#ifndef BW_NO_DEBUG
+ for (size_t i = 0; i < n_channels; i++) {
+ BW_ASSERT(x[i] != BW_NULL);
+ BW_ASSERT_DEEP(bw_has_only_finite(x[i], n_samples));
+ BW_ASSERT(y[i] != BW_NULL);
+ }
for (size_t i = 0; i < n_channels; i++)
for (size_t j = i + 1; j < n_channels; j++)
BW_ASSERT(y[i] != y[j]);
@@ -582,6 +593,12 @@ static inline void bw_drive_process_multi(
BW_ASSERT_DEEP(bw_drive_coeffs_is_valid(coeffs));
BW_ASSERT_DEEP(coeffs->state >= bw_drive_coeffs_state_reset_coeffs);
+#ifndef BW_NO_DEBUG
+ for (size_t i = 0; i < n_channels; i++) {
+ BW_ASSERT_DEEP(bw_drive_state_is_valid(coeffs, state[i]));
+ BW_ASSERT_DEEP(bw_has_only_finite(y[i], n_samples));
+ }
+#endif
}
static inline void bw_drive_set_drive(
diff --git a/include/bw_dry_wet.h b/include/bw_dry_wet.h
index fd16edf..2c3fc0d 100644
--- a/include/bw_dry_wet.h
+++ b/include/bw_dry_wet.h
@@ -29,6 +29,8 @@
*
* - Version 1.2.0:
*
+ * - Added debugging checks from
bw_dry_wet_process()
to
+ * bw_dry_wet_process_multi()
.
* - Added
bw_dry_wet_get_wet()
and
* bw_dry_wet_get_wet_cur()
, and corresponding C++
* API.
@@ -380,6 +382,13 @@ static inline void bw_dry_wet_process_multi(
BW_ASSERT(x_wet != BW_NULL);
BW_ASSERT(y != BW_NULL);
#ifndef BW_NO_DEBUG
+ for (size_t i = 0; i < n_channels; i++) {
+ BW_ASSERT(x_dry[i] != BW_NULL);
+ BW_ASSERT_DEEP(bw_has_only_finite(x_dry[i], n_samples));
+ BW_ASSERT(x_wet[i] != BW_NULL);
+ BW_ASSERT_DEEP(bw_has_only_finite(x_wet[i], n_samples));
+ BW_ASSERT(y[i] != BW_NULL);
+ }
for (size_t i = 0; i < n_channels; i++)
for (size_t j = i + 1; j < n_channels; j++)
BW_ASSERT(y[i] != y[j]);
@@ -399,6 +408,10 @@ static inline void bw_dry_wet_process_multi(
BW_ASSERT_DEEP(bw_dry_wet_coeffs_is_valid(coeffs));
BW_ASSERT_DEEP(coeffs->state >= bw_dry_wet_coeffs_state_reset_coeffs);
+#ifndef BW_NO_DEBUG
+ for (size_t i = 0; i < n_channels; i++)
+ BW_ASSERT_DEEP(bw_has_only_finite(y[i], n_samples));
+#endif
}
static inline void bw_dry_wet_set_wet(
diff --git a/include/bw_env_follow.h b/include/bw_env_follow.h
index fbbc737..3fba7b5 100644
--- a/include/bw_env_follow.h
+++ b/include/bw_env_follow.h
@@ -30,6 +30,8 @@
*
* - Version 1.1.1:
*
+ * - Added debugging checks from
bw_env_follow_process()
+ * to bw_env_follow_process_multi()
.
* - Added debugging checks in
*
bw_env_follow_process_multi()
to ensure that
* buffers used for both input and output appear at the same
@@ -523,12 +525,20 @@ static inline void bw_env_follow_process_multi(
BW_ASSERT_DEEP(coeffs->state >= bw_env_follow_coeffs_state_reset_coeffs);
BW_ASSERT(state != BW_NULL);
#ifndef BW_NO_DEBUG
+ for (size_t i = 0; i < n_channels; i++) {
+ BW_ASSERT(state[i] != BW_NULL);
+ BW_ASSERT_DEEP(bw_env_follow_state_is_valid(coeffs, state[i]));
+ }
for (size_t i = 0; i < n_channels; i++)
for (size_t j = i + 1; j < n_channels; j++)
BW_ASSERT(state[i] != state[j]);
#endif
BW_ASSERT(x != BW_NULL);
#ifndef BW_NO_DEBUG
+ for (size_t i = 0; i < n_channels; i++) {
+ BW_ASSERT(x[i] != BW_NULL);
+ BW_ASSERT_DEEP(bw_has_only_finite(x[i], n_samples));
+ }
if (y != BW_NULL) {
for (size_t i = 0; i < n_channels; i++)
for (size_t j = i + 1; j < n_channels; j++)
@@ -558,6 +568,12 @@ static inline void bw_env_follow_process_multi(
BW_ASSERT_DEEP(bw_env_follow_coeffs_is_valid(coeffs));
BW_ASSERT_DEEP(coeffs->state >= bw_env_follow_coeffs_state_reset_coeffs);
+#ifndef BW_NO_DEBUG
+ for (size_t i = 0; i < n_channels; i++) {
+ BW_ASSERT_DEEP(bw_env_follow_state_is_valid(coeffs, state[i]));
+ BW_ASSERT_DEEP(y != BW_NULL && y[i] != BW_NULL ? bw_has_only_finite(y[i], n_samples) : 1);
+ }
+#endif
}
static inline void bw_env_follow_set_attack_tau(
diff --git a/include/bw_env_gen.h b/include/bw_env_gen.h
index 64bd229..bd008ba 100644
--- a/include/bw_env_gen.h
+++ b/include/bw_env_gen.h
@@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 1.1.0 }}}
+ * version {{{ 1.1.1 }}}
* requires {{{ bw_common bw_math bw_one_pole }}}
* description {{{
* Linear ADSR envelope generator.
@@ -42,6 +42,12 @@
*
* - Version 1.1.0:
*
+ * - Added debugging checks from
bw_env_gen_process()
to
+ * bw_env_gen_process_multi()
.
+ *
+ *
+ * - Version 1.1.0:
+ *
* - Added skip_sustain and always_reach_sustain parameters.
* - Now using
BW_NULL
and
* BW_CXX_NO_ARRAY
.
@@ -725,6 +731,10 @@ static inline void bw_env_gen_process_multi(
BW_ASSERT_DEEP(coeffs->state >= bw_env_gen_coeffs_state_reset_coeffs);
BW_ASSERT(state != BW_NULL);
#ifndef BW_NO_DEBUG
+ for (size_t i = 0; i < n_channels; i++) {
+ BW_ASSERT(state[i] != BW_NULL);
+ BW_ASSERT_DEEP(bw_env_gen_state_is_valid(coeffs, state[i]));
+ }
for (size_t i = 0; i < n_channels; i++)
for (size_t j = i + 1; j < n_channels; j++)
BW_ASSERT(state[i] != state[j]);
@@ -754,6 +764,12 @@ static inline void bw_env_gen_process_multi(
BW_ASSERT_DEEP(bw_env_gen_coeffs_is_valid(coeffs));
BW_ASSERT_DEEP(coeffs->state >= bw_env_gen_coeffs_state_reset_coeffs);
+#ifndef BW_NO_DEBUG
+ for (size_t i = 0; i < n_channels; i++) {
+ BW_ASSERT_DEEP(bw_env_gen_state_is_valid(coeffs, state[i]));
+ BW_ASSERT_DEEP(y != BW_NULL && y[i] != BW_NULL ? bw_has_only_finite(y[i], n_samples) : 1);
+ }
+#endif
}
static inline void bw_env_gen_set_attack(
diff --git a/include/bw_fuzz.h b/include/bw_fuzz.h
index 8015e95..b8f5043 100644
--- a/include/bw_fuzz.h
+++ b/include/bw_fuzz.h
@@ -34,6 +34,8 @@
*
* - Version 1.1.1:
*
+ * - Added debugging checks from
bw_fuzz_process()
to
+ * bw_fuzz_process_multi()
.
* - Added debugging checks in
bw_fuzz_process_multi()
* to ensure that buffers used for both input and output appear at
* the same channel indices.
@@ -544,6 +546,10 @@ static inline void bw_fuzz_process_multi(
BW_ASSERT_DEEP(coeffs->state >= bw_fuzz_coeffs_state_reset_coeffs);
BW_ASSERT(state != BW_NULL);
#ifndef BW_NO_DEBUG
+ for (size_t i = 0; i < n_channels; i++) {
+ BW_ASSERT(state[i] != BW_NULL);
+ BW_ASSERT_DEEP(bw_fuzz_state_is_valid(coeffs, state[i]));
+ }
for (size_t i = 0; i < n_channels; i++)
for (size_t j = i + 1; j < n_channels; j++)
BW_ASSERT(state[i] != state[j]);
@@ -551,6 +557,11 @@ static inline void bw_fuzz_process_multi(
BW_ASSERT(x != BW_NULL);
BW_ASSERT(y != BW_NULL);
#ifndef BW_NO_DEBUG
+ for (size_t i = 0; i < n_channels; i++) {
+ BW_ASSERT(x[i] != BW_NULL);
+ BW_ASSERT_DEEP(bw_has_only_finite(x[i], n_samples));
+ BW_ASSERT(y[i] != BW_NULL);
+ }
for (size_t i = 0; i < n_channels; i++)
for (size_t j = i + 1; j < n_channels; j++)
BW_ASSERT(y[i] != y[j]);
@@ -568,6 +579,12 @@ static inline void bw_fuzz_process_multi(
BW_ASSERT_DEEP(bw_fuzz_coeffs_is_valid(coeffs));
BW_ASSERT_DEEP(coeffs->state >= bw_fuzz_coeffs_state_reset_coeffs);
+#ifndef BW_NO_DEBUG
+ for (size_t i = 0; i < n_channels; i++) {
+ BW_ASSERT_DEEP(bw_fuzz_state_is_valid(coeffs, state[i]));
+ BW_ASSERT_DEEP(bw_has_only_finite(y[i], n_samples));
+ }
+#endif
}
static inline void bw_fuzz_set_fuzz(
diff --git a/include/bw_gain.h b/include/bw_gain.h
index 08c07b0..453a0a4 100644
--- a/include/bw_gain.h
+++ b/include/bw_gain.h
@@ -29,6 +29,8 @@
*
* - Version 1.1.1:
*
+ * - Added debugging checks from
bw_ap1_process()
to
+ * bw_ap1_process_multi()
.
* - Added debugging checks in
bw_gain_process_multi()
* to ensure that buffers used for both input and output appear at
* the same channel indices.
@@ -409,6 +411,11 @@ static inline void bw_gain_process_multi(
BW_ASSERT(x != BW_NULL);
BW_ASSERT(y != BW_NULL);
#ifndef BW_NO_DEBUG
+ for (size_t i = 0; i < n_channels; i++) {
+ BW_ASSERT(x[i] != BW_NULL);
+ BW_ASSERT_DEEP(bw_has_only_finite(x[i], n_samples));
+ BW_ASSERT(y[i] != BW_NULL);
+ }
for (size_t i = 0; i < n_channels; i++)
for (size_t j = i + 1; j < n_channels; j++)
BW_ASSERT(y[i] != y[j]);
@@ -426,6 +433,10 @@ static inline void bw_gain_process_multi(
BW_ASSERT_DEEP(bw_gain_coeffs_is_valid(coeffs));
BW_ASSERT_DEEP(coeffs->state >= bw_gain_coeffs_state_reset_coeffs);
+#ifndef BW_NO_DEBUG
+ for (size_t i = 0; i < n_channels; i++)
+ BW_ASSERT_DEEP(bw_has_only_finite(y[i], n_samples));
+#endif
}
static inline void bw_gain_set_gain_lin(
diff --git a/include/bw_osc_pulse.h b/include/bw_osc_pulse.h
index 4b70183..5b06077 100644
--- a/include/bw_osc_pulse.h
+++ b/include/bw_osc_pulse.h
@@ -554,7 +554,7 @@ static inline char bw_osc_pulse_coeffs_is_valid(
return 0;
#ifdef BW_DEBUG_DEEP
- if (coeffs->state >= bw_gain_coeffs_state_reset_coeffs && !bw_one_pole_state_is_valid(&coeffs->smooth_coeffs, &coeffs->smooth_state))
+ if (coeffs->state >= bw_osc_pulse_coeffs_state_reset_coeffs && !bw_one_pole_state_is_valid(&coeffs->smooth_coeffs, &coeffs->smooth_state))
return 0;
#endif
diff --git a/include/bw_osc_tri.h b/include/bw_osc_tri.h
index c2457fa..c4e2854 100644
--- a/include/bw_osc_tri.h
+++ b/include/bw_osc_tri.h
@@ -561,7 +561,7 @@ static inline char bw_osc_tri_coeffs_is_valid(
return 0;
#ifdef BW_DEBUG_DEEP
- if (coeffs->state >= bw_gain_coeffs_state_reset_coeffs && !bw_one_pole_state_is_valid(&coeffs->smooth_coeffs, &coeffs->smooth_state))
+ if (coeffs->state >= bw_osc_tri_coeffs_state_reset_coeffs && !bw_one_pole_state_is_valid(&coeffs->smooth_coeffs, &coeffs->smooth_state))
return 0;
#endif