diff --git a/include/bw_ap1.h b/include/bw_ap1.h index 26ebbca..137a3cb 100644 --- a/include/bw_ap1.h +++ b/include/bw_ap1.h @@ -20,7 +20,7 @@ /*! * module_type {{{ dsp }}} - * version {{{ 1.1.0 }}} + * version {{{ 1.1.1 }}} * requires {{{ bw_common bw_lp1 bw_math bw_one_pole }}} * description {{{ * First-order allpass filter (90° shift at cutoff, approaching 180° shift @@ -28,6 +28,13 @@ * }}} * changelog {{{ *
bw_ap1_process_multi()
to
+ * ensure that buffers used for both input and output appear at the
+ * same channel indices.BW_NULL
and
@@ -518,6 +525,9 @@ static inline void bw_ap1_process_multi(
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]);
+ for (size_t i = 0; i < n_channels; i++)
+ for (size_t j = 0; j < n_channels; j++)
+ BW_ASSERT(i == j || x[i] != y[j]);
#endif
bw_ap1_update_coeffs_ctrl(coeffs);
diff --git a/include/bw_ap2.h b/include/bw_ap2.h
index a8efd2c..ee1566f 100644
--- a/include/bw_ap2.h
+++ b/include/bw_ap2.h
@@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 1.1.0 }}}
+ * version {{{ 1.1.1 }}}
* requires {{{ bw_common bw_math bw_one_pole bw_svf }}}
* description {{{
* Second-order allpass filter (180° shift at cutoff, approaching 360° shift
@@ -28,6 +28,13 @@
* }}}
* changelog {{{
* bw_ap2_process_multi()
to
+ * ensure that buffers used for both input and output appear at the
+ * same channel indices.BW_NULL
and
@@ -531,6 +538,9 @@ static inline void bw_ap2_process_multi(
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]);
+ for (size_t i = 0; i < n_channels; i++)
+ for (size_t j = 0; j < n_channels; j++)
+ BW_ASSERT(i == j || x[i] != y[j]);
#endif
bw_ap2_update_coeffs_ctrl(coeffs);
diff --git a/include/bw_balance.h b/include/bw_balance.h
index 6bfb8fe..28279b0 100644
--- a/include/bw_balance.h
+++ b/include/bw_balance.h
@@ -20,13 +20,20 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 1.1.0 }}}
+ * version {{{ 1.1.1 }}}
* requires {{{ bw_common bw_gain bw_math bw_one_pole }}}
* description {{{
* Stereo balance.
* }}}
* changelog {{{
* bw_balance_process_multi()
+ * to ensure that buffers used for both input and output appear at
+ * the same channel indices.BW_NULL
and
@@ -398,6 +405,13 @@ static inline void bw_balance_process_multi(
for (size_t i = 0; i < n_channels; i++)
for (size_t j = 0; j < n_channels; j++)
BW_ASSERT(y_l[i] != y_r[j]);
+ for (size_t i = 0; i < n_channels; i++)
+ for (size_t j = 0; j < n_channels; j++) {
+ BW_ASSERT(i == j || x_l[i] != y_l[j]);
+ BW_ASSERT(i == j || x_l[i] != y_r[j]);
+ BW_ASSERT(i == j || x_r[i] != y_l[j]);
+ BW_ASSERT(i == j || x_r[i] != y_r[j]);
+ }
#endif
bw_balance_update_coeffs_ctrl(coeffs);
diff --git a/include/bw_bd_reduce.h b/include/bw_bd_reduce.h
index 99c9828..0a2fb35 100644
--- a/include/bw_bd_reduce.h
+++ b/include/bw_bd_reduce.h
@@ -28,14 +28,16 @@
* This is purely an audio effect, it doesn't actually produce an output
* signal with a different encoding. The algorithm is deliberately crude to
* obtain the characteristic noise due to lo-fi A/D quantization.
- *
- * It
* }}}
* changelog {{{
* bw_balance_bd_reduce_multi()
to ensure that buffers
+ * used for both input and output appear at the same channel
+ * indices.bw_buf_{neg,add,scale,mix,mul}_multi()
to ensure
+ * that buffers used for both input and output appear at the same
+ * channel indices.BW_NULL
and
@@ -362,6 +370,9 @@ static inline void bw_buf_neg_multi(
for (size_t i = 0; i < n_channels; i++)
for (size_t j = i + 1; j < n_channels; j++)
BW_ASSERT(dest[i] != dest[j]);
+ for (size_t i = 0; i < n_channels; i++)
+ for (size_t j = 0; j < n_channels; j++)
+ BW_ASSERT(i == j || src[i] != dest[j]);
#endif
for (size_t i = 0; i < n_channels; i++)
@@ -381,6 +392,9 @@ static inline void bw_buf_add_multi(
for (size_t i = 0; i < n_channels; i++)
for (size_t j = i + 1; j < n_channels; j++)
BW_ASSERT(dest[i] != dest[j]);
+ for (size_t i = 0; i < n_channels; i++)
+ for (size_t j = 0; j < n_channels; j++)
+ BW_ASSERT(i == j || src[i] != dest[j]);
#endif
for (size_t i = 0; i < n_channels; i++)
@@ -400,6 +414,9 @@ static inline void bw_buf_scale_multi(
for (size_t i = 0; i < n_channels; i++)
for (size_t j = i + 1; j < n_channels; j++)
BW_ASSERT(dest[i] != dest[j]);
+ for (size_t i = 0; i < n_channels; i++)
+ for (size_t j = 0; j < n_channels; j++)
+ BW_ASSERT(i == j || src[i] != dest[j]);
#endif
for (size_t i = 0; i < n_channels; i++)
@@ -419,6 +436,11 @@ static inline void bw_buf_mix_multi(
for (size_t i = 0; i < n_channels; i++)
for (size_t j = i + 1; j < n_channels; j++)
BW_ASSERT(dest[i] != dest[j]);
+ for (size_t i = 0; i < n_channels; i++)
+ for (size_t j = 0; j < n_channels; j++) {
+ BW_ASSERT(i == j || src1[i] != dest[j]);
+ BW_ASSERT(i == j || src2[i] != dest[j]);
+ }
#endif
for (size_t i = 0; i < n_channels; i++)
@@ -438,6 +460,11 @@ static inline void bw_buf_mul_multi(
for (size_t i = 0; i < n_channels; i++)
for (size_t j = i + 1; j < n_channels; j++)
BW_ASSERT(dest[i] != dest[j]);
+ for (size_t i = 0; i < n_channels; i++)
+ for (size_t j = 0; j < n_channels; j++) {
+ BW_ASSERT(i == j || src1[i] != dest[j]);
+ BW_ASSERT(i == j || src2[i] != dest[j]);
+ }
#endif
for (size_t i = 0; i < n_channels; i++)
diff --git a/include/bw_cab.h b/include/bw_cab.h
index dd41aa9..e4ea388 100644
--- a/include/bw_cab.h
+++ b/include/bw_cab.h
@@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 1.0.0 }}}
+ * version {{{ 1.0.1 }}}
* requires {{{ bw_common bw_gain bw_math bw_one_pole bw_svf }}}
* description {{{
* Cab simulator effect.
@@ -30,6 +30,13 @@
* }}}
* changelog {{{
* bw_cab_process_multi()
to
+ * ensure that buffers used for both input and output appear at the
+ * same channel indices.bw_chorus_process_multi()
+ * to ensure that buffers used for both input and output appear at
+ * the same channel indices.BW_NULL
and
@@ -662,6 +669,9 @@ static inline void bw_chorus_process_multi(
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]);
+ for (size_t i = 0; i < n_channels; i++)
+ for (size_t j = 0; j < n_channels; j++)
+ BW_ASSERT(i == j || x[i] != y[j]);
#endif
bw_chorus_update_coeffs_ctrl(coeffs);
diff --git a/include/bw_clip.h b/include/bw_clip.h
index deec8a9..053f80c 100644
--- a/include/bw_clip.h
+++ b/include/bw_clip.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 {{{
* Antialiased hard clipper with parametric bias and gain
@@ -45,6 +45,13 @@
* }}}
* changelog {{{
* bw_clip_process_multi()
to
+ * ensure that buffers used for both input and output appear at the
+ * same channel indices.BW_NULL
and
@@ -600,6 +607,9 @@ static inline void bw_clip_process_multi(
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]);
+ for (size_t i = 0; i < n_channels; i++)
+ for (size_t j = 0; j < n_channels; j++)
+ BW_ASSERT(i == j || x[i] != y[j]);
#endif
if (coeffs->gain_compensation)
diff --git a/include/bw_comb.h b/include/bw_comb.h
index 9beed5b..855f982 100644
--- a/include/bw_comb.h
+++ b/include/bw_comb.h
@@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 1.1.0 }}}
+ * version {{{ 1.1.1 }}}
* requires {{{
* bw_buf bw_common bw_delay bw_gain bw_math bw_one_pole
* }}}
@@ -37,6 +37,13 @@
* }}}
* changelog {{{
* bw_comb_process_multi()
to
+ * ensure that buffers used for both input and output appear at the
+ * same channel indices.BW_NULL
and
@@ -718,6 +725,9 @@ static inline void bw_comb_process_multi(
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]);
+ for (size_t i = 0; i < n_channels; i++)
+ for (size_t j = 0; j < n_channels; j++)
+ BW_ASSERT(i == j || x[i] != y[j]);
#endif
bw_comb_update_coeffs_ctrl(coeffs);
diff --git a/include/bw_comp.h b/include/bw_comp.h
index 695acb6..c64351c 100644
--- a/include/bw_comp.h
+++ b/include/bw_comp.h
@@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 1.1.0 }}}
+ * version {{{ 1.1.1 }}}
* requires {{{
* bw_common bw_env_follow bw_gain bw_math bw_one_pole
* }}}
@@ -29,6 +29,13 @@
* }}}
* changelog {{{
* bw_comp_process_multi()
to
+ * ensure that buffers used for both input and output appear at the
+ * same channel indices.bw_comp_reset_state_multi
,
@@ -658,6 +665,13 @@ static inline void bw_comp_process_multi(
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]);
+ for (size_t i = 0; i < n_channels; i++)
+ for (size_t j = 0; j < n_channels; j++)
+ BW_ASSERT(i == j || x[i] != y[j]);
+ if (x_sc != BW_NULL)
+ for (size_t i = 0; i < n_channels; i++)
+ for (size_t j = 0; j < n_channels; j++)
+ BW_ASSERT(i == j || x_sc[i] != y[j]);
#endif
bw_comp_update_coeffs_ctrl(coeffs);
diff --git a/include/bw_delay.h b/include/bw_delay.h
index 1713c09..d880219 100644
--- a/include/bw_delay.h
+++ b/include/bw_delay.h
@@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 1.1.0 }}}
+ * version {{{ 1.1.1 }}}
* requires {{{ bw_buf bw_common bw_math }}}
* description {{{
* Interpolated delay line, not smoothed.
@@ -31,6 +31,13 @@
* }}}
* changelog {{{
* bw_delay_process_multi()
+ * to ensure that buffers used for both input and output appear at
+ * the same channel indices.BW_NULL
and
@@ -667,6 +674,9 @@ static inline void bw_delay_process_multi(
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]);
+ for (size_t i = 0; i < n_channels; i++)
+ for (size_t j = 0; j < n_channels; j++)
+ BW_ASSERT(i == j || x[i] != y[j]);
#endif
bw_delay_update_coeffs_ctrl(coeffs);
diff --git a/include/bw_dist.h b/include/bw_dist.h
index 7b263d1..8139c85 100644
--- a/include/bw_dist.h
+++ b/include/bw_dist.h
@@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 1.1.0 }}}
+ * version {{{ 1.1.1 }}}
* requires {{{
* bw_clip bw_common bw_gain bw_hp1 bw_lp1 bw_math bw_mm2 bw_one_pole bw_peak
* bw_satur bw_svf
@@ -32,6 +32,13 @@
* }}}
* changelog {{{
* bw_dist_process_multi()
to
+ * ensure that buffers used for both input and output appear at the
+ * same channel indices.BW_NULL
and
@@ -558,6 +565,9 @@ static inline void bw_dist_process_multi(
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]);
+ for (size_t i = 0; i < n_channels; i++)
+ for (size_t j = 0; j < n_channels; j++)
+ BW_ASSERT(i == j || x[i] != y[j]);
#endif
bw_dist_update_coeffs_ctrl(coeffs);
diff --git a/include/bw_drive.h b/include/bw_drive.h
index c6df218..c9c2a10 100644
--- a/include/bw_drive.h
+++ b/include/bw_drive.h
@@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 1.1.0 }}}
+ * version {{{ 1.1.1 }}}
* requires {{{
* bw_common bw_gain bw_hs1 bw_lp1 bw_math bw_mm2 bw_one_pole bw_peak
* bw_satur bw_svf
@@ -32,6 +32,13 @@
* }}}
* changelog {{{
* bw_drive_process_multi()
+ * to ensure that buffers used for both input and output appear at
+ * the same channel indices.BW_NULL
and
@@ -561,6 +568,9 @@ static inline void bw_drive_process_multi(
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]);
+ for (size_t i = 0; i < n_channels; i++)
+ for (size_t j = 0; j < n_channels; j++)
+ BW_ASSERT(i == j || x[i] != y[j]);
#endif
bw_drive_update_coeffs_ctrl(coeffs);
diff --git a/include/bw_dry_wet.h b/include/bw_dry_wet.h
index 0d69093..e97292f 100644
--- a/include/bw_dry_wet.h
+++ b/include/bw_dry_wet.h
@@ -32,6 +32,9 @@
* bw_dry_wet_get_wet()
and
* bw_dry_wet_get_wet_cur()
, and corresponding C++
* API.bw_dry_wet_process_multi()
+ * to ensure that buffers used for both input and output appear at
+ * the same channel indices.bw_env_follow_process_multi()
to ensure that
+ * buffers used for both input and output appear at the same
+ * channel indices.BW_NULL
and
@@ -521,10 +529,14 @@ static inline void bw_env_follow_process_multi(
#endif
BW_ASSERT(x != BW_NULL);
#ifndef BW_NO_DEBUG
- if (y != BW_NULL)
+ if (y != 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] == BW_NULL || y[j] == BW_NULL || y[i] != y[j]);
+ for (size_t i = 0; i < n_channels; i++)
+ for (size_t j = 0; j < n_channels; j++)
+ BW_ASSERT(i == j || x[i] != y[j]);
+ }
#endif
bw_env_follow_update_coeffs_ctrl(coeffs);
diff --git a/include/bw_fuzz.h b/include/bw_fuzz.h
index 7222ba2..1aaa7b1 100644
--- a/include/bw_fuzz.h
+++ b/include/bw_fuzz.h
@@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 1.1.0 }}}
+ * version {{{ 1.1.1 }}}
* requires {{{
* bw_common bw_gain bw_hp1 bw_lp1 bw_math bw_mm2 bw_one_pole bw_peak
* bw_satur bw_svf
@@ -32,6 +32,13 @@
* }}}
* changelog {{{
* bw_fuzz_process_multi()
to
+ * ensure that buffers used for both input and output appear at the
+ * same channel indices.BW_NULL
and
@@ -547,6 +554,9 @@ static inline void bw_fuzz_process_multi(
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]);
+ for (size_t i = 0; i < n_channels; i++)
+ for (size_t j = 0; j < n_channels; j++)
+ BW_ASSERT(i == j || x[i] != y[j]);
#endif
bw_fuzz_update_coeffs_ctrl(coeffs);
diff --git a/include/bw_gain.h b/include/bw_gain.h
index 092169a..d3af93a 100644
--- a/include/bw_gain.h
+++ b/include/bw_gain.h
@@ -20,13 +20,20 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 1.1.0 }}}
+ * version {{{ 1.1.1 }}}
* requires {{{ bw_common bw_math bw_one_pole }}}
* description {{{
* Gain.
* }}}
* changelog {{{
* bw_gain_process_multi()
to
+ * ensure that buffers used for both input and output appear at the
+ * same channel indices.BW_NULL
and
@@ -405,6 +412,9 @@ static inline void bw_gain_process_multi(
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]);
+ for (size_t i = 0; i < n_channels; i++)
+ for (size_t j = 0; j < n_channels; j++)
+ BW_ASSERT(i == j || x[i] != y[j]);
#endif
bw_gain_update_coeffs_ctrl(coeffs);
diff --git a/include/bw_hp1.h b/include/bw_hp1.h
index 5d12252..325805f 100644
--- a/include/bw_hp1.h
+++ b/include/bw_hp1.h
@@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 1.1.0 }}}
+ * version {{{ 1.1.1 }}}
* requires {{{ bw_common bw_lp1 bw_math bw_one_pole }}}
* description {{{
* First-order highpass filter (6 dB/oct) with gain asymptotically
@@ -28,6 +28,13 @@
* }}}
* changelog {{{
* bw_hp1_process_multi()
to
+ * ensure that buffers used for both input and output appear at the
+ * same channel indices.BW_NULL
and
@@ -514,6 +521,9 @@ static inline void bw_hp1_process_multi(
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]);
+ for (size_t i = 0; i < n_channels; i++)
+ for (size_t j = 0; j < n_channels; j++)
+ BW_ASSERT(i == j || x[i] != y[j]);
#endif
bw_hp1_update_coeffs_ctrl(coeffs);
diff --git a/include/bw_hs1.h b/include/bw_hs1.h
index 75d40bd..1cc59d0 100644
--- a/include/bw_hs1.h
+++ b/include/bw_hs1.h
@@ -20,13 +20,20 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 1.1.0 }}}
+ * version {{{ 1.1.1 }}}
* requires {{{ bw_common bw_gain bw_lp1 bw_math bw_mm1 bw_one_pole }}}
* description {{{
* First-order high shelf filter (6 dB/oct) with unitary DC gain.
* }}}
* changelog {{{
* bw_hs1_process_multi()
to
+ * ensure that buffers used for both input and output appear at the
+ * same channel indices.BW_NULL
and
@@ -590,6 +597,9 @@ static inline void bw_hs1_process_multi(
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]);
+ for (size_t i = 0; i < n_channels; i++)
+ for (size_t j = 0; j < n_channels; j++)
+ BW_ASSERT(i == j || x[i] != y[j]);
#endif
bw_hs1_update_coeffs_ctrl(coeffs);
diff --git a/include/bw_hs2.h b/include/bw_hs2.h
index 6a60062..153764a 100644
--- a/include/bw_hs2.h
+++ b/include/bw_hs2.h
@@ -20,13 +20,20 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 1.1.0 }}}
+ * version {{{ 1.1.1 }}}
* requires {{{ bw_common bw_gain bw_math bw_mm2 bw_one_pole bw_svf }}}
* description {{{
* Second-order high shelf filter (12 dB/oct) with unitary DC gain.
* }}}
* changelog {{{
* bw_hs2_process_multi()
to
+ * ensure that buffers used for both input and output appear at the
+ * same channel indices.BW_NULL
and
@@ -618,6 +625,9 @@ static inline void bw_hs2_process_multi(
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]);
+ for (size_t i = 0; i < n_channels; i++)
+ for (size_t j = 0; j < n_channels; j++)
+ BW_ASSERT(i == j || x[i] != y[j]);
#endif
bw_hs2_update_coeffs_ctrl(coeffs);
diff --git a/include/bw_lp1.h b/include/bw_lp1.h
index ce60d31..2a2a6d1 100644
--- a/include/bw_lp1.h
+++ b/include/bw_lp1.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 {{{
* First-order lowpass filter (6 dB/oct) with unitary DC gain.
@@ -30,6 +30,13 @@
* }}}
* changelog {{{
* bw_lp1_process_multi()
to
+ * ensure that buffers used for both input and output appear at the
+ * same channel indices.BW_NULL
and
@@ -565,6 +572,9 @@ static inline void bw_lp1_process_multi(
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]);
+ for (size_t i = 0; i < n_channels; i++)
+ for (size_t j = 0; j < n_channels; j++)
+ BW_ASSERT(i == j || x[i] != y[j]);
#endif
for (size_t i = 0; i < n_samples; i++) {
diff --git a/include/bw_ls1.h b/include/bw_ls1.h
index 96428a1..8513557 100644
--- a/include/bw_ls1.h
+++ b/include/bw_ls1.h
@@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 1.1.0 }}}
+ * version {{{ 1.1.1 }}}
* requires {{{ bw_common bw_gain bw_lp1 bw_math bw_mm1 bw_one_pole }}}
* description {{{
* First-order low shelf filter (6 dB/oct) with gain asymptotically
@@ -28,6 +28,13 @@
* }}}
* changelog {{{
* bw_ls1_process_multi()
to
+ * ensure that buffers used for both input and output appear at the
+ * same channel indices.BW_NULL
and
@@ -588,6 +595,9 @@ static inline void bw_ls1_process_multi(
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]);
+ for (size_t i = 0; i < n_channels; i++)
+ for (size_t j = 0; j < n_channels; j++)
+ BW_ASSERT(i == j || x[i] != y[j]);
#endif
bw_ls1_update_coeffs_ctrl(coeffs);
diff --git a/include/bw_ls2.h b/include/bw_ls2.h
index 5dd6da3..66e27c5 100644
--- a/include/bw_ls2.h
+++ b/include/bw_ls2.h
@@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 1.1.0 }}}
+ * version {{{ 1.1.1 }}}
* requires {{{ bw_common bw_gain bw_math bw_mm2 bw_one_pole bw_svf }}}
* description {{{
* Second-order low shelf filter (12 dB/oct) with gain asymptotically
@@ -28,6 +28,13 @@
* }}}
* changelog {{{
* bw_ls2_process_multi()
to
+ * ensure that buffers used for both input and output appear at the
+ * same channel indices.BW_NULL
and
@@ -624,6 +631,9 @@ static inline void bw_ls2_process_multi(
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]);
+ for (size_t i = 0; i < n_channels; i++)
+ for (size_t j = 0; j < n_channels; j++)
+ BW_ASSERT(i == j || x[i] != y[j]);
#endif
bw_ls2_update_coeffs_ctrl(coeffs);
diff --git a/include/bw_mm1.h b/include/bw_mm1.h
index 08f4304..fc19c70 100644
--- a/include/bw_mm1.h
+++ b/include/bw_mm1.h
@@ -20,13 +20,20 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 1.1.0 }}}
+ * version {{{ 1.1.1 }}}
* requires {{{ bw_common bw_gain bw_lp1 bw_math bw_one_pole }}}
* description {{{
* First-order multimode filter.
* }}}
* changelog {{{
* bw_mm1_process_multi()
to
+ * ensure that buffers used for both input and output appear at the
+ * same channel indices.bw_mm2_process_multi()
to
+ * ensure that buffers used for both input and output appear at the
+ * same channel indices.bw_noise_gate_process_multi()
to ensure that
+ * buffers used for both input and output appear at the same
+ * channel indices.bw_noise_gate_reset_state_multi
,
@@ -598,7 +606,8 @@ static inline void bw_noise_gate_process(
static inline void bw_noise_gate_process_multi(
bw_noise_gate_coeffs * BW_RESTRICT coeffs,
bw_noise_gate_state * BW_RESTRICT const * BW_RESTRICT state,
- const float * const * x, const float * const * x_sc,
+ const float * const * x,
+ const float * const * x_sc,
float * const * y,
size_t n_channels,
size_t n_samples) {
@@ -617,6 +626,13 @@ static inline void bw_noise_gate_process_multi(
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]);
+ for (size_t i = 0; i < n_channels; i++)
+ for (size_t j = 0; j < n_channels; j++)
+ BW_ASSERT(i == j || x[i] != y[j]);
+ if (x_sc != BW_NULL)
+ for (size_t i = 0; i < n_channels; i++)
+ for (size_t j = 0; j < n_channels; j++)
+ BW_ASSERT(i == j || x_sc[i] != y[j]);
#endif
bw_noise_gate_update_coeffs_ctrl(coeffs);
diff --git a/include/bw_notch.h b/include/bw_notch.h
index 52d74e3..3807d66 100644
--- a/include/bw_notch.h
+++ b/include/bw_notch.h
@@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 1.1.0 }}}
+ * version {{{ 1.1.1 }}}
* requires {{{ bw_common bw_math bw_one_pole bw_svf }}}
* description {{{
* Second-order notch filter with unitary gain at DC and asymptotically as
@@ -28,6 +28,13 @@
* }}}
* changelog {{{
* bw_notch_process_multi()
+ * to ensure that buffers used for both input and output appear at
+ * the same channel indices.BW_NULL
and
@@ -529,6 +536,9 @@ static inline void bw_notch_process_multi(
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]);
+ for (size_t i = 0; i < n_channels; i++)
+ for (size_t j = 0; j < n_channels; j++)
+ BW_ASSERT(i == j || x[i] != y[j]);
#endif
bw_notch_update_coeffs_ctrl(coeffs);
diff --git a/include/bw_one_pole.h b/include/bw_one_pole.h
index 4c638a0..6d47693 100644
--- a/include/bw_one_pole.h
+++ b/include/bw_one_pole.h
@@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 1.1.0 }}}
+ * version {{{ 1.1.1 }}}
* requires {{{ bw_common bw_math }}}
* description {{{
* One-pole (6 dB/oct) lowpass filter with unitary DC gain, separate attack
@@ -30,6 +30,14 @@
* }}}
* changelog {{{
* bw_one_pole_process_multi()
to ensure that buffers
+ * used for both input and output appear at the same channel
+ * indices.BW_NULL
and
@@ -901,10 +909,14 @@ static inline void bw_one_pole_process_multi(
#endif
BW_ASSERT(x != BW_NULL);
#ifndef BW_NO_DEBUG
- if (y != BW_NULL)
+ if (y != 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] == BW_NULL || y[j] == BW_NULL || y[i] != y[j]);
+ for (size_t i = 0; i < n_channels; i++)
+ for (size_t j = 0; j < n_channels; j++)
+ BW_ASSERT(i == j || x[i] != y[j]);
+ }
#endif
bw_one_pole_update_coeffs_ctrl(coeffs);
diff --git a/include/bw_osc_filt.h b/include/bw_osc_filt.h
index 852ac2a..805949c 100644
--- a/include/bw_osc_filt.h
+++ b/include/bw_osc_filt.h
@@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 1.1.0 }}}
+ * version {{{ 1.1.1 }}}
* requires {{{ bw_common }}}
* description {{{
* Post-filter to decolorate oscillator waveshapers when antialiasing is on.
@@ -33,6 +33,14 @@
* }}}
* changelog {{{
* bw_osc_filt_process_multi()
to ensure that buffers
+ * used for both input and output appear at the same channel
+ * indices.BW_NULL
and
@@ -290,6 +298,9 @@ static inline void bw_osc_filt_process_multi(
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]);
+ for (size_t i = 0; i < n_channels; i++)
+ for (size_t j = 0; j < n_channels; j++)
+ BW_ASSERT(i == j || x[i] != y[j]);
#endif
for (size_t i = 0; i < n_channels; i++)
diff --git a/include/bw_osc_pulse.h b/include/bw_osc_pulse.h
index fde1832..6f2b7d6 100644
--- a/include/bw_osc_pulse.h
+++ b/include/bw_osc_pulse.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 {{{
* Pulse oscillator waveshaper with variable pulse width (actually, duty
@@ -37,6 +37,15 @@
* }}}
* changelog {{{
* bw_osc_pulse_process_multi()
to ensure that
+ * x_inc
is not BW_NULL
when antialiasing
+ * is on and that buffers used for both input and output appear at
+ * the same channel indices.BW_NULL
and
@@ -467,11 +476,19 @@ static inline void bw_osc_pulse_process_multi(
BW_ASSERT_DEEP(bw_osc_pulse_coeffs_is_valid(coeffs));
BW_ASSERT_DEEP(coeffs->state >= bw_osc_pulse_coeffs_state_reset_coeffs);
BW_ASSERT(x != BW_NULL);
+ BW_ASSERT(coeffs->antialiasing ? x_inc != BW_NULL : 1);
BW_ASSERT(y != BW_NULL);
#ifndef BW_NO_DEBUG
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]);
+ for (size_t i = 0; i < n_channels; i++)
+ for (size_t j = 0; j < n_channels; j++)
+ BW_ASSERT(i == j || x[i] != y[j]);
+ if (coeffs->antialiasing)
+ for (size_t i = 0; i < n_channels; i++)
+ for (size_t j = 0; j < n_channels; j++)
+ BW_ASSERT(i == j || x_inc[i] != y[j]);
#endif
if (coeffs->antialiasing)
diff --git a/include/bw_osc_saw.h b/include/bw_osc_saw.h
index 5ac7fde..7f43f0a 100644
--- a/include/bw_osc_saw.h
+++ b/include/bw_osc_saw.h
@@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 1.1.0 }}}
+ * version {{{ 1.1.1 }}}
* requires {{{ bw_common bw_math }}}
* description {{{
* Sawtooth oscillator waveshaper with PolyBLEP antialiasing.
@@ -36,6 +36,15 @@
* }}}
* changelog {{{
* bw_osc_saw_process_multi()
to ensure that
+ * x_inc
is not BW_NULL
when antialiasing
+ * is on and that buffers used for both input and output appear at
+ * the same channel indices.BW_NULL
and
@@ -434,11 +443,19 @@ static inline void bw_osc_saw_process_multi(
BW_ASSERT_DEEP(bw_osc_saw_coeffs_is_valid(coeffs));
BW_ASSERT_DEEP(coeffs->state >= bw_osc_saw_coeffs_state_reset_coeffs);
BW_ASSERT(x != BW_NULL);
+ BW_ASSERT(coeffs->antialiasing ? x_inc != BW_NULL : 1);
BW_ASSERT(y != BW_NULL);
#ifndef BW_NO_DEBUG
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]);
+ for (size_t i = 0; i < n_channels; i++)
+ for (size_t j = 0; j < n_channels; j++)
+ BW_ASSERT(i == j || x[i] != y[j]);
+ if (coeffs->antialiasing)
+ for (size_t i = 0; i < n_channels; i++)
+ for (size_t j = 0; j < n_channels; j++)
+ BW_ASSERT(i == j || x_inc[i] != y[j]);
#endif
if (x_inc != BW_NULL)
diff --git a/include/bw_osc_sin.h b/include/bw_osc_sin.h
index 3463ef3..b601d48 100644
--- a/include/bw_osc_sin.h
+++ b/include/bw_osc_sin.h
@@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 1.1.0 }}}
+ * version {{{ 1.1.1 }}}
* requires {{{ bw_common bw_math }}}
* description {{{
* Sinusoidal oscillator waveshaper.
@@ -30,6 +30,13 @@
* }}}
* changelog {{{
* bw_osc_sin_process_multi()
+ * to ensure that buffers used for both input and output appear at
+ * the same channel indices.BW_NULL
and
@@ -176,6 +183,9 @@ static inline void bw_osc_sin_process_multi(
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]);
+ for (size_t i = 0; i < n_channels; i++)
+ for (size_t j = 0; j < n_channels; j++)
+ BW_ASSERT(i == j || x[i] != y[j]);
#endif
for (size_t i = 0; i < n_channels; i++)
diff --git a/include/bw_osc_tri.h b/include/bw_osc_tri.h
index f46a70f..bdfba0d 100644
--- a/include/bw_osc_tri.h
+++ b/include/bw_osc_tri.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 {{{
* Triangle oscillator waveshaper with variable slope (increasing time over
@@ -37,6 +37,15 @@
* }}}
* changelog {{{
* bw_osc_tri_process_multi()
to ensure that
+ * x_inc
is not BW_NULL
when antialiasing
+ * is on and that buffers used for both input and output appear at
+ * the same channel indices.BW_NULL
and
@@ -474,11 +483,19 @@ static inline void bw_osc_tri_process_multi(
BW_ASSERT_DEEP(bw_osc_tri_coeffs_is_valid(coeffs));
BW_ASSERT_DEEP(coeffs->state >= bw_osc_tri_coeffs_state_reset_coeffs);
BW_ASSERT(x != BW_NULL);
+ BW_ASSERT(coeffs->antialiasing ? x_inc != BW_NULL : 1);
BW_ASSERT(y != BW_NULL);
#ifndef BW_NO_DEBUG
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]);
+ for (size_t i = 0; i < n_channels; i++)
+ for (size_t j = 0; j < n_channels; j++)
+ BW_ASSERT(i == j || x[i] != y[j]);
+ if (coeffs->antialiasing)
+ for (size_t i = 0; i < n_channels; i++)
+ for (size_t j = 0; j < n_channels; j++)
+ BW_ASSERT(i == j || x_inc[i] != y[j]);
#endif
if (coeffs->antialiasing)
diff --git a/include/bw_pan.h b/include/bw_pan.h
index 8bc369a..cf7b47d 100644
--- a/include/bw_pan.h
+++ b/include/bw_pan.h
@@ -20,13 +20,20 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 1.1.0 }}}
+ * version {{{ 1.1.1 }}}
* requires {{{ bw_common bw_gain bw_math bw_one_pole }}}
* description {{{
* Stereo panner with -3 dB center pan law.
* }}}
* changelog {{{
* bw_pan_process_multi()
to
+ * ensure that buffers used for both input and output appear at the
+ * same channel indices.BW_NULL
and
@@ -390,6 +397,11 @@ static inline void bw_pan_process_multi(
for (size_t i = 0; i < n_channels; i++)
for (size_t j = 0; j < n_channels; j++)
BW_ASSERT(y_l[i] != y_r[j]);
+ for (size_t i = 0; i < n_channels; i++)
+ for (size_t j = 0; j < n_channels; j++) {
+ BW_ASSERT(i == j || x[i] != y_l[j]);
+ BW_ASSERT(i == j || x[i] != y_r[j]);
+ }
#endif
bw_pan_update_coeffs_ctrl(coeffs);
diff --git a/include/bw_peak.h b/include/bw_peak.h
index bbfe8ff..e5b6d39 100644
--- a/include/bw_peak.h
+++ b/include/bw_peak.h
@@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 1.1.0 }}}
+ * version {{{ 1.1.1 }}}
* requires {{{ bw_common bw_gain bw_math bw_mm2 bw_one_pole bw_svf }}}
* description {{{
* Second-order peak filter with unitary gain at DC and asymptotically
@@ -35,6 +35,13 @@
* }}}
* changelog {{{
* bw_peak_process_multi()
to
+ * ensure that buffers used for both input and output appear at the
+ * same channel indices.BW_NULL
and
@@ -678,6 +685,9 @@ static inline void bw_peak_process_multi(
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]);
+ for (size_t i = 0; i < n_channels; i++)
+ for (size_t j = 0; j < n_channels; j++)
+ BW_ASSERT(i == j || x[i] != y[j]);
#endif
bw_peak_update_coeffs_ctrl(coeffs);
diff --git a/include/bw_phase_gen.h b/include/bw_phase_gen.h
index df72896..1693d3e 100644
--- a/include/bw_phase_gen.h
+++ b/include/bw_phase_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 {{{
* Phase generator with portamento and exponential frequency modulation.
@@ -29,6 +29,17 @@
* }}}
* changelog {{{
* bw_phase_gen_process_multi()
to ensure that buffers
+ * used for both input and output appear at the same channel
+ * indices.bw_phase_gen_process_multi()
by which
+ * debugging code could report false negatives when
+ * BW_NULL
buffers are used.bw_phaser_process_multi()
+ * to ensure that buffers used for both input and output appear at
+ * the same channel indices.BW_NULL
and
@@ -548,6 +555,9 @@ static inline void bw_phaser_process_multi(
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]);
+ for (size_t i = 0; i < n_channels; i++)
+ for (size_t j = 0; j < n_channels; j++)
+ BW_ASSERT(i == j || x[i] != y[j]);
#endif
BW_ASSERT(x != BW_NULL);
BW_ASSERT(y != BW_NULL);
diff --git a/include/bw_pink_filt.h b/include/bw_pink_filt.h
index b5f7f2c..94f2b67 100644
--- a/include/bw_pink_filt.h
+++ b/include/bw_pink_filt.h
@@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 1.1.0 }}}
+ * version {{{ 1.1.1 }}}
* requires {{{ bw_common }}}
* description {{{
* Pinking filter.
@@ -40,6 +40,14 @@
* }}}
* changelog {{{
* bw_pink_filt_process_multi()
to ensure that buffers
+ * used for both input and output appear at the same channel
+ * indices.BW_NULL
and
@@ -576,6 +584,9 @@ static inline void bw_pink_filt_process_multi(
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]);
+ for (size_t i = 0; i < n_channels; i++)
+ for (size_t j = 0; j < n_channels; j++)
+ BW_ASSERT(i == j || x[i] != y[j]);
#endif
for (size_t i = 0; i < n_channels; i++)
diff --git a/include/bw_ppm.h b/include/bw_ppm.h
index 40542ee..6dfe5aa 100644
--- a/include/bw_ppm.h
+++ b/include/bw_ppm.h
@@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 1.1.0 }}}
+ * version {{{ 1.1.1 }}}
* requires {{{ bw_common bw_env_follow bw_math bw_one_pole }}}
* description {{{
* Digital peak programme meter with adjustable integration time constant.
@@ -30,6 +30,13 @@
* }}}
* changelog {{{
* bw_ppm_process_multi()
to
+ * ensure that buffers used for both input and output appear at the
+ * same channel indices.BW_NULL
and
@@ -509,10 +516,14 @@ static inline void bw_ppm_process_multi(
#endif
BW_ASSERT(x != BW_NULL);
#ifndef BW_NO_DEBUG
- if (y != BW_NULL)
+ if (y != 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] == BW_NULL || y[j] == BW_NULL || y[i] != y[j]);
+ for (size_t i = 0; i < n_channels; i++)
+ for (size_t j = 0; j < n_channels; j++)
+ BW_ASSERT(i == j || x[i] != y[j]);
+ }
#endif
bw_ppm_update_coeffs_ctrl(coeffs);
diff --git a/include/bw_reverb.h b/include/bw_reverb.h
index 4d7d6ea..177add1 100644
--- a/include/bw_reverb.h
+++ b/include/bw_reverb.h
@@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 1.1.0 }}}
+ * version {{{ 1.1.1 }}}
* requires {{{
* bw_buf bw_common bw_delay bw_dry_wet bw_gain bw_lp1 bw_math bw_one_pole
* bw_osc_sin bw_phase_gen
@@ -35,6 +35,13 @@
* }}}
* changelog {{{
* bw_reverb_process_multi()
+ * to ensure that buffers used for both input and output appear at
+ * the same channel indices.bw_ring_mod_process_multi()
to ensure that buffers
+ * used for both input and output appear at the same channel
+ * indices.BW_NULL
and
@@ -362,6 +370,11 @@ static inline void bw_ring_mod_process_multi(
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]);
+ for (size_t i = 0; i < n_channels; i++)
+ for (size_t j = 0; j < n_channels; j++) {
+ BW_ASSERT(i == j || x_mod[i] != y[j]);
+ BW_ASSERT(i == j || x_car[i] != y[j]);
+ }
#endif
for (size_t i = 0; i < n_samples; i++) {
diff --git a/include/bw_satur.h b/include/bw_satur.h
index d94bef3..d069216 100644
--- a/include/bw_satur.h
+++ b/include/bw_satur.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 {{{
* Antialiased tanh-based saturation with parametric bias and gain
@@ -45,6 +45,13 @@
* }}}
* changelog {{{
* bw_satur_process_multi()
+ * to ensure that buffers used for both input and output appear at
+ * the same channel indices.bw_satur_process_multi().
bw_slew_lim_process_multi()
to ensure that buffers
+ * used for both input and output appear at the same channel
+ * indices.BW_NULL
and
@@ -677,10 +685,14 @@ static inline void bw_slew_lim_process_multi(
#endif
BW_ASSERT(x != BW_NULL);
#ifndef BW_NO_DEBUG
- if (y != BW_NULL)
+ if (y != 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] == BW_NULL || y[j] == BW_NULL || y[i] != y[j]);
+ for (size_t i = 0; i < n_channels; i++)
+ for (size_t j = 0; j < n_channels; j++)
+ BW_ASSERT(i == j || x[i] != y[j]);
+ }
#endif
bw_slew_lim_update_coeffs_ctrl(coeffs);
diff --git a/include/bw_sr_reduce.h b/include/bw_sr_reduce.h
index 03535d6..0337d94 100644
--- a/include/bw_sr_reduce.h
+++ b/include/bw_sr_reduce.h
@@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 1.1.0 }}}
+ * version {{{ 1.1.1 }}}
* requires {{{ bw_common bw_math }}}
* description {{{
* Sample rate reducer.
@@ -31,6 +31,14 @@
* }}}
* changelog {{{
* bw_sr_reduce_process_multi()
to ensure that buffers
+ * used for both input and output appear at the same channel
+ * indices.BW_NULL
and
@@ -494,6 +502,9 @@ static inline void bw_sr_reduce_process_multi(
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]);
+ for (size_t i = 0; i < n_channels; i++)
+ for (size_t j = 0; j < n_channels; j++)
+ BW_ASSERT(i == j || x[i] != y[j]);
#endif
for (size_t i = 0; i < n_channels; i++)
diff --git a/include/bw_svf.h b/include/bw_svf.h
index 6fa0bda..28a7d80 100644
--- a/include/bw_svf.h
+++ b/include/bw_svf.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 {{{
* State variable filter (2nd order, 12 dB/oct) model with separated lowpass,
@@ -28,6 +28,13 @@
* }}}
* changelog {{{
* bw_svf_process_multi()
to
+ * ensure that buffers used for both input and output appear at the
+ * same channel indices.BW_NULL
and
@@ -773,18 +780,30 @@ static inline void bw_svf_process_multi(
BW_ASSERT(y_lp == BW_NULL || y_hp == BW_NULL || y_lp != y_hp);
BW_ASSERT(y_bp == BW_NULL || y_hp == BW_NULL || y_bp != y_hp);
#ifndef BW_NO_DEBUG
- if (y_lp != BW_NULL)
+ if (y_lp != BW_NULL) {
for (size_t i = 0; i < n_channels; i++)
for (size_t j = i + 1; j < n_channels; j++)
BW_ASSERT(y_lp[i] == BW_NULL || y_lp[j] == BW_NULL || y_lp[i] != y_lp[j]);
- if (y_bp != BW_NULL)
+ for (size_t i = 0; i < n_channels; i++)
+ for (size_t j = 0; j < n_channels; j++)
+ BW_ASSERT(i == j || x[i] != y_lp[j]);
+ }
+ if (y_bp != BW_NULL) {
for (size_t i = 0; i < n_channels; i++)
for (size_t j = i + 1; j < n_channels; j++)
BW_ASSERT(y_bp[i] == BW_NULL || y_bp[j] == BW_NULL || y_bp[i] != y_bp[j]);
- if (y_hp != BW_NULL)
+ for (size_t i = 0; i < n_channels; i++)
+ for (size_t j = 0; j < n_channels; j++)
+ BW_ASSERT(i == j || x[i] != y_bp[j]);
+ }
+ if (y_hp != BW_NULL) {
for (size_t i = 0; i < n_channels; i++)
for (size_t j = i + 1; j < n_channels; j++)
BW_ASSERT(y_hp[i] == BW_NULL || y_hp[j] == BW_NULL || y_hp[i] != y_hp[j]);
+ for (size_t i = 0; i < n_channels; i++)
+ for (size_t j = 0; j < n_channels; j++)
+ BW_ASSERT(i == j || x[i] != y_hp[j]);
+ }
if (y_lp != BW_NULL && y_bp != BW_NULL)
for (size_t i = 0; i < n_channels; i++)
for (size_t j = 0; j < n_channels; j++)
diff --git a/include/bw_trem.h b/include/bw_trem.h
index bba2bae..56181b7 100644
--- a/include/bw_trem.h
+++ b/include/bw_trem.h
@@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 1.1.0 }}}
+ * version {{{ 1.1.1 }}}
* requires {{{
* bw_common bw_math bw_one_pole bw_osc_sin bw_phase_gen bw_ring_mod
* }}}
@@ -29,6 +29,13 @@
* }}}
* changelog {{{
* bw_trem_process_multi()
to
+ * ensure that buffers used for both input and output appear at the
+ * same channel indices.BW_NULL
and
@@ -511,6 +518,9 @@ static inline void bw_trem_process_multi(
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]);
+ for (size_t i = 0; i < n_channels; i++)
+ for (size_t j = 0; j < n_channels; j++)
+ BW_ASSERT(i == j || x[i] != y[j]);
#endif
bw_trem_update_coeffs_ctrl(coeffs);
diff --git a/include/bw_wah.h b/include/bw_wah.h
index d9d1d98..1ee3db7 100644
--- a/include/bw_wah.h
+++ b/include/bw_wah.h
@@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 1.1.0 }}}
+ * version {{{ 1.1.1 }}}
* requires {{{ bw_common bw_math bw_one_pole bw_svf }}}
* description {{{
* Wah effect.
@@ -29,6 +29,13 @@
* }}}
* changelog {{{
* bw_wah_process_multi()
to
+ * ensure that buffers used for both input and output appear at the
+ * same channel indices.BW_NULL
and
@@ -501,6 +508,9 @@ static inline void bw_wah_process_multi(
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]);
+ for (size_t i = 0; i < n_channels; i++)
+ for (size_t j = 0; j < n_channels; j++)
+ BW_ASSERT(i == j || x[i] != y[j]);
#endif
bw_wah_update_coeffs_ctrl(coeffs);