more debug + cosmetics
This commit is contained in:
parent
eb8b057492
commit
8ee4150889
2
TODO
2
TODO
@ -2,8 +2,6 @@
|
||||
-----
|
||||
|
||||
* test flush-to-zero on arm
|
||||
* debugging - also check outputs different (incl bw_buf)
|
||||
* check all examples again (from fxpp_noise_gate)
|
||||
* clearly specify that state is tied to a particular set of coeffs (1:N)
|
||||
* state that sample rate is finite and > 0
|
||||
* state that audio cannot be inf (also in reset)
|
||||
|
@ -397,6 +397,11 @@ static inline void bw_ap1_reset_state_multi(
|
||||
BW_ASSERT_DEEP(bw_ap1_coeffs_is_valid(coeffs));
|
||||
BW_ASSERT_DEEP(coeffs->state >= bw_ap1_coeffs_state_reset_coeffs);
|
||||
BW_ASSERT(state != 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(state[i] != state[j]);
|
||||
#endif
|
||||
BW_ASSERT(x_0 != NULL);
|
||||
|
||||
if (y_0 != NULL)
|
||||
@ -495,8 +500,18 @@ static inline void bw_ap1_process_multi(
|
||||
BW_ASSERT_DEEP(bw_ap1_coeffs_is_valid(coeffs));
|
||||
BW_ASSERT_DEEP(coeffs->state >= bw_ap1_coeffs_state_reset_coeffs);
|
||||
BW_ASSERT(state != 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(state[i] != state[j]);
|
||||
#endif
|
||||
BW_ASSERT(x != NULL);
|
||||
BW_ASSERT(y != 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]);
|
||||
#endif
|
||||
|
||||
bw_ap1_update_coeffs_ctrl(coeffs);
|
||||
for (size_t i = 0; i < n_samples; i++) {
|
||||
|
@ -408,6 +408,11 @@ static inline void bw_ap2_reset_state_multi(
|
||||
BW_ASSERT_DEEP(bw_ap2_coeffs_is_valid(coeffs));
|
||||
BW_ASSERT_DEEP(coeffs->state >= bw_ap2_coeffs_state_reset_coeffs);
|
||||
BW_ASSERT(state != 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(state[i] != state[j]);
|
||||
#endif
|
||||
BW_ASSERT(x_0 != NULL);
|
||||
|
||||
if (y_0 != NULL)
|
||||
@ -508,8 +513,18 @@ static inline void bw_ap2_process_multi(
|
||||
BW_ASSERT_DEEP(bw_ap2_coeffs_is_valid(coeffs));
|
||||
BW_ASSERT_DEEP(coeffs->state >= bw_ap2_coeffs_state_reset_coeffs);
|
||||
BW_ASSERT(state != 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(state[i] != state[j]);
|
||||
#endif
|
||||
BW_ASSERT(x != NULL);
|
||||
BW_ASSERT(y != 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]);
|
||||
#endif
|
||||
|
||||
bw_ap2_update_coeffs_ctrl(coeffs);
|
||||
for (size_t i = 0; i < n_samples; i++) {
|
||||
|
@ -326,6 +326,7 @@ static inline void bw_balance_process1(
|
||||
BW_ASSERT_DEEP(coeffs->state >= bw_balance_coeffs_state_reset_coeffs);
|
||||
BW_ASSERT(bw_is_finite(x_l));
|
||||
BW_ASSERT(bw_is_finite(x_r));
|
||||
BW_ASSERT(y_l != y_r);
|
||||
|
||||
*y_l = bw_gain_process1(&coeffs->l_coeffs, x_l);
|
||||
*y_r = bw_gain_process1(&coeffs->r_coeffs, x_r);
|
||||
@ -352,6 +353,7 @@ static inline void bw_balance_process(
|
||||
BW_ASSERT_DEEP(bw_has_only_finite(x_r, n_samples));
|
||||
BW_ASSERT(y_l != NULL);
|
||||
BW_ASSERT(y_r != NULL);
|
||||
BW_ASSERT(y_l != y_r);
|
||||
|
||||
bw_balance_update_coeffs_ctrl(coeffs);
|
||||
for (size_t i = 0; i < n_samples; i++) {
|
||||
@ -380,6 +382,16 @@ static inline void bw_balance_process_multi(
|
||||
BW_ASSERT(x_r != NULL);
|
||||
BW_ASSERT(y_l != NULL);
|
||||
BW_ASSERT(y_r != 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_l[i] != y_l[j]);
|
||||
BW_ASSERT(y_r[i] != y_r[j]);
|
||||
}
|
||||
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]);
|
||||
#endif
|
||||
|
||||
bw_balance_update_coeffs_ctrl(coeffs);
|
||||
for (size_t i = 0; i < n_samples; i++) {
|
||||
|
@ -106,7 +106,7 @@ static inline void bw_bd_reduce_set_sample_rate(
|
||||
* #### bw_bd_reduce_reset_coeffs()
|
||||
* ```>>> */
|
||||
static inline void bw_bd_reduce_reset_coeffs(
|
||||
bw_bd_reduce_coeffs *BW_RESTRICT coeffs);
|
||||
bw_bd_reduce_coeffs * BW_RESTRICT coeffs);
|
||||
/*! <<<```
|
||||
* Resets coefficients in `coeffs` to assume their target values.
|
||||
*
|
||||
@ -351,6 +351,11 @@ static inline void bw_bd_reduce_process_multi(
|
||||
BW_ASSERT_DEEP(coeffs->state >= bw_bd_reduce_coeffs_state_reset_coeffs);
|
||||
BW_ASSERT(x != NULL);
|
||||
BW_ASSERT(y != 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]);
|
||||
#endif
|
||||
|
||||
bw_bd_reduce_update_coeffs_ctrl(coeffs);
|
||||
for (size_t i = 0; i < n_samples; i++)
|
||||
|
@ -335,6 +335,11 @@ static inline void bw_buf_fill_multi(
|
||||
size_t n_elems) {
|
||||
BW_ASSERT(!bw_is_nan(k));
|
||||
BW_ASSERT(dest != 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(dest[i] != dest[j]);
|
||||
#endif
|
||||
|
||||
for (size_t i = 0; i < n_channels; i++)
|
||||
bw_buf_fill(k, dest[i], n_elems);
|
||||
@ -347,6 +352,11 @@ static inline void bw_buf_neg_multi(
|
||||
size_t n_elems) {
|
||||
BW_ASSERT(src != NULL);
|
||||
BW_ASSERT(dest != 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(dest[i] != dest[j]);
|
||||
#endif
|
||||
|
||||
for (size_t i = 0; i < n_channels; i++)
|
||||
bw_buf_neg(src[i], dest[i], n_elems);
|
||||
@ -361,6 +371,11 @@ static inline void bw_buf_add_multi(
|
||||
BW_ASSERT(src != NULL);
|
||||
BW_ASSERT(!bw_is_nan(k));
|
||||
BW_ASSERT(dest != 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(dest[i] != dest[j]);
|
||||
#endif
|
||||
|
||||
for (size_t i = 0; i < n_channels; i++)
|
||||
bw_buf_add(src[i], k, dest[i], n_elems);
|
||||
@ -375,6 +390,11 @@ static inline void bw_buf_scale_multi(
|
||||
BW_ASSERT(src != NULL);
|
||||
BW_ASSERT(!bw_is_nan(k));
|
||||
BW_ASSERT(dest != 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(dest[i] != dest[j]);
|
||||
#endif
|
||||
|
||||
for (size_t i = 0; i < n_channels; i++)
|
||||
bw_buf_scale(src[i], k, dest[i], n_elems);
|
||||
@ -389,6 +409,11 @@ static inline void bw_buf_mix_multi(
|
||||
BW_ASSERT(src1 != NULL);
|
||||
BW_ASSERT(src2 != NULL);
|
||||
BW_ASSERT(dest != 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(dest[i] != dest[j]);
|
||||
#endif
|
||||
|
||||
for (size_t i = 0; i < n_channels; i++)
|
||||
bw_buf_mix(src1[i], src2[i], dest[i], n_elems);
|
||||
@ -403,6 +428,11 @@ static inline void bw_buf_mul_multi(
|
||||
BW_ASSERT(src1 != NULL);
|
||||
BW_ASSERT(src2 != NULL);
|
||||
BW_ASSERT(dest != 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(dest[i] != dest[j]);
|
||||
#endif
|
||||
|
||||
for (size_t i = 0; i < n_channels; i++)
|
||||
bw_buf_mul(src1[i], src2[i], dest[i], n_elems);
|
||||
|
@ -532,6 +532,11 @@ static inline void bw_chorus_reset_state_multi(
|
||||
BW_ASSERT_DEEP(bw_chorus_coeffs_is_valid(coeffs));
|
||||
BW_ASSERT_DEEP(coeffs->state >= bw_chorus_coeffs_state_reset_coeffs);
|
||||
BW_ASSERT(state != 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(state[i] != state[j]);
|
||||
#endif
|
||||
BW_ASSERT(x_0 != NULL);
|
||||
|
||||
if (y_0 != NULL)
|
||||
@ -640,8 +645,18 @@ static inline void bw_chorus_process_multi(
|
||||
BW_ASSERT_DEEP(bw_chorus_coeffs_is_valid(coeffs));
|
||||
BW_ASSERT_DEEP(coeffs->state >= bw_chorus_coeffs_state_reset_coeffs);
|
||||
BW_ASSERT(state != 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(state[i] != state[j]);
|
||||
#endif
|
||||
BW_ASSERT(x != NULL);
|
||||
BW_ASSERT(y != 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]);
|
||||
#endif
|
||||
|
||||
bw_chorus_update_coeffs_ctrl(coeffs);
|
||||
for (size_t i = 0; i < n_samples; i++) {
|
||||
|
@ -451,6 +451,11 @@ static inline void bw_clip_reset_state_multi(
|
||||
BW_ASSERT_DEEP(bw_clip_coeffs_is_valid(coeffs));
|
||||
BW_ASSERT_DEEP(coeffs->state >= bw_clip_coeffs_state_reset_coeffs);
|
||||
BW_ASSERT(state != 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(state[i] != state[j]);
|
||||
#endif
|
||||
BW_ASSERT(x_0 != NULL);
|
||||
|
||||
if (y_0 != NULL)
|
||||
@ -578,8 +583,18 @@ static inline void bw_clip_process_multi(
|
||||
BW_ASSERT_DEEP(bw_clip_coeffs_is_valid(coeffs));
|
||||
BW_ASSERT_DEEP(coeffs->state >= bw_clip_coeffs_state_reset_coeffs);
|
||||
BW_ASSERT(state != 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(state[i] != state[j]);
|
||||
#endif
|
||||
BW_ASSERT(x != NULL);
|
||||
BW_ASSERT(y != 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]);
|
||||
#endif
|
||||
|
||||
if (coeffs->gain_compensation)
|
||||
for (size_t i = 0; i < n_samples; i++) {
|
||||
|
@ -586,6 +586,11 @@ static inline void bw_comb_reset_state_multi(
|
||||
BW_ASSERT_DEEP(bw_comb_coeffs_is_valid(coeffs));
|
||||
BW_ASSERT_DEEP(coeffs->state >= bw_comb_coeffs_state_reset_coeffs);
|
||||
BW_ASSERT(state != 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(state[i] != state[j]);
|
||||
#endif
|
||||
BW_ASSERT(x_0 != NULL);
|
||||
|
||||
if (y_0 != NULL)
|
||||
@ -696,8 +701,18 @@ static inline void bw_comb_process_multi(
|
||||
BW_ASSERT_DEEP(bw_comb_coeffs_is_valid(coeffs));
|
||||
BW_ASSERT_DEEP(coeffs->state >= bw_comb_coeffs_state_reset_coeffs);
|
||||
BW_ASSERT(state != 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(state[i] != state[j]);
|
||||
#endif
|
||||
BW_ASSERT(x != NULL);
|
||||
BW_ASSERT(y != 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]);
|
||||
#endif
|
||||
|
||||
bw_comb_update_coeffs_ctrl(coeffs);
|
||||
for (size_t i = 0; i < n_samples; i++) {
|
||||
|
@ -492,6 +492,11 @@ static inline void bw_comp_reset_state_multi(
|
||||
BW_ASSERT_DEEP(bw_comp_coeffs_is_valid(coeffs));
|
||||
BW_ASSERT_DEEP(coeffs->state >= bw_comp_coeffs_state_reset_coeffs);
|
||||
BW_ASSERT(state != 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(state[i] != state[j]);
|
||||
#endif
|
||||
BW_ASSERT(x_0 != NULL);
|
||||
BW_ASSERT(x_sc_0 != NULL);
|
||||
|
||||
@ -604,9 +609,19 @@ static inline void bw_comp_process_multi(
|
||||
BW_ASSERT_DEEP(bw_comp_coeffs_is_valid(coeffs));
|
||||
BW_ASSERT_DEEP(coeffs->state >= bw_comp_coeffs_state_reset_coeffs);
|
||||
BW_ASSERT(state != 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(state[i] != state[j]);
|
||||
#endif
|
||||
BW_ASSERT(x != NULL);
|
||||
BW_ASSERT(x_sc != NULL);
|
||||
BW_ASSERT(y != 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]);
|
||||
#endif
|
||||
|
||||
bw_comp_update_coeffs_ctrl(coeffs);
|
||||
for (size_t i = 0; i < n_samples; i++) {
|
||||
|
@ -496,6 +496,11 @@ static inline void bw_delay_reset_state_multi(
|
||||
BW_ASSERT_DEEP(bw_delay_coeffs_is_valid(coeffs));
|
||||
BW_ASSERT_DEEP(coeffs->state >= bw_delay_coeffs_state_reset_coeffs);
|
||||
BW_ASSERT(state != 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(state[i] != state[j]);
|
||||
#endif
|
||||
BW_ASSERT(x_0 != NULL);
|
||||
|
||||
if (y_0 != NULL)
|
||||
@ -643,8 +648,18 @@ static inline void bw_delay_process_multi(
|
||||
BW_ASSERT_DEEP(bw_delay_coeffs_is_valid(coeffs));
|
||||
BW_ASSERT_DEEP(coeffs->state >= bw_delay_coeffs_state_reset_coeffs);
|
||||
BW_ASSERT(state != 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(state[i] != state[j]);
|
||||
#endif
|
||||
BW_ASSERT(x != NULL);
|
||||
BW_ASSERT(y != 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]);
|
||||
#endif
|
||||
|
||||
bw_delay_update_coeffs_ctrl(coeffs);
|
||||
for (size_t i = 0; i < n_samples; i++)
|
||||
|
@ -430,6 +430,11 @@ static inline void bw_dist_reset_state_multi(
|
||||
BW_ASSERT_DEEP(bw_dist_coeffs_is_valid(coeffs));
|
||||
BW_ASSERT_DEEP(coeffs->state >= bw_dist_coeffs_state_reset_coeffs);
|
||||
BW_ASSERT(state != 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(state[i] != state[j]);
|
||||
#endif
|
||||
BW_ASSERT(x_0 != NULL);
|
||||
|
||||
if (y_0 != NULL)
|
||||
@ -536,8 +541,18 @@ 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);
|
||||
BW_ASSERT(state != 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(state[i] != state[j]);
|
||||
#endif
|
||||
BW_ASSERT(x != NULL);
|
||||
BW_ASSERT(y != 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]);
|
||||
#endif
|
||||
|
||||
bw_dist_update_coeffs_ctrl(coeffs);
|
||||
for (size_t i = 0; i < n_samples; i++) {
|
||||
|
@ -430,6 +430,11 @@ static inline void bw_drive_reset_state_multi(
|
||||
BW_ASSERT_DEEP(bw_drive_coeffs_is_valid(coeffs));
|
||||
BW_ASSERT_DEEP(coeffs->state >= bw_drive_coeffs_state_reset_coeffs);
|
||||
BW_ASSERT(state != 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(state[i] != state[j]);
|
||||
#endif
|
||||
BW_ASSERT(x_0 != NULL);
|
||||
|
||||
if (y_0 != NULL)
|
||||
@ -537,8 +542,18 @@ 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);
|
||||
BW_ASSERT(state != 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(state[i] != state[j]);
|
||||
#endif
|
||||
BW_ASSERT(x != NULL);
|
||||
BW_ASSERT(y != 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]);
|
||||
#endif
|
||||
|
||||
bw_drive_update_coeffs_ctrl(coeffs);
|
||||
for (size_t i = 0; i < n_samples; i++) {
|
||||
|
@ -346,6 +346,11 @@ static inline void bw_dry_wet_process_multi(
|
||||
BW_ASSERT(x_dry != NULL);
|
||||
BW_ASSERT(x_wet != NULL);
|
||||
BW_ASSERT(y != 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]);
|
||||
#endif
|
||||
|
||||
bw_dry_wet_update_coeffs_ctrl(coeffs);
|
||||
for (size_t i = 0; i < n_samples; i++) {
|
||||
|
@ -391,13 +391,18 @@ static inline float bw_env_follow_reset_state(
|
||||
static inline void bw_env_follow_reset_state_multi(
|
||||
const bw_env_follow_coeffs * BW_RESTRICT coeffs,
|
||||
bw_env_follow_state * BW_RESTRICT const * BW_RESTRICT state,
|
||||
const float * x_0,
|
||||
float * y_0,
|
||||
size_t n_channels) {
|
||||
const float * x_0,
|
||||
float * y_0,
|
||||
size_t n_channels) {
|
||||
BW_ASSERT(coeffs != NULL);
|
||||
BW_ASSERT_DEEP(bw_env_follow_coeffs_is_valid(coeffs));
|
||||
BW_ASSERT_DEEP(coeffs->state >= bw_env_follow_coeffs_state_reset_coeffs);
|
||||
BW_ASSERT(state != 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(state[i] != state[j]);
|
||||
#endif
|
||||
BW_ASSERT(x_0 != NULL);
|
||||
|
||||
if (y_0 != NULL)
|
||||
@ -501,7 +506,18 @@ 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);
|
||||
BW_ASSERT(state != 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(state[i] != state[j]);
|
||||
#endif
|
||||
BW_ASSERT(x != NULL);
|
||||
#ifndef BW_NO_DEBUG
|
||||
if (y != 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]);
|
||||
#endif
|
||||
|
||||
bw_env_follow_update_coeffs_ctrl(coeffs);
|
||||
if (y != NULL)
|
||||
|
@ -528,6 +528,11 @@ static inline void bw_env_gen_reset_state_multi(
|
||||
BW_ASSERT_DEEP(bw_env_gen_coeffs_is_valid(coeffs));
|
||||
BW_ASSERT_DEEP(coeffs->state >= bw_env_gen_coeffs_state_reset_coeffs);
|
||||
BW_ASSERT(state != 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(state[i] != state[j]);
|
||||
#endif
|
||||
BW_ASSERT(gate_0 != NULL);
|
||||
|
||||
if (y_0 != NULL)
|
||||
@ -676,7 +681,18 @@ 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);
|
||||
BW_ASSERT(state != 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(state[i] != state[j]);
|
||||
#endif
|
||||
BW_ASSERT(gate != NULL);
|
||||
#ifndef BW_NO_DEBUG
|
||||
if (y != 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]);
|
||||
#endif
|
||||
|
||||
bw_env_gen_update_coeffs_ctrl(coeffs);
|
||||
for (size_t j = 0; j < n_channels; j++)
|
||||
|
@ -417,6 +417,11 @@ static inline void bw_fuzz_reset_state_multi(
|
||||
BW_ASSERT_DEEP(bw_fuzz_coeffs_is_valid(coeffs));
|
||||
BW_ASSERT_DEEP(coeffs->state >= bw_fuzz_coeffs_state_reset_coeffs);
|
||||
BW_ASSERT(state != 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(state[i] != state[j]);
|
||||
#endif
|
||||
BW_ASSERT(x_0 != NULL);
|
||||
|
||||
if (y_0 != NULL)
|
||||
@ -523,8 +528,18 @@ 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);
|
||||
BW_ASSERT(state != 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(state[i] != state[j]);
|
||||
#endif
|
||||
BW_ASSERT(x != NULL);
|
||||
BW_ASSERT(y != 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]);
|
||||
#endif
|
||||
|
||||
bw_fuzz_update_coeffs_ctrl(coeffs);
|
||||
for (size_t i = 0; i < n_samples; i++) {
|
||||
|
@ -393,6 +393,11 @@ static inline void bw_gain_process_multi(
|
||||
BW_ASSERT_DEEP(coeffs->state >= bw_gain_coeffs_state_reset_coeffs);
|
||||
BW_ASSERT(x != NULL);
|
||||
BW_ASSERT(y != 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]);
|
||||
#endif
|
||||
|
||||
bw_gain_update_coeffs_ctrl(coeffs);
|
||||
for (size_t i = 0; i < n_samples; i++) {
|
||||
|
@ -395,6 +395,11 @@ static inline void bw_hp1_reset_state_multi(
|
||||
BW_ASSERT_DEEP(bw_hp1_coeffs_is_valid(coeffs));
|
||||
BW_ASSERT_DEEP(coeffs->state >= bw_hp1_coeffs_state_reset_coeffs);
|
||||
BW_ASSERT(state != 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(state[i] != state[j]);
|
||||
#endif
|
||||
BW_ASSERT(x_0 != NULL);
|
||||
|
||||
for (size_t i = 0; i < n_channels; i++)
|
||||
@ -492,8 +497,18 @@ static inline void bw_hp1_process_multi(
|
||||
BW_ASSERT_DEEP(bw_hp1_coeffs_is_valid(coeffs));
|
||||
BW_ASSERT_DEEP(coeffs->state >= bw_hp1_coeffs_state_reset_coeffs);
|
||||
BW_ASSERT(state != 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(state[i] != state[j]);
|
||||
#endif
|
||||
BW_ASSERT(x != NULL);
|
||||
BW_ASSERT(y != 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]);
|
||||
#endif
|
||||
|
||||
bw_hp1_update_coeffs_ctrl(coeffs);
|
||||
for (size_t i = 0; i < n_samples; i++) {
|
||||
|
@ -465,6 +465,11 @@ static inline void bw_hs1_reset_state_multi(
|
||||
BW_ASSERT_DEEP(bw_hs1_coeffs_is_valid(coeffs));
|
||||
BW_ASSERT_DEEP(coeffs->state >= bw_hs1_coeffs_state_reset_coeffs);
|
||||
BW_ASSERT(state != 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(state[i] != state[j]);
|
||||
#endif
|
||||
BW_ASSERT(x_0 != NULL);
|
||||
|
||||
if (y_0 != NULL)
|
||||
@ -568,8 +573,18 @@ static inline void bw_hs1_process_multi(
|
||||
BW_ASSERT_DEEP(coeffs->state >= bw_hs1_coeffs_state_reset_coeffs);
|
||||
BW_ASSERT_DEEP(coeffs->cutoff * bw_sqrtf(coeffs->high_gain) >= 1e-6f && coeffs->cutoff * bw_sqrtf(coeffs->high_gain) <= 1e12f);
|
||||
BW_ASSERT(state != 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(state[i] != state[j]);
|
||||
#endif
|
||||
BW_ASSERT(x != NULL);
|
||||
BW_ASSERT(y != 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]);
|
||||
#endif
|
||||
|
||||
bw_hs1_update_coeffs_ctrl(coeffs);
|
||||
for (size_t i = 0; i < n_samples; i++) {
|
||||
|
@ -488,6 +488,11 @@ static inline void bw_hs2_reset_state_multi(
|
||||
BW_ASSERT_DEEP(bw_hs2_coeffs_is_valid(coeffs));
|
||||
BW_ASSERT_DEEP(coeffs->state >= bw_hs2_coeffs_state_reset_coeffs);
|
||||
BW_ASSERT(state != 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(state[i] != state[j]);
|
||||
#endif
|
||||
BW_ASSERT(x_0 != NULL);
|
||||
|
||||
if (y_0 != NULL)
|
||||
@ -591,8 +596,18 @@ static inline void bw_hs2_process_multi(
|
||||
BW_ASSERT_DEEP(coeffs->state >= bw_hs2_coeffs_state_reset_coeffs);
|
||||
BW_ASSERT_DEEP(coeffs->cutoff * bw_sqrtf(bw_sqrtf(coeffs->high_gain)) >= 1e-6f && coeffs->cutoff * bw_sqrtf(bw_sqrtf(coeffs->high_gain)) <= 1e12f);
|
||||
BW_ASSERT(state != 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(state[i] != state[j]);
|
||||
#endif
|
||||
BW_ASSERT(x != NULL);
|
||||
BW_ASSERT(y != 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]);
|
||||
#endif
|
||||
|
||||
bw_hs2_update_coeffs_ctrl(coeffs);
|
||||
for (size_t i = 0; i < n_samples; i++) {
|
||||
|
@ -447,6 +447,11 @@ static inline void bw_lp1_reset_state_multi(
|
||||
BW_ASSERT_DEEP(bw_lp1_coeffs_is_valid(coeffs));
|
||||
BW_ASSERT_DEEP(coeffs->state >= bw_lp1_coeffs_state_reset_coeffs);
|
||||
BW_ASSERT(state != 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(state[i] != state[j]);
|
||||
#endif
|
||||
BW_ASSERT(x_0 != NULL);
|
||||
|
||||
if (y_0 != NULL)
|
||||
@ -543,8 +548,18 @@ static inline void bw_lp1_process_multi(
|
||||
BW_ASSERT_DEEP(bw_lp1_coeffs_is_valid(coeffs));
|
||||
BW_ASSERT_DEEP(coeffs->state >= bw_lp1_coeffs_state_reset_coeffs);
|
||||
BW_ASSERT(state != 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(state[i] != state[j]);
|
||||
#endif
|
||||
BW_ASSERT(x != NULL);
|
||||
BW_ASSERT(y != 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]);
|
||||
#endif
|
||||
|
||||
for (size_t i = 0; i < n_samples; i++) {
|
||||
bw_lp1_update_coeffs_audio(coeffs);
|
||||
|
@ -463,6 +463,11 @@ static inline void bw_ls1_reset_state_multi(
|
||||
BW_ASSERT_DEEP(bw_ls1_coeffs_is_valid(coeffs));
|
||||
BW_ASSERT_DEEP(coeffs->state >= bw_ls1_coeffs_state_reset_coeffs);
|
||||
BW_ASSERT(state != 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(state[i] != state[j]);
|
||||
#endif
|
||||
BW_ASSERT(x_0 != NULL);
|
||||
|
||||
if (y_0 != NULL)
|
||||
@ -566,8 +571,18 @@ static inline void bw_ls1_process_multi(
|
||||
BW_ASSERT_DEEP(coeffs->state >= bw_ls1_coeffs_state_reset_coeffs);
|
||||
BW_ASSERT_DEEP(coeffs->cutoff * bw_rcpf(bw_sqrtf(coeffs->dc_gain)) >= 1e-6f && coeffs->cutoff * bw_rcpf(bw_sqrtf(coeffs->dc_gain)) <= 1e12f);
|
||||
BW_ASSERT(state != 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(state[i] != state[j]);
|
||||
#endif
|
||||
BW_ASSERT(x != NULL);
|
||||
BW_ASSERT(y != 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]);
|
||||
#endif
|
||||
|
||||
bw_ls1_update_coeffs_ctrl(coeffs);
|
||||
for (size_t i = 0; i < n_samples; i++) {
|
||||
|
@ -488,6 +488,11 @@ static inline void bw_ls2_reset_state_multi(
|
||||
BW_ASSERT_DEEP(bw_ls2_coeffs_is_valid(coeffs));
|
||||
BW_ASSERT_DEEP(coeffs->state >= bw_ls2_coeffs_state_reset_coeffs);
|
||||
BW_ASSERT(state != 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(state[i] != state[j]);
|
||||
#endif
|
||||
BW_ASSERT(x_0 != NULL);
|
||||
|
||||
if (y_0 != NULL)
|
||||
@ -591,8 +596,18 @@ static inline void bw_ls2_process_multi(
|
||||
BW_ASSERT_DEEP(coeffs->state >= bw_ls2_coeffs_state_reset_coeffs);
|
||||
BW_ASSERT_DEEP(coeffs->cutoff * bw_rcpf(bw_sqrtf(bw_sqrtf(coeffs->dc_gain))) >= 1e-6f && coeffs->cutoff * bw_rcpf(bw_sqrtf(bw_sqrtf(coeffs->dc_gain))) <= 1e12f);
|
||||
BW_ASSERT(state != 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(state[i] != state[j]);
|
||||
#endif
|
||||
BW_ASSERT(x != NULL);
|
||||
BW_ASSERT(y != 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]);
|
||||
#endif
|
||||
|
||||
bw_ls2_update_coeffs_ctrl(coeffs);
|
||||
for (size_t i = 0; i < n_samples; i++) {
|
||||
|
@ -429,6 +429,11 @@ static inline void bw_mm1_reset_state_multi(
|
||||
BW_ASSERT_DEEP(bw_mm1_coeffs_is_valid(coeffs));
|
||||
BW_ASSERT_DEEP(coeffs->state >= bw_mm1_coeffs_state_reset_coeffs);
|
||||
BW_ASSERT(state != 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(state[i] != state[j]);
|
||||
#endif
|
||||
BW_ASSERT(x_0 != NULL);
|
||||
|
||||
if (y_0 != NULL)
|
||||
@ -533,8 +538,18 @@ static inline void bw_mm1_process_multi(
|
||||
BW_ASSERT_DEEP(bw_mm1_coeffs_is_valid(coeffs));
|
||||
BW_ASSERT_DEEP(coeffs->state >= bw_mm1_coeffs_state_reset_coeffs);
|
||||
BW_ASSERT(state != 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(state[i] != state[j]);
|
||||
#endif
|
||||
BW_ASSERT(x != NULL);
|
||||
BW_ASSERT(y != 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]);
|
||||
#endif
|
||||
|
||||
bw_mm1_update_coeffs_ctrl(coeffs);
|
||||
for (size_t i = 0; i < n_samples; i++) {
|
||||
|
@ -483,6 +483,11 @@ static inline void bw_mm2_reset_state_multi(
|
||||
BW_ASSERT_DEEP(bw_mm2_coeffs_is_valid(coeffs));
|
||||
BW_ASSERT_DEEP(coeffs->state >= bw_mm2_coeffs_state_reset_coeffs);
|
||||
BW_ASSERT(state != 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(state[i] != state[j]);
|
||||
#endif
|
||||
BW_ASSERT(x_0 != NULL);
|
||||
|
||||
if (y_0 != NULL)
|
||||
@ -594,8 +599,18 @@ static inline void bw_mm2_process_multi(
|
||||
BW_ASSERT_DEEP(bw_mm2_coeffs_is_valid(coeffs));
|
||||
BW_ASSERT_DEEP(coeffs->state >= bw_mm2_coeffs_state_reset_coeffs);
|
||||
BW_ASSERT(state != 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(state[i] != state[j]);
|
||||
#endif
|
||||
BW_ASSERT(x != NULL);
|
||||
BW_ASSERT(y != 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]);
|
||||
#endif
|
||||
|
||||
bw_mm2_update_coeffs_ctrl(coeffs);
|
||||
for (size_t i = 0; i < n_samples; i++) {
|
||||
|
@ -458,6 +458,11 @@ static inline void bw_noise_gate_reset_state_multi(
|
||||
BW_ASSERT_DEEP(bw_noise_gate_coeffs_is_valid(coeffs));
|
||||
BW_ASSERT_DEEP(coeffs->state >= bw_noise_gate_coeffs_state_reset_coeffs);
|
||||
BW_ASSERT(state != 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(state[i] != state[j]);
|
||||
#endif
|
||||
BW_ASSERT(x_0 != NULL);
|
||||
BW_ASSERT(x_sc_0 != NULL);
|
||||
|
||||
@ -563,9 +568,19 @@ static inline void bw_noise_gate_process_multi(
|
||||
BW_ASSERT_DEEP(bw_noise_gate_coeffs_is_valid(coeffs));
|
||||
BW_ASSERT_DEEP(coeffs->state >= bw_noise_gate_coeffs_state_reset_coeffs);
|
||||
BW_ASSERT(state != 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(state[i] != state[j]);
|
||||
#endif
|
||||
BW_ASSERT(x != NULL);
|
||||
BW_ASSERT(x_sc != NULL);
|
||||
BW_ASSERT(y != 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]);
|
||||
#endif
|
||||
|
||||
bw_noise_gate_update_coeffs_ctrl(coeffs);
|
||||
for (size_t i = 0; i < n_samples; i++) {
|
||||
|
@ -367,6 +367,11 @@ static inline void bw_noise_gen_process_multi(
|
||||
BW_ASSERT_DEEP(bw_noise_gen_coeffs_is_valid(coeffs));
|
||||
BW_ASSERT_DEEP(coeffs->state >= bw_noise_gen_coeffs_state_reset_coeffs);
|
||||
BW_ASSERT(y != 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]);
|
||||
#endif
|
||||
|
||||
for (size_t i = 0; i < n_channels; i++)
|
||||
bw_noise_gen_process(coeffs, y[i], n_samples);
|
||||
|
@ -407,6 +407,11 @@ static inline void bw_notch_reset_state_multi(
|
||||
BW_ASSERT_DEEP(bw_notch_coeffs_is_valid(coeffs));
|
||||
BW_ASSERT_DEEP(coeffs->state >= bw_notch_coeffs_state_reset_coeffs);
|
||||
BW_ASSERT(state != 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(state[i] != state[j]);
|
||||
#endif
|
||||
BW_ASSERT(x_0 != NULL);
|
||||
|
||||
if (y_0 != NULL)
|
||||
@ -506,8 +511,18 @@ static inline void bw_notch_process_multi(
|
||||
BW_ASSERT_DEEP(bw_notch_coeffs_is_valid(coeffs));
|
||||
BW_ASSERT_DEEP(coeffs->state >= bw_notch_coeffs_state_reset_coeffs);
|
||||
BW_ASSERT(state != 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(state[i] != state[j]);
|
||||
#endif
|
||||
BW_ASSERT(x != NULL);
|
||||
BW_ASSERT(y != 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]);
|
||||
#endif
|
||||
|
||||
bw_notch_update_coeffs_ctrl(coeffs);
|
||||
for (size_t i = 0; i < n_samples; i++) {
|
||||
|
@ -608,6 +608,11 @@ static inline void bw_one_pole_reset_state_multi(
|
||||
BW_ASSERT_DEEP(bw_one_pole_coeffs_is_valid(coeffs));
|
||||
BW_ASSERT_DEEP(coeffs->state >= bw_one_pole_coeffs_state_reset_coeffs);
|
||||
BW_ASSERT(state != 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(state[i] != state[j]);
|
||||
#endif
|
||||
BW_ASSERT(x_0 != NULL);
|
||||
|
||||
if (y_0 != NULL)
|
||||
@ -879,7 +884,18 @@ static inline void bw_one_pole_process_multi(
|
||||
BW_ASSERT_DEEP(bw_one_pole_coeffs_is_valid(coeffs));
|
||||
BW_ASSERT_DEEP(coeffs->state >= bw_one_pole_coeffs_state_reset_coeffs);
|
||||
BW_ASSERT(state != 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(state[i] != state[j]);
|
||||
#endif
|
||||
BW_ASSERT(x != NULL);
|
||||
#ifndef BW_NO_DEBUG
|
||||
if (y != 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]);
|
||||
#endif
|
||||
|
||||
bw_one_pole_update_coeffs_ctrl(coeffs);
|
||||
if (y != NULL) {
|
||||
|
@ -214,6 +214,11 @@ static inline void bw_osc_filt_reset_state_multi(
|
||||
float * y_0,
|
||||
size_t n_channels) {
|
||||
BW_ASSERT(state != 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(state[i] != state[j]);
|
||||
#endif
|
||||
BW_ASSERT(x_0 != NULL);
|
||||
|
||||
if (y_0 != NULL)
|
||||
@ -267,8 +272,18 @@ static inline void bw_osc_filt_process_multi(
|
||||
size_t n_channels,
|
||||
size_t n_samples) {
|
||||
BW_ASSERT(state != 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(state[i] != state[j]);
|
||||
#endif
|
||||
BW_ASSERT(x != NULL);
|
||||
BW_ASSERT(y != 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]);
|
||||
#endif
|
||||
|
||||
for (size_t i = 0; i < n_channels; i++)
|
||||
bw_osc_filt_process(state[i], x[i], y[i], n_samples);
|
||||
|
@ -460,6 +460,11 @@ static inline void bw_osc_pulse_process_multi(
|
||||
BW_ASSERT_DEEP(coeffs->state >= bw_osc_pulse_coeffs_state_reset_coeffs);
|
||||
BW_ASSERT(x != NULL);
|
||||
BW_ASSERT(y != 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]);
|
||||
#endif
|
||||
|
||||
if (coeffs->antialiasing)
|
||||
for (size_t i = 0; i < n_samples; i++) {
|
||||
|
@ -427,6 +427,11 @@ static inline void bw_osc_saw_process_multi(
|
||||
BW_ASSERT_DEEP(coeffs->state >= bw_osc_saw_coeffs_state_reset_coeffs);
|
||||
BW_ASSERT(x != NULL);
|
||||
BW_ASSERT(y != 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]);
|
||||
#endif
|
||||
|
||||
if (x_inc != NULL)
|
||||
for (size_t i = 0; i < n_channels; i++)
|
||||
|
@ -165,6 +165,11 @@ static inline void bw_osc_sin_process_multi(
|
||||
size_t n_samples) {
|
||||
BW_ASSERT(x != NULL);
|
||||
BW_ASSERT(y != 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]);
|
||||
#endif
|
||||
|
||||
for (size_t i = 0; i < n_channels; i++)
|
||||
bw_osc_sin_process(x[i], y[i], n_samples);
|
||||
|
@ -467,6 +467,11 @@ static inline void bw_osc_tri_process_multi(
|
||||
BW_ASSERT_DEEP(coeffs->state >= bw_osc_tri_coeffs_state_reset_coeffs);
|
||||
BW_ASSERT(x != NULL);
|
||||
BW_ASSERT(y != 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]);
|
||||
#endif
|
||||
|
||||
if (coeffs->antialiasing)
|
||||
for (size_t i = 0; i < n_samples; i++) {
|
||||
|
@ -321,6 +321,9 @@ static inline void bw_pan_process1(
|
||||
BW_ASSERT_DEEP(bw_pan_coeffs_is_valid(coeffs));
|
||||
BW_ASSERT_DEEP(coeffs->state >= bw_pan_coeffs_state_reset_coeffs);
|
||||
BW_ASSERT(bw_is_finite(x));
|
||||
BW_ASSERT(y_l != NULL);
|
||||
BW_ASSERT(y_r != NULL);
|
||||
BW_ASSERT(y_l != y_r);
|
||||
|
||||
*y_l = bw_gain_process1(&coeffs->l_coeffs, x);
|
||||
*y_r = bw_gain_process1(&coeffs->r_coeffs, x);
|
||||
@ -344,6 +347,7 @@ static inline void bw_pan_process(
|
||||
BW_ASSERT_DEEP(bw_has_only_finite(x, n_samples));
|
||||
BW_ASSERT(y_l != NULL);
|
||||
BW_ASSERT(y_r != NULL);
|
||||
BW_ASSERT(y_l != y_r);
|
||||
|
||||
bw_pan_update_coeffs_ctrl(coeffs);
|
||||
for (size_t i = 0; i < n_samples; i++) {
|
||||
@ -370,6 +374,16 @@ static inline void bw_pan_process_multi(
|
||||
BW_ASSERT(x != NULL);
|
||||
BW_ASSERT(y_l != NULL);
|
||||
BW_ASSERT(y_r != 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_l[i] != y_l[j]);
|
||||
BW_ASSERT(y_r[i] != y_r[j]);
|
||||
}
|
||||
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]);
|
||||
#endif
|
||||
|
||||
bw_pan_update_coeffs_ctrl(coeffs);
|
||||
for (size_t i = 0; i < n_samples; i++) {
|
||||
|
@ -118,8 +118,8 @@ static inline void bw_peak_init(
|
||||
* #### bw_peak_set_sample_rate()
|
||||
* ```>>> */
|
||||
static inline void bw_peak_set_sample_rate(
|
||||
bw_peak_coeffs *BW_RESTRICT coeffs,
|
||||
float sample_rate);
|
||||
bw_peak_coeffs * BW_RESTRICT coeffs,
|
||||
float sample_rate);
|
||||
/*! <<<```
|
||||
* Sets the `sample_rate` (Hz) value in `coeffs`.
|
||||
*
|
||||
@ -525,13 +525,18 @@ static inline float bw_peak_reset_state(
|
||||
static inline void bw_peak_reset_state_multi(
|
||||
const bw_peak_coeffs * BW_RESTRICT coeffs,
|
||||
bw_peak_state * BW_RESTRICT const * BW_RESTRICT state,
|
||||
const float * x_0,
|
||||
float * y_0,
|
||||
size_t n_channels) {
|
||||
const float * x_0,
|
||||
float * y_0,
|
||||
size_t n_channels) {
|
||||
BW_ASSERT(coeffs != NULL);
|
||||
BW_ASSERT_DEEP(bw_peak_coeffs_is_valid(coeffs));
|
||||
BW_ASSERT_DEEP(coeffs->state >= bw_peak_coeffs_state_reset_coeffs);
|
||||
BW_ASSERT(state != 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(state[i] != state[j]);
|
||||
#endif
|
||||
BW_ASSERT(x_0 != NULL);
|
||||
|
||||
if (y_0 != NULL)
|
||||
@ -651,8 +656,18 @@ static inline void bw_peak_process_multi(
|
||||
&& bw_sqrtf(bw_pow2f(coeffs->bandwidth) * coeffs->peak_gain) * bw_rcpf(bw_pow2f(coeffs->bandwidth) - 1.f) <= 1e6f
|
||||
: 1);
|
||||
BW_ASSERT(state != 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(state[i] != state[j]);
|
||||
#endif
|
||||
BW_ASSERT(x != NULL);
|
||||
BW_ASSERT(y != 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]);
|
||||
#endif
|
||||
|
||||
bw_peak_update_coeffs_ctrl(coeffs);
|
||||
for (size_t i = 0; i < n_samples; i++) {
|
||||
|
@ -427,6 +427,7 @@ static inline void bw_phase_gen_reset_state(
|
||||
BW_ASSERT(bw_is_finite(phase_0));
|
||||
BW_ASSERT(y_0 != NULL);
|
||||
BW_ASSERT(y_inc_0 != NULL);
|
||||
BW_ASSERT(y_0 != y_inc_0);
|
||||
|
||||
state->phase = phase_0;
|
||||
*y_inc_0 = bw_one_pole_get_y_z1(&coeffs->portamento_state);
|
||||
@ -454,7 +455,13 @@ static inline void bw_phase_gen_reset_state_multi(
|
||||
BW_ASSERT_DEEP(bw_phase_gen_coeffs_is_valid(coeffs));
|
||||
BW_ASSERT_DEEP(coeffs->state >= bw_phase_gen_coeffs_state_reset_coeffs);
|
||||
BW_ASSERT(state != 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(state[i] != state[j]);
|
||||
#endif
|
||||
BW_ASSERT(phase_0 != NULL);
|
||||
BW_ASSERT(y_0 != NULL && y_inc_0 != NULL ? y_0 != y_inc_0 : 1);
|
||||
|
||||
if (y_0 != NULL) {
|
||||
if (y_inc_0 != NULL) {
|
||||
@ -530,6 +537,7 @@ static inline void bw_phase_gen_process1(
|
||||
BW_ASSERT_DEEP(bw_phase_gen_state_is_valid(coeffs, state));
|
||||
BW_ASSERT(y != NULL);
|
||||
BW_ASSERT(y_inc != NULL);
|
||||
BW_ASSERT(y != y_inc);
|
||||
|
||||
*y_inc = bw_one_pole_get_y_z1(&coeffs->portamento_state);
|
||||
*y = bw_phase_gen_update_phase(state, *y_inc);
|
||||
@ -556,6 +564,7 @@ static inline void bw_phase_gen_process1_mod(
|
||||
BW_ASSERT(bw_is_finite(x_mod));
|
||||
BW_ASSERT(y != NULL);
|
||||
BW_ASSERT(y_inc != NULL);
|
||||
BW_ASSERT(y != y_inc);
|
||||
|
||||
*y_inc = bw_one_pole_get_y_z1(&coeffs->portamento_state) * bw_pow2f(x_mod);
|
||||
*y = bw_phase_gen_update_phase(state, *y_inc);
|
||||
@ -581,6 +590,7 @@ static inline void bw_phase_gen_process(
|
||||
BW_ASSERT(state != NULL);
|
||||
BW_ASSERT_DEEP(bw_phase_gen_state_is_valid(coeffs, state));
|
||||
BW_ASSERT_DEEP(x_mod != NULL ? bw_has_only_finite(x_mod, n_samples) : 1);
|
||||
BW_ASSERT(y != NULL && y_inc != NULL ? y != y_inc : 1);
|
||||
|
||||
bw_phase_gen_update_coeffs_ctrl(coeffs);
|
||||
if (y != NULL) {
|
||||
@ -658,6 +668,23 @@ static inline void bw_phase_gen_process_multi(
|
||||
BW_ASSERT_DEEP(bw_phase_gen_coeffs_is_valid(coeffs));
|
||||
BW_ASSERT_DEEP(coeffs->state >= bw_phase_gen_coeffs_state_reset_coeffs);
|
||||
BW_ASSERT(state != 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(state[i] != state[j]);
|
||||
if (y != 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]);
|
||||
if (y_inc != NULL)
|
||||
for (size_t i = 0; i < n_channels; i++)
|
||||
for (size_t j = i + 1; j < n_channels; j++)
|
||||
BW_ASSERT(y_inc[i] != y_inc[j]);
|
||||
if (y != NULL && y_inc != NULL)
|
||||
for (size_t i = 0; i < n_channels; i++)
|
||||
for (size_t j = 0; j < n_channels; j++)
|
||||
BW_ASSERT(y[i] != y_inc[j]);
|
||||
#endif
|
||||
|
||||
bw_phase_gen_update_coeffs_ctrl(coeffs);
|
||||
if (y != NULL) {
|
||||
|
@ -415,13 +415,18 @@ static inline float bw_phaser_reset_state(
|
||||
static inline void bw_phaser_reset_state_multi(
|
||||
const bw_phaser_coeffs * BW_RESTRICT coeffs,
|
||||
bw_phaser_state * BW_RESTRICT const * BW_RESTRICT state,
|
||||
const float * x_0,
|
||||
float * y_0,
|
||||
size_t n_channels) {
|
||||
const float * x_0,
|
||||
float * y_0,
|
||||
size_t n_channels) {
|
||||
BW_ASSERT(coeffs != NULL);
|
||||
BW_ASSERT_DEEP(bw_phaser_coeffs_is_valid(coeffs));
|
||||
BW_ASSERT_DEEP(coeffs->state >= bw_phaser_coeffs_state_reset_coeffs);
|
||||
BW_ASSERT(state != 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(state[i] != state[j]);
|
||||
#endif
|
||||
BW_ASSERT(x_0 != NULL);
|
||||
|
||||
if (y_0 != NULL)
|
||||
@ -533,8 +538,18 @@ static inline void bw_phaser_process_multi(
|
||||
BW_ASSERT_DEEP(coeffs->state >= bw_phaser_coeffs_state_reset_coeffs);
|
||||
BW_ASSERT_DEEP(coeffs->center * bw_pow2f(coeffs->amount) >= 1e-6f && coeffs->center * bw_pow2f(coeffs->amount) <= 1e12f);
|
||||
BW_ASSERT(state != 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(state[i] != state[j]);
|
||||
#endif
|
||||
BW_ASSERT(x != NULL);
|
||||
BW_ASSERT(y != 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]);
|
||||
#endif
|
||||
|
||||
bw_phaser_update_coeffs_ctrl(coeffs);
|
||||
for (size_t i = 0; i < n_samples; i++) {
|
||||
|
@ -408,13 +408,18 @@ static inline float bw_pink_filt_reset_state(
|
||||
static inline void bw_pink_filt_reset_state_multi(
|
||||
const bw_pink_filt_coeffs * BW_RESTRICT coeffs,
|
||||
bw_pink_filt_state * BW_RESTRICT const * BW_RESTRICT state,
|
||||
const float * x_0,
|
||||
float * y_0,
|
||||
size_t n_channels) {
|
||||
const float * x_0,
|
||||
float * y_0,
|
||||
size_t n_channels) {
|
||||
BW_ASSERT(coeffs != NULL);
|
||||
BW_ASSERT_DEEP(bw_pink_filt_coeffs_is_valid(coeffs));
|
||||
BW_ASSERT_DEEP(coeffs->state >= bw_pink_filt_coeffs_state_reset_coeffs);
|
||||
BW_ASSERT(state != 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(state[i] != state[j]);
|
||||
#endif
|
||||
BW_ASSERT(x_0 != NULL);
|
||||
|
||||
if (y_0 != NULL)
|
||||
@ -536,8 +541,18 @@ static inline void bw_pink_filt_process_multi(
|
||||
BW_ASSERT_DEEP(bw_pink_filt_coeffs_is_valid(coeffs));
|
||||
BW_ASSERT_DEEP(coeffs->state >= bw_pink_filt_coeffs_state_reset_coeffs);
|
||||
BW_ASSERT(state != 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(state[i] != state[j]);
|
||||
#endif
|
||||
BW_ASSERT(x != NULL);
|
||||
BW_ASSERT(y != 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]);
|
||||
#endif
|
||||
|
||||
for (size_t i = 0; i < n_channels; i++)
|
||||
bw_pink_filt_process(coeffs, state[i], x[i], y[i], n_samples);
|
||||
|
@ -387,6 +387,11 @@ static inline void bw_ppm_reset_state_multi(
|
||||
BW_ASSERT_DEEP(bw_ppm_coeffs_is_valid(coeffs));
|
||||
BW_ASSERT_DEEP(coeffs->state >= bw_ppm_coeffs_state_reset_coeffs);
|
||||
BW_ASSERT(state != 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(state[i] != state[j]);
|
||||
#endif
|
||||
BW_ASSERT(x_0 != NULL);
|
||||
|
||||
if (y_0 != NULL)
|
||||
@ -491,7 +496,18 @@ static inline void bw_ppm_process_multi(
|
||||
BW_ASSERT_DEEP(bw_ppm_coeffs_is_valid(coeffs));
|
||||
BW_ASSERT_DEEP(coeffs->state >= bw_ppm_coeffs_state_reset_coeffs);
|
||||
BW_ASSERT(state != 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(state[i] != state[j]);
|
||||
#endif
|
||||
BW_ASSERT(x != NULL);
|
||||
#ifndef BW_NO_DEBUG
|
||||
if (y != 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]);
|
||||
#endif
|
||||
|
||||
bw_ppm_update_coeffs_ctrl(coeffs);
|
||||
if (y != NULL)
|
||||
|
@ -681,6 +681,7 @@ static inline void bw_reverb_reset_state(
|
||||
BW_ASSERT(bw_is_finite(x_r_0));
|
||||
BW_ASSERT(y_l_0 != NULL);
|
||||
BW_ASSERT(y_r_0 != NULL);
|
||||
BW_ASSERT(y_l_0 != y_r_0);
|
||||
|
||||
const float i = 0.5f * (x_l_0 + x_r_0);
|
||||
const float pd = bw_delay_reset_state(&coeffs->predelay_coeffs, &state->predelay_state, i);
|
||||
@ -742,8 +743,14 @@ static inline void bw_reverb_reset_state_multi(
|
||||
BW_ASSERT_DEEP(bw_reverb_coeffs_is_valid(coeffs));
|
||||
BW_ASSERT_DEEP(coeffs->state >= bw_reverb_coeffs_state_reset_coeffs);
|
||||
BW_ASSERT(state != 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(state[i] != state[j]);
|
||||
#endif
|
||||
BW_ASSERT(x_l_0 != NULL);
|
||||
BW_ASSERT(x_r_0 != NULL);
|
||||
BW_ASSERT(y_l_0 != NULL && y_r_0 != NULL ? y_l_0 != y_r_0 : 1);
|
||||
|
||||
if (y_l_0 != NULL) {
|
||||
if (y_r_0 != NULL) {
|
||||
@ -968,10 +975,29 @@ static inline void bw_reverb_process_multi(
|
||||
BW_ASSERT_DEEP(bw_reverb_coeffs_is_valid(coeffs));
|
||||
BW_ASSERT_DEEP(coeffs->state >= bw_reverb_coeffs_state_reset_coeffs);
|
||||
BW_ASSERT(state != 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(state[i] != state[j]);
|
||||
#endif
|
||||
BW_ASSERT(x_l != NULL);
|
||||
BW_ASSERT(x_r != NULL);
|
||||
BW_ASSERT(y_l != NULL);
|
||||
BW_ASSERT(y_r != NULL);
|
||||
#ifndef BW_NO_DEBUG
|
||||
if (y_l_0 != NULL)
|
||||
for (size_t i = 0; i < n_channels; i++)
|
||||
for (size_t j = i + 1; j < n_channels; j++)
|
||||
BW_ASSERT(y_l_0[i] != y_l_0[j]);
|
||||
if (y_r_0 != NULL)
|
||||
for (size_t i = 0; i < n_channels; i++)
|
||||
for (size_t j = i + 1; j < n_channels; j++)
|
||||
BW_ASSERT(y_r_0[i] != y_r_0[j]);
|
||||
if (y_l_0 != y_r_0)
|
||||
for (size_t i = 0; i < n_channels; i++)
|
||||
for (size_t j = 0; j < n_channels; j++)
|
||||
BW_ASSERT(y_l_0[i] != y_r_0[j]);
|
||||
#endif
|
||||
|
||||
bw_reverb_update_coeffs_ctrl(coeffs);
|
||||
for (size_t i = 0; i < n_samples; i++) {
|
||||
|
@ -352,6 +352,11 @@ static inline void bw_ring_mod_process_multi(
|
||||
BW_ASSERT(x_mod != NULL);
|
||||
BW_ASSERT(x_car != NULL);
|
||||
BW_ASSERT(y != 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]);
|
||||
#endif
|
||||
|
||||
for (size_t i = 0; i < n_samples; i++) {
|
||||
bw_ring_mod_update_coeffs_audio(coeffs);
|
||||
|
@ -464,13 +464,18 @@ static inline float bw_satur_reset_state(
|
||||
static inline void bw_satur_reset_state_multi(
|
||||
const bw_satur_coeffs * BW_RESTRICT coeffs,
|
||||
bw_satur_state * BW_RESTRICT const * BW_RESTRICT state,
|
||||
const float * x_0,
|
||||
float * y_0,
|
||||
size_t n_channels) {
|
||||
const float * x_0,
|
||||
float * y_0,
|
||||
size_t n_channels) {
|
||||
BW_ASSERT(coeffs != NULL);
|
||||
BW_ASSERT_DEEP(bw_satur_coeffs_is_valid(coeffs));
|
||||
BW_ASSERT_DEEP(coeffs->state >= bw_satur_coeffs_state_reset_coeffs);
|
||||
BW_ASSERT(state != 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(state[i] != state[j]);
|
||||
#endif
|
||||
BW_ASSERT(x_0 != NULL);
|
||||
|
||||
if (y_0 != NULL)
|
||||
@ -598,8 +603,18 @@ static inline void bw_satur_process_multi(
|
||||
BW_ASSERT_DEEP(bw_satur_coeffs_is_valid(coeffs));
|
||||
BW_ASSERT_DEEP(coeffs->state >= bw_satur_coeffs_state_reset_coeffs);
|
||||
BW_ASSERT(state != 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(state[i] != state[j]);
|
||||
#endif
|
||||
BW_ASSERT(x != NULL);
|
||||
BW_ASSERT(y != 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]);
|
||||
#endif
|
||||
|
||||
bw_satur_update_coeffs_ctrl(coeffs);
|
||||
for (size_t i = 0; i < n_samples; i++) {
|
||||
|
@ -467,6 +467,11 @@ static inline void bw_slew_lim_reset_state_multi(
|
||||
BW_ASSERT_DEEP(bw_slew_lim_coeffs_is_valid(coeffs));
|
||||
BW_ASSERT_DEEP(coeffs->state >= bw_slew_lim_coeffs_state_reset_coeffs);
|
||||
BW_ASSERT(state != 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(state[i] != state[j]);
|
||||
#endif
|
||||
BW_ASSERT(x_0 != NULL);
|
||||
|
||||
if (y_0 != NULL)
|
||||
@ -659,7 +664,18 @@ static inline void bw_slew_lim_process_multi(
|
||||
BW_ASSERT_DEEP(bw_slew_lim_coeffs_is_valid(coeffs));
|
||||
BW_ASSERT_DEEP(coeffs->state >= bw_slew_lim_coeffs_state_reset_coeffs);
|
||||
BW_ASSERT(state != 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(state[i] != state[j]);
|
||||
#endif
|
||||
BW_ASSERT(x != NULL);
|
||||
#ifndef BW_NO_DEBUG
|
||||
if (y != 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]);
|
||||
#endif
|
||||
|
||||
bw_slew_lim_update_coeffs_ctrl(coeffs);
|
||||
if (y != NULL) {
|
||||
|
@ -379,6 +379,11 @@ static inline void bw_sr_reduce_reset_state_multi(
|
||||
BW_ASSERT_DEEP(bw_sr_reduce_coeffs_is_valid(coeffs));
|
||||
BW_ASSERT_DEEP(coeffs->state >= bw_sr_reduce_coeffs_state_reset_coeffs);
|
||||
BW_ASSERT(state != 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(state[i] != state[j]);
|
||||
#endif
|
||||
BW_ASSERT(x_0 != NULL);
|
||||
|
||||
if (y_0 != NULL)
|
||||
@ -472,8 +477,18 @@ static inline void bw_sr_reduce_process_multi(
|
||||
BW_ASSERT_DEEP(bw_sr_reduce_coeffs_is_valid(coeffs));
|
||||
BW_ASSERT_DEEP(coeffs->state >= bw_sr_reduce_coeffs_state_reset_coeffs);
|
||||
BW_ASSERT(state != 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(state[i] != state[j]);
|
||||
#endif
|
||||
BW_ASSERT(x != NULL);
|
||||
BW_ASSERT(y != 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]);
|
||||
#endif
|
||||
|
||||
for (size_t i = 0; i < n_channels; i++)
|
||||
bw_sr_reduce_process(coeffs, state[i], x[i], y[i], n_samples);
|
||||
|
@ -322,12 +322,17 @@ static inline float bw_src_reset_state(
|
||||
static inline void bw_src_reset_state_multi(
|
||||
const bw_src_coeffs * BW_RESTRICT coeffs,
|
||||
bw_src_state * BW_RESTRICT const * BW_RESTRICT state,
|
||||
const float * x_0,
|
||||
float * y_0,
|
||||
size_t n_channels) {
|
||||
const float * x_0,
|
||||
float * y_0,
|
||||
size_t n_channels) {
|
||||
BW_ASSERT(coeffs != NULL);
|
||||
BW_ASSERT_DEEP(bw_src_coeffs_is_valid(coeffs));
|
||||
BW_ASSERT(state != 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(state[i] != state[j]);
|
||||
#endif
|
||||
BW_ASSERT(x_0 != NULL);
|
||||
|
||||
if (y_0 != NULL)
|
||||
@ -442,9 +447,21 @@ static inline void bw_src_process_multi(
|
||||
BW_ASSERT(coeffs != NULL);
|
||||
BW_ASSERT_DEEP(bw_src_coeffs_is_valid(coeffs));
|
||||
BW_ASSERT(state != 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(state[i] != state[j]);
|
||||
#endif
|
||||
BW_ASSERT(x != NULL);
|
||||
BW_ASSERT(y != NULL);
|
||||
BW_ASSERT((void*)x != (void*)y);
|
||||
#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((void *)x[i] != (void *)y[j]);
|
||||
#endif
|
||||
BW_ASSERT(n_in_samples != NULL);
|
||||
BW_ASSERT(n_out_samples != NULL);
|
||||
BW_ASSERT(n_in_samples != n_out_samples);
|
||||
|
@ -330,6 +330,11 @@ static inline void bw_src_int_reset_state_multi(
|
||||
BW_ASSERT(coeffs != NULL);
|
||||
BW_ASSERT_DEEP(bw_src_int_coeffs_is_valid(coeffs));
|
||||
BW_ASSERT(state != 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(state[i] != state[j]);
|
||||
#endif
|
||||
BW_ASSERT(x_0 != NULL);
|
||||
|
||||
if (y_0 != NULL)
|
||||
@ -418,9 +423,21 @@ static inline void bw_src_int_process_multi(
|
||||
BW_ASSERT(coeffs != NULL);
|
||||
BW_ASSERT_DEEP(bw_src_int_coeffs_is_valid(coeffs));
|
||||
BW_ASSERT(state != 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(state[i] != state[j]);
|
||||
#endif
|
||||
BW_ASSERT(x != NULL);
|
||||
BW_ASSERT(y != NULL);
|
||||
BW_ASSERT((void*)x != (void*)y);
|
||||
#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((void *)x[i] != (void *)y[j]);
|
||||
#endif
|
||||
|
||||
if (n_out_samples != NULL)
|
||||
for (size_t i = 0; i < n_channels; i++)
|
||||
|
@ -501,6 +501,9 @@ static inline void bw_svf_reset_state(
|
||||
BW_ASSERT(y_lp_0 != NULL);
|
||||
BW_ASSERT(y_bp_0 != NULL);
|
||||
BW_ASSERT(y_hp_0 != NULL);
|
||||
BW_ASSERT(y_lp_0 != y_bp_0);
|
||||
BW_ASSERT(y_lp_0 != y_hp_0);
|
||||
BW_ASSERT(y_bp_0 != y_hp_0);
|
||||
|
||||
state->hp_z1 = 0.f;
|
||||
state->lp_z1 = x_0;
|
||||
@ -534,6 +537,11 @@ static inline void bw_svf_reset_state_multi(
|
||||
BW_ASSERT_DEEP(bw_svf_coeffs_is_valid(coeffs));
|
||||
BW_ASSERT_DEEP(coeffs->state >= bw_svf_coeffs_state_reset_coeffs);
|
||||
BW_ASSERT(state != 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(state[i] != state[j]);
|
||||
#endif
|
||||
BW_ASSERT(x_0 != NULL);
|
||||
|
||||
if (y_lp_0 != NULL) {
|
||||
@ -632,6 +640,9 @@ static inline void bw_svf_process1(
|
||||
BW_ASSERT(y_lp != NULL);
|
||||
BW_ASSERT(y_bp != NULL);
|
||||
BW_ASSERT(y_hp != NULL);
|
||||
BW_ASSERT(y_lp != y_bp);
|
||||
BW_ASSERT(y_lp != y_hp);
|
||||
BW_ASSERT(y_bp != y_hp);
|
||||
|
||||
const float kk = coeffs->kf * state->cutoff_z1;
|
||||
const float lp_xz1 = state->lp_z1 + kk * state->bp_z1;
|
||||
@ -750,7 +761,38 @@ static inline void bw_svf_process_multi(
|
||||
BW_ASSERT_DEEP(bw_svf_coeffs_is_valid(coeffs));
|
||||
BW_ASSERT_DEEP(coeffs->state >= bw_svf_coeffs_state_reset_coeffs);
|
||||
BW_ASSERT(state != 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(state[i] != state[j]);
|
||||
#endif
|
||||
BW_ASSERT(x != NULL);
|
||||
#ifndef BW_NO_DEBUG
|
||||
if (y_lp != 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] != y_lp[j]);
|
||||
if (y_bp != 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] != y_bp[j]);
|
||||
if (y_hp != 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] != y_hp[j]);
|
||||
if (y_lp != NULL && y_bp != NULL)
|
||||
for (size_t i = 0; i < n_channels; i++)
|
||||
for (size_t j = 0; j < n_channels; j++)
|
||||
BW_ASSERT(y_lp[i] != y_bp[j]);
|
||||
if (y_lp != NULL && y_hp != NULL)
|
||||
for (size_t i = 0; i < n_channels; i++)
|
||||
for (size_t j = 0; j < n_channels; j++)
|
||||
BW_ASSERT(y_lp[i] != y_hp[j]);
|
||||
if (y_bp != NULL && y_hp != NULL)
|
||||
for (size_t i = 0; i < n_channels; i++)
|
||||
for (size_t j = 0; j < n_channels; j++)
|
||||
BW_ASSERT(y_bp[i] != y_hp[j]);
|
||||
#endif
|
||||
|
||||
if (y_lp != NULL) {
|
||||
if (y_bp != NULL) {
|
||||
|
@ -387,6 +387,11 @@ static inline void bw_trem_reset_state_multi(
|
||||
BW_ASSERT_DEEP(bw_trem_coeffs_is_valid(coeffs));
|
||||
BW_ASSERT_DEEP(coeffs->state >= bw_trem_coeffs_state_reset_coeffs);
|
||||
BW_ASSERT(state != 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(state[i] != state[j]);
|
||||
#endif
|
||||
BW_ASSERT(x_0 != NULL);
|
||||
|
||||
if (y_0 != NULL)
|
||||
@ -489,8 +494,18 @@ static inline void bw_trem_process_multi(
|
||||
BW_ASSERT_DEEP(bw_trem_coeffs_is_valid(coeffs));
|
||||
BW_ASSERT_DEEP(coeffs->state >= bw_trem_coeffs_state_reset_coeffs);
|
||||
BW_ASSERT(state != 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(state[i] != state[j]);
|
||||
#endif
|
||||
BW_ASSERT(x != NULL);
|
||||
BW_ASSERT(y != 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]);
|
||||
#endif
|
||||
|
||||
bw_trem_update_coeffs_ctrl(coeffs);
|
||||
for (size_t i = 0; i < n_samples; i++) {
|
||||
|
@ -381,6 +381,11 @@ static inline void bw_wah_reset_state_multi(
|
||||
BW_ASSERT_DEEP(bw_wah_coeffs_is_valid(coeffs));
|
||||
BW_ASSERT_DEEP(coeffs->state >= bw_wah_coeffs_state_reset_coeffs);
|
||||
BW_ASSERT(state != 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(state[i] != state[j]);
|
||||
#endif
|
||||
BW_ASSERT(x_0 != NULL);
|
||||
|
||||
if (y_0 != NULL)
|
||||
@ -479,8 +484,18 @@ static inline void bw_wah_process_multi(
|
||||
BW_ASSERT_DEEP(bw_wah_coeffs_is_valid(coeffs));
|
||||
BW_ASSERT_DEEP(coeffs->state >= bw_wah_coeffs_state_reset_coeffs);
|
||||
BW_ASSERT(state != 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(state[i] != state[j]);
|
||||
#endif
|
||||
BW_ASSERT(x != NULL);
|
||||
BW_ASSERT(y != 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]);
|
||||
#endif
|
||||
|
||||
bw_wah_update_coeffs_ctrl(coeffs);
|
||||
for (size_t i = 0; i < n_samples; i++) {
|
||||
|
Loading…
Reference in New Issue
Block a user