restrict qualified everything

This commit is contained in:
Stefano D'Angelo 2023-08-14 09:57:06 +02:00
parent 399325359d
commit 12a574c07d
44 changed files with 273 additions and 263 deletions

6
TODO
View File

@ -2,13 +2,12 @@
-----
code:
* debugging
* debugging - also check outputs different (incl bw_buf)
* check all examples again
* osc post filter (and one pole init, slew rate, etc.) val from input? set state instead?
* audio rate optional pulse width/slope inputs?
* should rather use backward Euler in bw_onepole?
* one pole process const input? (return also if const out)
* check const restrict size_t etc.
* empty functions etc. to keep consistency and forward compatibility?
* float in [-1,1] for velocity, pitch bend, mod wheel
* should clip slope in triangle?
@ -40,6 +39,7 @@ code:
* check assumptions w.r.t. usage of math functions
* sample rate-constant coeffs? (pan case)
* sr-dependent vs cr-dependent coeffs? see synth poly example
* src x != y?
build system:
* single header generation (vs modules in bwp... to think about)
@ -71,6 +71,8 @@ code:
* bw_math: review types in implementation
* way to detect extern "C"? perhaps hidden "trap" preprocessor definition?
* any chance to avoid casts in C for const X * const * input arguments?
* heavy debug (e.g. also stripping restrict) vs light debug vs release vs optimized makefile rules
* smaller optimized modules (e.g., simple one pole)
build system:
* make makefiles handle paths with spaces etc

View File

@ -33,8 +33,8 @@
* <li><code>bw_ap1_process()</code> and
* <code>bw_ap1_process_multi()</code> now use <code>size_t</code>
* to count samples and channels.</li>
* <li>Added more <code>const</code> specifiers to input
* arguments.</li>
* <li>Added more <code>const</code> and <code>BW_RESTRICT</code>
* specifiers to input arguments and implementation.</li>
* <li>Moved C++ code to C header.</li>
* <li>Added overladed C++ <code>process()</code> function taking
* C-style arrays as arguments.</li>
@ -145,7 +145,7 @@ static inline void bw_ap1_process(bw_ap1_coeffs *BW_RESTRICT coeffs, bw_ap1_stat
*
* #### bw_ap1_process_multi()
* ```>>> */
static inline void bw_ap1_process_multi(bw_ap1_coeffs *BW_RESTRICT coeffs, bw_ap1_state * const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples);
static inline void bw_ap1_process_multi(bw_ap1_coeffs *BW_RESTRICT coeffs, bw_ap1_state *BW_RESTRICT const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples);
/*! <<<```
* Processes the first `n_samples` of the `n_channels` input buffers `x` and
* fills the first `n_samples` of the `n_channels` output buffers `y`, while
@ -222,7 +222,7 @@ static inline void bw_ap1_process(bw_ap1_coeffs *BW_RESTRICT coeffs, bw_ap1_stat
}
}
static inline void bw_ap1_process_multi(bw_ap1_coeffs *BW_RESTRICT coeffs, bw_ap1_state * const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples) {
static inline void bw_ap1_process_multi(bw_ap1_coeffs *BW_RESTRICT coeffs, bw_ap1_state *BW_RESTRICT const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples) {
bw_ap1_update_coeffs_ctrl(coeffs);
for (size_t i = 0; i < n_samples; i++) {
bw_ap1_update_coeffs_audio(coeffs);
@ -277,7 +277,7 @@ public:
private:
bw_ap1_coeffs coeffs;
bw_ap1_state states[N_CHANNELS];
bw_ap1_state *statesP[N_CHANNELS];
bw_ap1_state *BW_RESTRICT statesP[N_CHANNELS];
};
template<size_t N_CHANNELS>

View File

@ -33,8 +33,8 @@
* <li><code>bw_ap2_process()</code> and
* <code>bw_ap2_process_multi()</code> now use <code>size_t</code>
* to count samples and channels.</li>
* <li>Added more <code>const</code> specifiers to input
* arguments.</li>
* <li>Added more <code>const</code> and <code>BW_RESTRICT</code>
* specifiers to input arguments and implementation.</li>
* <li>Moved C++ code to C header.</li>
* <li>Added overladed C++ <code>process()</code> function taking
* C-style arrays as arguments.</li>
@ -143,7 +143,7 @@ static inline void bw_ap2_process(bw_ap2_coeffs *BW_RESTRICT coeffs, bw_ap2_stat
*
* #### bw_ap2_process_multi()
* ```>>> */
static inline void bw_ap2_process_multi(bw_ap2_coeffs *BW_RESTRICT coeffs, bw_ap2_state * const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples);
static inline void bw_ap2_process_multi(bw_ap2_coeffs *BW_RESTRICT coeffs, bw_ap2_state *BW_RESTRICT const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples);
/*! <<<```
* Processes the first `n_samples` of the `n_channels` input buffers `x` and
* fills the first `n_samples` of the `n_channels` output buffers `y`, while
@ -232,7 +232,7 @@ static inline void bw_ap2_process(bw_ap2_coeffs *BW_RESTRICT coeffs, bw_ap2_stat
}
}
static inline void bw_ap2_process_multi(bw_ap2_coeffs *BW_RESTRICT coeffs, bw_ap2_state * const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples) {
static inline void bw_ap2_process_multi(bw_ap2_coeffs *BW_RESTRICT coeffs, bw_ap2_state *BW_RESTRICT const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples) {
bw_ap2_update_coeffs_ctrl(coeffs);
for (size_t i = 0; i < n_samples; i++) {
bw_ap2_update_coeffs_audio(coeffs);
@ -292,7 +292,7 @@ public:
private:
bw_ap2_coeffs coeffs;
bw_ap2_state states[N_CHANNELS];
bw_ap2_state *statesP[N_CHANNELS];
bw_ap2_state *BW_RESTRICT statesP[N_CHANNELS];
};
template<size_t N_CHANNELS>

View File

@ -32,8 +32,8 @@
* <li>Now using <code>size_t</code> instead of
* <code>BW_SIZE_T</code>.</li>
* <li>Changed order of arguments to improve consistency.</li>
* <li>Added more <code>const</code> specifiers to input
* arguments.</li>
* <li>Added more <code>const</code> and <code>BW_RESTRICT</code>
* specifiers to input arguments.</li>
* <li>Moved C++ code to C header.</li>
* <li>Added overladed C++ functions taking C-style arrays as
* arguments.</li>
@ -82,7 +82,7 @@ extern "C" {
/*! api {{{
* #### bw_buf_fill()
* ```>>> */
static inline void bw_buf_fill(float k, float *dest, size_t n_elems);
static inline void bw_buf_fill(float k, float *BW_RESTRICT dest, size_t n_elems);
/*! <<<```
* Sets the first `n_elems` in `dest` to `k`.
*
@ -123,7 +123,7 @@ static inline void bw_buf_mul(const float *src1, const float *src2, float *dest,
*
* #### bw_buf_fill_multi()
* ```>>> */
static inline void bw_buf_fill_multi(float k, float * const *dest, size_t n_channels, size_t n_elems);
static inline void bw_buf_fill_multi(float k, float *BW_RESTRICT const *BW_RESTRICT dest, size_t n_channels, size_t n_elems);
/*! <<<```
* Sets the first `n_elems` in each of the `n_channels` buffers `dest` to
* `k`.
@ -182,7 +182,7 @@ static inline void bw_buf_mul_multi(const float * const *src1, const float * con
extern "C" {
#endif
static inline void bw_buf_fill(float k, float *dest, size_t n_elems) {
static inline void bw_buf_fill(float k, float *BW_RESTRICT dest, size_t n_elems) {
BW_ASSERT(!(dest == NULL && n_elems != 0));
BW_ASSERT(!bw_is_nan(k));
@ -246,7 +246,7 @@ static inline void bw_buf_mul(const float *src1, const float *src2, float *dest,
BW_ASSERT_DEEP(!bw_has_nan(dest, n_elems));
}
static inline void bw_buf_fill_multi(float k, float * const *dest, size_t n_channels, size_t n_elems) {
static inline void bw_buf_fill_multi(float k, float *BW_RESTRICT const *BW_RESTRICT dest, size_t n_channels, size_t n_elems) {
BW_ASSERT(!(dest == NULL && n_channels != 0));
for (size_t i = 0; i < n_channels; i++)
@ -303,13 +303,13 @@ namespace Brickworks {
template<size_t N_CHANNELS>
inline void bufFill(
float k,
float * const * dest,
float *BW_RESTRICT const *BW_RESTRICT dest,
int nSamples);
template<size_t N_CHANNELS>
inline void bufFill(
float k,
std::array<float *, N_CHANNELS> dest,
std::array<float *BW_RESTRICT, N_CHANNELS> dest,
int nSamples);
/*! <<<```
*
@ -405,7 +405,7 @@ inline void bufMul(
template<size_t N_CHANNELS>
inline void bufFill(
float k,
float * const * dest,
float *BW_RESTRICT const *BW_RESTRICT dest,
int nSamples) {
bw_buf_fill_multi(k, dest, N_CHANNELS, nSamples);
}
@ -413,7 +413,7 @@ inline void bufFill(
template<size_t N_CHANNELS>
inline void bufFill(
float k,
std::array<float *, N_CHANNELS> dest,
std::array<float *BW_RESTRICT, N_CHANNELS> dest,
int nSamples) {
bufFill<N_CHANNELS>(k, dest.data(), nSamples);
}

View File

@ -43,8 +43,8 @@
* <li><code>bw_chorus_process()</code> and
* <code>bw_chorus_process_multi()</code> now use
* <code>size_t</code> to count samples and channels.</li>
* <li>Added more <code>const</code> specifiers to input
* arguments.</li>
* <li>Added more <code>const</code> and <code>BW_RESTRICT</code>
* specifiers to input arguments and implmenetation.</li>
* <li>Moved C++ code to C header.</li>
* <li>Added overladed C++ <code>process()</code> function taking
* C-style arrays as arguments.</li>
@ -117,7 +117,7 @@ static inline size_t bw_chorus_mem_req(const bw_chorus_coeffs *BW_RESTRICT coeff
*
* #### bw_chorus_mem_set()
* ```>>> */
static inline void bw_chorus_mem_set(const bw_chorus_coeffs *BW_RESTRICT coeffs, bw_chorus_state *BW_RESTRICT state, void *mem);
static inline void bw_chorus_mem_set(const bw_chorus_coeffs *BW_RESTRICT coeffs, bw_chorus_state *BW_RESTRICT state, void *BW_RESTRICT mem);
/*! <<<```
* Associates the contiguous memory block `mem` to the given `state`.
*
@ -162,7 +162,7 @@ static inline void bw_chorus_process(bw_chorus_coeffs *BW_RESTRICT coeffs, bw_ch
*
* #### bw_chorus_process_multi()
* ```>>> */
static inline void bw_chorus_process_multi(bw_chorus_coeffs *BW_RESTRICT coeffs, bw_chorus_state * const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples);
static inline void bw_chorus_process_multi(bw_chorus_coeffs *BW_RESTRICT coeffs, bw_chorus_state *BW_RESTRICT const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples);
/*! <<<```
* Processes the first `n_samples` of the `n_channels` input buffers `x` and
* fills the first `n_samples` of the `n_channels` output buffers `y`, while
@ -267,8 +267,7 @@ static inline size_t bw_chorus_mem_req(const bw_chorus_coeffs *BW_RESTRICT coeff
return bw_comb_mem_req(&coeffs->comb_coeffs);
}
static inline void bw_chorus_mem_set(const bw_chorus_coeffs *BW_RESTRICT coeffs, bw_chorus_state *BW_RESTRICT state, void *mem) {
(void)coeffs;
static inline void bw_chorus_mem_set(const bw_chorus_coeffs *BW_RESTRICT coeffs, bw_chorus_state *BW_RESTRICT state, void *BW_RESTRICT mem) {
bw_comb_mem_set(&coeffs->comb_coeffs, &state->comb_state, mem);
}
@ -310,7 +309,7 @@ static inline void bw_chorus_process(bw_chorus_coeffs *BW_RESTRICT coeffs, bw_ch
}
}
static inline void bw_chorus_process_multi(bw_chorus_coeffs *BW_RESTRICT coeffs, bw_chorus_state * const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples) {
static inline void bw_chorus_process_multi(bw_chorus_coeffs *BW_RESTRICT coeffs, bw_chorus_state *BW_RESTRICT const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples) {
bw_chorus_update_coeffs_ctrl(coeffs);
for (size_t i = 0; i < n_samples; i++) {
bw_chorus_update_coeffs_audio(coeffs);
@ -392,8 +391,8 @@ public:
private:
bw_chorus_coeffs coeffs;
bw_chorus_state states[N_CHANNELS];
bw_chorus_state *statesP[N_CHANNELS];
void *mem;
bw_chorus_state *BW_RESTRICT statesP[N_CHANNELS];
void *BW_RESTRICT mem;
};
template<size_t N_CHANNELS>

View File

@ -43,8 +43,8 @@
* <li><code>bw_clip_process()</code> and
* <code>bw_clip_process_multi()</code> now use <code>size_t</code>
* to count samples and channels.</li>
* <li>Added more <code>const</code> specifiers to input
* arguments.</li>
* <li>Added more <code>const</code> and <code>BW_RESTRICT</code>
* specifiers to input arguments and implementation.</li>
* <li>Moved C++ code to C header.</li>
* <li>Added overladed C++ <code>process()</code> function taking
* C-style arrays as arguments.</li>
@ -145,7 +145,7 @@ static inline void bw_clip_process(bw_clip_coeffs *BW_RESTRICT coeffs, bw_clip_s
*
* #### bw_clip_process_multi()
* ```>>> */
static inline void bw_clip_process_multi(bw_clip_coeffs *BW_RESTRICT coeffs, bw_clip_state * const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples);
static inline void bw_clip_process_multi(bw_clip_coeffs *BW_RESTRICT coeffs, bw_clip_state *BW_RESTRICT const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples);
/*! <<<```
* Processes the first `n_samples` of the `n_channels` input buffers `x` and
* fills the first `n_samples` of the `n_channels` output buffers `y`, while
@ -293,7 +293,7 @@ static inline void bw_clip_process(bw_clip_coeffs *BW_RESTRICT coeffs, bw_clip_s
}
}
static inline void bw_clip_process_multi(bw_clip_coeffs *BW_RESTRICT coeffs, bw_clip_state * const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples) {
static inline void bw_clip_process_multi(bw_clip_coeffs *BW_RESTRICT coeffs, bw_clip_state *BW_RESTRICT const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples) {
if (coeffs->gain_compensation)
for (size_t i = 0; i < n_samples; i++) {
bw_clip_update_coeffs_audio(coeffs);
@ -364,7 +364,7 @@ public:
private:
bw_clip_coeffs coeffs;
bw_clip_state states[N_CHANNELS];
bw_clip_state *statesP[N_CHANNELS];
bw_clip_state *BW_RESTRICT statesP[N_CHANNELS];
};
template<size_t N_CHANNELS>

View File

@ -44,8 +44,8 @@
* <li><code>bw_comb_process()</code> and
* <code>bw_comb_process_multi()</code> now use <code>size_t</code>
* to count samples and channels.</li>
* <li>Added more <code>const</code> specifiers to input
* arguments.</li>
* <li>Added more <code>const</code> and <code>BW_RESTRICT</code>
* specifiers to input arguments and implementation.</li>
* <li>Moved C++ code to C header.</li>
* <li>Added overladed C++ <code>process()</code> function taking
* C-style arrays as arguments.</li>
@ -118,7 +118,7 @@ static inline size_t bw_comb_mem_req(const bw_comb_coeffs *BW_RESTRICT coeffs);
*
* #### bw_comb_mem_set()
* ```>>> */
static inline void bw_comb_mem_set(const bw_comb_coeffs *BW_RESTRICT coeffs, bw_comb_state *BW_RESTRICT state, void *mem);
static inline void bw_comb_mem_set(const bw_comb_coeffs *BW_RESTRICT coeffs, bw_comb_state *BW_RESTRICT state, void *BW_RESTRICT mem);
/*! <<<```
* Associates the contiguous memory block `mem` to the given `state`.
*
@ -163,7 +163,7 @@ static inline void bw_comb_process(bw_comb_coeffs *BW_RESTRICT coeffs, bw_comb_s
*
* #### bw_comb_process_multi()
* ```>>> */
static inline void bw_comb_process_multi(bw_comb_coeffs *BW_RESTRICT coeffs, bw_comb_state * const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples);
static inline void bw_comb_process_multi(bw_comb_coeffs *BW_RESTRICT coeffs, bw_comb_state *BW_RESTRICT const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples);
/*! <<<```
* Processes the first `n_samples` of the `n_channels` input buffers `x` and
* fills the first `n_samples` of the `n_channels` output buffers `y`, while
@ -285,7 +285,7 @@ static inline size_t bw_comb_mem_req(const bw_comb_coeffs *BW_RESTRICT coeffs) {
return bw_delay_mem_req(&coeffs->delay_coeffs);
}
static inline void bw_comb_mem_set(const bw_comb_coeffs *BW_RESTRICT coeffs, bw_comb_state *BW_RESTRICT state, void *mem) {
static inline void bw_comb_mem_set(const bw_comb_coeffs *BW_RESTRICT coeffs, bw_comb_state *BW_RESTRICT state, void *BW_RESTRICT mem) {
bw_delay_mem_set(&coeffs->delay_coeffs, &state->delay_state, mem);
}
@ -361,7 +361,7 @@ static inline void bw_comb_process(bw_comb_coeffs *BW_RESTRICT coeffs, bw_comb_s
}
}
static inline void bw_comb_process_multi(bw_comb_coeffs *BW_RESTRICT coeffs, bw_comb_state * const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples) {
static inline void bw_comb_process_multi(bw_comb_coeffs *BW_RESTRICT coeffs, bw_comb_state *BW_RESTRICT const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples) {
bw_comb_update_coeffs_ctrl(coeffs);
for (size_t i = 0; i < n_samples; i++) {
bw_comb_update_coeffs_audio(coeffs);
@ -437,8 +437,8 @@ public:
private:
bw_comb_coeffs coeffs;
bw_comb_state states[N_CHANNELS];
bw_comb_state *statesP[N_CHANNELS];
void *mem;
bw_comb_state *BW_RESTRICT statesP[N_CHANNELS];
void *BW_RESTRICT mem;
};
template<size_t N_CHANNELS>

View File

@ -38,6 +38,8 @@
* <li>Introduced <code>BW_NO_DEBUG</code> to replace
* <code>NDEBUG</code> and prevented useless inclusion of
* <code>assert.h</code>.</li>
* <li>Added <code>BW_RESTRICT</code> specifiers to input
* arguments.</li>
* <li>Removed usage of reserved identifiers.</li>
* <li>Added <code>extern "C"</code> to functions.</li>
* </ul>
@ -225,21 +227,21 @@ static inline char bw_is_finite(float x);
*
* #### bw_has_inf()
* ```>>> */
static inline char bw_has_inf(const float *x, size_t n_elems);
static inline char bw_has_inf(const float *BW_RESTRICT x, size_t n_elems);
/*! <<<```
* Scans the fist `n_elems` in buffer `x` and returns non-`0` if it contains
* at least one positive or negative inifinity value, `0` otherwise.
*
* #### bw_has_nan()
* ```>>> */
static inline char bw_has_nan(const float *x, size_t n_elems);
static inline char bw_has_nan(const float *BW_RESTRICT x, size_t n_elems);
/*! <<<```
* Scans the fist `n_elems` in buffer `x` and returns non-`0` if it contains
* at least one NaN value, `0` otherwise.
*
* #### bw_has_only_finite()
* ```>>> */
static inline char bw_has_only_finite(const float *x, size_t n_elems);
static inline char bw_has_only_finite(const float *BW_RESTRICT x, size_t n_elems);
/*! <<<```
* Scans the fist `n_elems` in buffer `x` and returns non-`0` if it only
* finds finite values (neither NaN nor positive or negative infinity), `0`
@ -247,7 +249,7 @@ static inline char bw_has_only_finite(const float *x, size_t n_elems);
*
* #### bw_hash_sdbm()
* ```>>> */
static inline uint32_t bw_hash_sdbm(const char *string);
static inline uint32_t bw_hash_sdbm(const char *BW_RESTRICT string);
/*! <<<```
* Returns the sdbm hash of the given `string`.
* }}} */
@ -283,28 +285,28 @@ static inline char bw_is_finite(float x) {
return (v.u & 0x7f800000) != 0x7f800000;
}
static inline char bw_has_inf(const float *x, size_t n_elems) {
static inline char bw_has_inf(const float *BW_RESTRICT x, size_t n_elems) {
char ret = 0;
for (size_t i = 0; i < n_elems && !ret; i++)
ret = bw_is_inf(x[i]);
return ret;
}
static inline char bw_has_nan(const float *x, size_t n_elems) {
static inline char bw_has_nan(const float *BW_RESTRICT x, size_t n_elems) {
char ret = 0;
for (size_t i = 0; i < n_elems && !ret; i++)
ret = bw_is_nan(x[i]);
return ret;
}
static inline char bw_has_only_finite(const float *x, size_t n_elems) {
static inline char bw_has_only_finite(const float *BW_RESTRICT x, size_t n_elems) {
char ret = 1;
for (size_t i = 0; i < n_elems && ret; i++)
ret = bw_is_finite(x[i]);
return ret;
}
static inline uint32_t bw_hash_sdbm(const char *string) {
static inline uint32_t bw_hash_sdbm(const char *BW_RESTRICT string) {
uint32_t hash = 0;
for (; *string != '\0'; string++)
hash = *string + (hash << 6) + (hash << 16) - hash;

View File

@ -34,8 +34,8 @@
* <li><code>bw_comp_process()</code> and
* <code>bw_comp_process_multi()</code> now use <code>size_t</code>
* to count samples and channels.</li>
* <li>Added more <code>const</code> specifiers to input
* arguments.</li>
* <li>Added more <code>const</code> and <code>BW_RESTRICT</code>
* specifiers to input arguments and implementation.</li>
* <li>Moved C++ code to C header.</li>
* <li>Added overladed C++ <code>process()</code> function taking
* C-style arrays as arguments.</li>
@ -141,7 +141,7 @@ static inline void bw_comp_process(bw_comp_coeffs *BW_RESTRICT coeffs, bw_comp_s
*
* #### bw_comp_process_multi()
* ```>>> */
static inline void bw_comp_process_multi(bw_comp_coeffs *BW_RESTRICT coeffs, bw_comp_state * const *BW_RESTRICT state, const float * const *x, const float * const *x_sc, float * const *y, size_t n_channels, size_t n_samples);
static inline void bw_comp_process_multi(bw_comp_coeffs *BW_RESTRICT coeffs, bw_comp_state *BW_RESTRICT const *BW_RESTRICT state, const float * const *x, const float * const *x_sc, float * const *y, size_t n_channels, size_t n_samples);
/*! <<<```
* Processes the first `n_samples` of the `n_channels` input buffers `x` and
* the first `n_samples` of the `n_channels` sidechain input buffers `x_sc`,
@ -302,7 +302,7 @@ static inline void bw_comp_process(bw_comp_coeffs *BW_RESTRICT coeffs, bw_comp_s
}
}
static inline void bw_comp_process_multi(bw_comp_coeffs *BW_RESTRICT coeffs, bw_comp_state * const *BW_RESTRICT state, const float * const *x, const float * const *x_sc, float * const *y, size_t n_channels, size_t n_samples) {
static inline void bw_comp_process_multi(bw_comp_coeffs *BW_RESTRICT coeffs, bw_comp_state *BW_RESTRICT const *BW_RESTRICT state, const float * const *x, const float * const *x_sc, float * const *y, size_t n_channels, size_t n_samples) {
bw_comp_update_coeffs_ctrl(coeffs);
for (size_t i = 0; i < n_samples; i++) {
bw_comp_update_coeffs_audio(coeffs);
@ -389,7 +389,7 @@ public:
private:
bw_comp_coeffs coeffs;
bw_comp_state states[N_CHANNELS];
bw_comp_state *statesP[N_CHANNELS];
bw_comp_state *BW_RESTRICT statesP[N_CHANNELS];
};
template<size_t N_CHANNELS>

View File

@ -38,8 +38,8 @@
* <li><code>bw_delay_process()</code> and
* <code>bw_delay_process_multi()</code> now use
* <code>size_t</code> to count samples and channels.</li>
* <li>Added more <code>const</code> specifiers to input
* arguments.</li>
* <li>Added more <code>const</code> and <code>BW_RESTRICT</code>
* specifiers to input arguments and implementation.</li>
* <li>Moved C++ code to C header.</li>
* <li>Added overladed C++ <code>process()</code> function taking
* C-style arrays as arguments.</li>
@ -111,7 +111,7 @@ static inline size_t bw_delay_mem_req(const bw_delay_coeffs *BW_RESTRICT coeffs)
*
* #### bw_delay_mem_set()
* ```>>> */
static inline void bw_delay_mem_set(const bw_delay_coeffs *BW_RESTRICT coeffs, bw_delay_state *BW_RESTRICT state, void *mem);
static inline void bw_delay_mem_set(const bw_delay_coeffs *BW_RESTRICT coeffs, bw_delay_state *BW_RESTRICT state, void *BW_RESTRICT mem);
/*! <<<```
* Associates the contiguous memory block `mem` to the given `state`.
*
@ -173,7 +173,7 @@ static inline void bw_delay_process(bw_delay_coeffs *BW_RESTRICT coeffs, bw_dela
*
* #### bw_delay_process_multi()
* ```>>> */
static inline void bw_delay_process_multi(bw_delay_coeffs *BW_RESTRICT coeffs, bw_delay_state * const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples);
static inline void bw_delay_process_multi(bw_delay_coeffs *BW_RESTRICT coeffs, bw_delay_state *BW_RESTRICT const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples);
/*! <<<```
* Processes the first `n_samples` of the `n_channels` input buffers `x` and
* fills the first `n_samples` of the `n_channels` output buffers `y`, while
@ -226,7 +226,7 @@ struct bw_delay_coeffs {
};
struct bw_delay_state {
float *buf;
float *BW_RESTRICT buf;
size_t idx;
};
@ -244,7 +244,7 @@ static inline size_t bw_delay_mem_req(const bw_delay_coeffs *BW_RESTRICT coeffs)
return coeffs->len * sizeof(float);
}
static inline void bw_delay_mem_set(const bw_delay_coeffs *BW_RESTRICT coeffs, bw_delay_state *BW_RESTRICT state, void *mem) {
static inline void bw_delay_mem_set(const bw_delay_coeffs *BW_RESTRICT coeffs, bw_delay_state *BW_RESTRICT state, void *BW_RESTRICT mem) {
(void)coeffs;
state->buf = (float *)mem;
}
@ -295,7 +295,7 @@ static inline void bw_delay_process(bw_delay_coeffs *BW_RESTRICT coeffs, bw_dela
y[i] = bw_delay_process1(coeffs, state, x[i]);
}
static inline void bw_delay_process_multi(bw_delay_coeffs *BW_RESTRICT coeffs, bw_delay_state * const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples) {
static inline void bw_delay_process_multi(bw_delay_coeffs *BW_RESTRICT coeffs, bw_delay_state *BW_RESTRICT const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples) {
bw_delay_update_coeffs_ctrl(coeffs);
for (size_t i = 0; i < n_samples; i++)
for (size_t j = 0; j < n_channels; j++)
@ -361,8 +361,8 @@ public:
private:
bw_delay_coeffs coeffs;
bw_delay_state states[N_CHANNELS];
bw_delay_state *statesP[N_CHANNELS];
void *mem;
bw_delay_state *BW_RESTRICT statesP[N_CHANNELS];
void *BW_RESTRICT mem;
};
template<size_t N_CHANNELS>

View File

@ -37,8 +37,8 @@
* <li><code>bw_dist_process()</code> and
* <code>bw_dist_process_multi()</code> now use <code>size_t</code>
* to count samples and channels.</li>
* <li>Added more <code>const</code> specifiers to input
* arguments.</li>
* <li>Added more <code>const</code> and <code>BW_RESTRICT</code>
* specifiers to input arguments and implementation.</li>
* <li>Moved C++ code to C header.</li>
* <li>Added overladed C++ <code>process()</code> function taking
* C-style arrays as arguments.</li>
@ -134,7 +134,7 @@ static inline void bw_dist_process(bw_dist_coeffs *BW_RESTRICT coeffs, bw_dist_s
*
* #### bw_dist_process_multi()
* ```>>> */
static inline void bw_dist_process_multi(bw_dist_coeffs *BW_RESTRICT coeffs, bw_dist_state * const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples);
static inline void bw_dist_process_multi(bw_dist_coeffs *BW_RESTRICT coeffs, bw_dist_state *BW_RESTRICT const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples);
/*! <<<```
* Processes the first `n_samples` of the `n_channels` input buffers `x` and
* fills the first `n_samples` of the `n_channels` output buffers `y`, while
@ -278,7 +278,7 @@ static inline void bw_dist_process(bw_dist_coeffs *BW_RESTRICT coeffs, bw_dist_s
}
}
static inline void bw_dist_process_multi(bw_dist_coeffs *BW_RESTRICT coeffs, bw_dist_state * const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples) {
static inline void bw_dist_process_multi(bw_dist_coeffs *BW_RESTRICT coeffs, bw_dist_state *BW_RESTRICT const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples) {
bw_dist_update_coeffs_ctrl(coeffs);
for (size_t i = 0; i < n_samples; i++) {
bw_dist_update_coeffs_audio(coeffs);
@ -343,7 +343,7 @@ public:
private:
bw_dist_coeffs coeffs;
bw_dist_state states[N_CHANNELS];
bw_dist_state *statesP[N_CHANNELS];
bw_dist_state *BW_RESTRICT statesP[N_CHANNELS];
};
template<size_t N_CHANNELS>

View File

@ -36,8 +36,8 @@
* <li><code>bw_drive_process()</code> and
* <code>bw_drive_process_multi()</code> now use
* <code>size_t</code> to count samples and channels.</li>
* <li>Added more <code>const</code> specifiers to input
* arguments.</li>
* <li>Added more <code>const</code> and <code>BW_RESTRICT</code>
* specifiers to input arguments and implementation.</li>
* <li>Moved C++ code to C header.</li>
* <li>Added overladed C++ <code>process()</code> function taking
* C-style arrays as arguments.</li>
@ -133,7 +133,7 @@ static inline void bw_drive_process(bw_drive_coeffs *BW_RESTRICT coeffs, bw_driv
*
* #### bw_drive_process_multi()
* ```>>> */
static inline void bw_drive_process_multi(bw_drive_coeffs *BW_RESTRICT coeffs, bw_drive_state * const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples);
static inline void bw_drive_process_multi(bw_drive_coeffs *BW_RESTRICT coeffs, bw_drive_state *BW_RESTRICT const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples);
/*! <<<```
* Processes the first `n_samples` of the `n_channels` input buffers `x` and
* fills the first `n_samples` of the `n_channels` output buffers `y`, while
@ -267,7 +267,7 @@ static inline void bw_drive_process(bw_drive_coeffs *BW_RESTRICT coeffs, bw_driv
}
}
static inline void bw_drive_process_multi(bw_drive_coeffs *BW_RESTRICT coeffs, bw_drive_state * const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples) {
static inline void bw_drive_process_multi(bw_drive_coeffs *BW_RESTRICT coeffs, bw_drive_state *BW_RESTRICT const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples) {
bw_drive_update_coeffs_ctrl(coeffs);
for (size_t i = 0; i < n_samples; i++) {
bw_drive_update_coeffs_audio(coeffs);
@ -332,7 +332,7 @@ public:
private:
bw_drive_coeffs coeffs;
bw_drive_state states[N_CHANNELS];
bw_drive_state *statesP[N_CHANNELS];
bw_drive_state *BW_RESTRICT statesP[N_CHANNELS];
};
template<size_t N_CHANNELS>

View File

@ -33,8 +33,8 @@
* <li><code>bw_env_follow_process()</code> and
* <code>bw_env_follow_process_multi()</code> now use
* <code>size_t</code> to count samples and channels.</li>
* <li>Added more <code>const</code> specifiers to input
* arguments.</li>
* <li>Added more <code>const</code> and <code>BW_RESTRICT</code>
* specifiers to input arguments and implementation.</li>
* <li>Moved C++ code to C header.</li>
* <li>Added overladed C++ <code>process()</code> function taking
* C-style arrays as arguments.</li>
@ -148,7 +148,7 @@ static inline void bw_env_follow_process(bw_env_follow_coeffs *BW_RESTRICT coeff
*
* #### bw_env_follow_process_multi()
* ```>>> */
static inline void bw_env_follow_process_multi(bw_env_follow_coeffs *BW_RESTRICT coeffs, bw_env_follow_state * const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples);
static inline void bw_env_follow_process_multi(bw_env_follow_coeffs *BW_RESTRICT coeffs, bw_env_follow_state *BW_RESTRICT const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples);
/*! <<<```
* Processes the first `n_samples` of the `n_channels` input buffers `x` and
* fills the first `n_samples` of the `n_channels` output buffers `y`, while
@ -250,7 +250,7 @@ static inline void bw_env_follow_process(bw_env_follow_coeffs *BW_RESTRICT coeff
}
}
static inline void bw_env_follow_process_multi(bw_env_follow_coeffs *BW_RESTRICT coeffs, bw_env_follow_state * const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples) {
static inline void bw_env_follow_process_multi(bw_env_follow_coeffs *BW_RESTRICT coeffs, bw_env_follow_state *BW_RESTRICT const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples) {
bw_env_follow_update_coeffs_ctrl(coeffs);
if (y != NULL)
for (size_t i = 0; i < n_samples; i++) {
@ -326,7 +326,7 @@ public:
private:
bw_env_follow_coeffs coeffs;
bw_env_follow_state states[N_CHANNELS];
bw_env_follow_state *statesP[N_CHANNELS];
bw_env_follow_state *BW_RESTRICT statesP[N_CHANNELS];
};
template<size_t N_CHANNELS>

View File

@ -45,8 +45,8 @@
* <li><code>bw_env_gen_process()</code> and
* <code>bw_env_gen_process_multi()</code> now use
* <code>size_t</code> to count samples and channels.</li>
* <li>Added more <code>const</code> specifiers to input
* arguments.</li>
* <li>Added more <code>const</code> and <code>BW_RESTRICT</code>
* specifiers to input arguments and implementation.</li>
* <li>Moved C++ code to C header.</li>
* <li>Added overladed C++ <code>process()</code> function taking
* C-style arrays as arguments.</li>
@ -184,7 +184,7 @@ static inline float bw_env_gen_process1(const bw_env_gen_coeffs *BW_RESTRICT coe
*
* #### bw_env_gen_process()
* ```>>> */
static inline void bw_env_gen_process(bw_env_gen_coeffs *BW_RESTRICT coeffs, bw_env_gen_state *BW_RESTRICT state, char gate, float *y, size_t n_samples);
static inline void bw_env_gen_process(bw_env_gen_coeffs *BW_RESTRICT coeffs, bw_env_gen_state *BW_RESTRICT state, char gate, float *BW_RESTRICT y, size_t n_samples);
/*! <<<```
* Generates and fills the first `n_samples` of the output buffer `y` using
* the given `gate` value (`0` for off, non-`0` for on), while using and
@ -194,7 +194,7 @@ static inline void bw_env_gen_process(bw_env_gen_coeffs *BW_RESTRICT coeffs, bw_
*
* #### bw_env_gen_process_multi()
* ```>>> */
static inline void bw_env_gen_process_multi(bw_env_gen_coeffs *BW_RESTRICT coeffs, bw_env_gen_state * const *BW_RESTRICT state, const char *gate, float * const *y, size_t n_channels, size_t n_samples);
static inline void bw_env_gen_process_multi(bw_env_gen_coeffs *BW_RESTRICT coeffs, bw_env_gen_state *BW_RESTRICT const *BW_RESTRICT state, const char *BW_RESTRICT gate, float *BW_RESTRICT const *BW_RESTRICT y, size_t n_channels, size_t n_samples);
/*! <<<```
* Generates and fills the first `n_samples` of the `n_channels` output
* buffers `y` using the given `n_channels` `gate` values (`0` for off,
@ -243,13 +243,13 @@ static inline void bw_env_gen_set_release(bw_env_gen_coeffs *BW_RESTRICT coeffs,
*
* #### bw_env_gen_get_phase()
* ```>>> */
static inline bw_env_gen_phase bw_env_gen_get_phase(const bw_env_gen_state *state);
static inline bw_env_gen_phase bw_env_gen_get_phase(const bw_env_gen_state *BW_RESTRICT state);
/*! <<<```
* Returns the current envelope generator phase as stored in `state`.
*
* #### bw_env_gen_get_y_z1()
* ```>>> */
static inline float bw_env_gen_get_y_z1(const bw_env_gen_state *state);
static inline float bw_env_gen_get_y_z1(const bw_env_gen_state *BW_RESTRICT state);
/*! <<<```
* Returns the last output sample as stored in `state`.
* }}} */
@ -389,7 +389,7 @@ static inline float bw_env_gen_process1(const bw_env_gen_coeffs *BW_RESTRICT coe
return v;
}
static inline void bw_env_gen_process(bw_env_gen_coeffs *BW_RESTRICT coeffs, bw_env_gen_state *BW_RESTRICT state, char gate, float *y, size_t n_samples) {
static inline void bw_env_gen_process(bw_env_gen_coeffs *BW_RESTRICT coeffs, bw_env_gen_state *BW_RESTRICT state, char gate, float *BW_RESTRICT y, size_t n_samples) {
bw_env_gen_update_coeffs_ctrl(coeffs);
bw_env_gen_update_state_ctrl(coeffs, state, gate);
if (y != NULL)
@ -400,7 +400,7 @@ static inline void bw_env_gen_process(bw_env_gen_coeffs *BW_RESTRICT coeffs, bw_
bw_env_gen_process1(coeffs, state);
}
static inline void bw_env_gen_process_multi(bw_env_gen_coeffs *BW_RESTRICT coeffs, bw_env_gen_state * const *BW_RESTRICT state, const char *gate, float * const *y, size_t n_channels, size_t n_samples) {
static inline void bw_env_gen_process_multi(bw_env_gen_coeffs *BW_RESTRICT coeffs, bw_env_gen_state *BW_RESTRICT const *BW_RESTRICT state, const char *BW_RESTRICT gate, float *BW_RESTRICT const *BW_RESTRICT y, size_t n_channels, size_t n_samples) {
bw_env_gen_update_coeffs_ctrl(coeffs);
for (size_t j = 0; j < n_channels; j++)
bw_env_gen_update_state_ctrl(coeffs, state[j], gate[j]);
@ -445,11 +445,11 @@ static inline void bw_env_gen_set_release(bw_env_gen_coeffs *BW_RESTRICT coeffs,
}
}
static inline bw_env_gen_phase bw_env_gen_get_phase(const bw_env_gen_state *state) {
static inline bw_env_gen_phase bw_env_gen_get_phase(const bw_env_gen_state *BW_RESTRICT state) {
return state->phase;
}
static inline float bw_env_gen_get_y_z1(const bw_env_gen_state *state) {
static inline float bw_env_gen_get_y_z1(const bw_env_gen_state *BW_RESTRICT state) {
return state->y_z1;
}
@ -478,12 +478,12 @@ public:
void setSampleRate(float sampleRate);
void reset();
void process(
const char *gate,
float * const *y,
const char *BW_RESTRICT gate,
float *BW_RESTRICT const *BW_RESTRICT y,
size_t nSamples);
void process(
std::array<char, N_CHANNELS> gate,
std::array<float *, N_CHANNELS> y,
std::array<float *BW_RESTRICT, N_CHANNELS> y,
size_t nSamples);
void setAttack(float value);
@ -506,7 +506,7 @@ public:
private:
bw_env_gen_coeffs coeffs;
bw_env_gen_state states[N_CHANNELS];
bw_env_gen_state *statesP[N_CHANNELS];
bw_env_gen_state *BW_RESTRICT statesP[N_CHANNELS];
};
template<size_t N_CHANNELS>
@ -530,8 +530,8 @@ inline void EnvGen<N_CHANNELS>::reset() {
template<size_t N_CHANNELS>
inline void EnvGen<N_CHANNELS>::process(
const char *gate,
float * const *y,
const char *BW_RESTRICT gate,
float *BW_RESTRICT const *BW_RESTRICT y,
size_t nSamples) {
bw_env_gen_process_multi(&coeffs, statesP, gate, y, N_CHANNELS, nSamples);
}
@ -539,7 +539,7 @@ inline void EnvGen<N_CHANNELS>::process(
template<size_t N_CHANNELS>
inline void EnvGen<N_CHANNELS>::process(
std::array<char, N_CHANNELS> gate,
std::array<float *, N_CHANNELS> y,
std::array<float *BW_RESTRICT, N_CHANNELS> y,
size_t nSamples) {
process(gate.data(), y.data(), nSamples);
}

View File

@ -37,8 +37,8 @@
* <li><code>bw_fuzz_process()</code> and
* <code>bw_fuzz_process_multi()</code> now use <code>size_t</code>
* to count samples and channels.</li>
* <li>Added more <code>const</code> specifiers to input
* arguments.</li>
* <li>Added more <code>const</code> and <code>BW_RESTRICT</code>
* specifiers to input arguments and implementation.</li>
* <li>Moved C++ code to C header.</li>
* <li>Added overladed C++ <code>process()</code> function taking
* C-style arrays as arguments.</li>
@ -134,7 +134,7 @@ static inline void bw_fuzz_process(bw_fuzz_coeffs *BW_RESTRICT coeffs, bw_fuzz_s
*
* #### bw_fuzz_process_multi()
* ```>>> */
static inline void bw_fuzz_process_multi(bw_fuzz_coeffs *BW_RESTRICT coeffs, bw_fuzz_state * const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples);
static inline void bw_fuzz_process_multi(bw_fuzz_coeffs *BW_RESTRICT coeffs, bw_fuzz_state *BW_RESTRICT const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples);
/*! <<<```
* Processes the first `n_samples` of the `n_channels` input buffers `x` and
* fills the first `n_samples` of the `n_channels` output buffers `y`, while
@ -260,7 +260,7 @@ static inline void bw_fuzz_process(bw_fuzz_coeffs *BW_RESTRICT coeffs, bw_fuzz_s
}
}
static inline void bw_fuzz_process_multi(bw_fuzz_coeffs *BW_RESTRICT coeffs, bw_fuzz_state * const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples) {
static inline void bw_fuzz_process_multi(bw_fuzz_coeffs *BW_RESTRICT coeffs, bw_fuzz_state *BW_RESTRICT const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples) {
bw_fuzz_update_coeffs_ctrl(coeffs);
for (size_t i = 0; i < n_samples; i++) {
bw_fuzz_update_coeffs_audio(coeffs);
@ -320,7 +320,7 @@ public:
private:
bw_fuzz_coeffs coeffs;
bw_fuzz_state states[N_CHANNELS];
bw_fuzz_state *statesP[N_CHANNELS];
bw_fuzz_state *BW_RESTRICT statesP[N_CHANNELS];
};
template<size_t N_CHANNELS>

View File

@ -33,8 +33,8 @@
* <li><code>bw_hp1_process()</code> and
* <code>bw_hp1_process_multi()</code> now use <code>size_t</code>
* to count samples and channels.</li>
* <li>Added more <code>const</code> specifiers to input
* arguments.</li>
* <li>Added more <code>const</code> and <code>BW_RESTRICT</code>
* specifiers to input arguments and implementation.</li>
* <li>Moved C++ code to C header.</li>
* <li>Added overladed C++ <code>process()</code> function taking
* C-style arrays as arguments.</li>
@ -143,7 +143,7 @@ static inline void bw_hp1_process(bw_hp1_coeffs *BW_RESTRICT coeffs, bw_hp1_stat
*
* #### bw_hp1_process_multi()
* ```>>> */
static inline void bw_hp1_process_multi(bw_hp1_coeffs *BW_RESTRICT coeffs, bw_hp1_state * const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples);
static inline void bw_hp1_process_multi(bw_hp1_coeffs *BW_RESTRICT coeffs, bw_hp1_state *BW_RESTRICT const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples);
/*! <<<```
* Processes the first `n_samples` of the `n_channels` input buffers `x` and
* fills the first `n_samples` of the `n_channels` output buffers `y`, while
@ -220,7 +220,7 @@ static inline void bw_hp1_process(bw_hp1_coeffs *BW_RESTRICT coeffs, bw_hp1_stat
}
}
static inline void bw_hp1_process_multi(bw_hp1_coeffs *BW_RESTRICT coeffs, bw_hp1_state * const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples) {
static inline void bw_hp1_process_multi(bw_hp1_coeffs *BW_RESTRICT coeffs, bw_hp1_state *BW_RESTRICT const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples) {
bw_hp1_update_coeffs_ctrl(coeffs);
for (size_t i = 0; i < n_samples; i++) {
bw_hp1_update_coeffs_audio(coeffs);
@ -275,7 +275,7 @@ public:
private:
bw_hp1_coeffs coeffs;
bw_hp1_state states[N_CHANNELS];
bw_hp1_state *statesP[N_CHANNELS];
bw_hp1_state *BW_RESTRICT statesP[N_CHANNELS];
};
template<size_t N_CHANNELS>

View File

@ -32,8 +32,8 @@
* <li><code>bw_hs1_process()</code> and
* <code>bw_hs1_process_multi()</code> now use <code>size_t</code>
* to count samples and channels.</li>
* <li>Added more <code>const</code> specifiers to input
* arguments.</li>
* <li>Added more <code>const</code> and <code>BW_RESTRICT</code>
* specifiers to input arguments and implementation.</li>
* <li>Moved C++ code to C header.</li>
* <li>Added overladed C++ <code>process()</code> function taking
* C-style arrays as arguments.</li>
@ -142,7 +142,7 @@ static inline void bw_hs1_process(bw_hs1_coeffs *BW_RESTRICT coeffs, bw_hs1_stat
*
* #### bw_hs1_process_multi()
* ```>>> */
static inline void bw_hs1_process_multi(bw_hs1_coeffs *BW_RESTRICT coeffs, bw_hs1_state * const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples);
static inline void bw_hs1_process_multi(bw_hs1_coeffs *BW_RESTRICT coeffs, bw_hs1_state *BW_RESTRICT const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples);
/*! <<<```
* Processes the first `n_samples` of the `n_channels` input buffers `x` and
* fills the first `n_samples` of the `n_channels` output buffers `y`, while
@ -261,7 +261,7 @@ static inline void bw_hs1_process(bw_hs1_coeffs *BW_RESTRICT coeffs, bw_hs1_stat
}
}
static inline void bw_hs1_process_multi(bw_hs1_coeffs *BW_RESTRICT coeffs, bw_hs1_state * const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples) {
static inline void bw_hs1_process_multi(bw_hs1_coeffs *BW_RESTRICT coeffs, bw_hs1_state *BW_RESTRICT const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples) {
bw_hs1_update_coeffs_ctrl(coeffs);
for (size_t i = 0; i < n_samples; i++) {
bw_hs1_update_coeffs_audio(coeffs);
@ -332,7 +332,7 @@ public:
private:
bw_hs1_coeffs coeffs;
bw_hs1_state states[N_CHANNELS];
bw_hs1_state *statesP[N_CHANNELS];
bw_hs1_state *BW_RESTRICT statesP[N_CHANNELS];
};
template<size_t N_CHANNELS>

View File

@ -32,8 +32,8 @@
* <li><code>bw_hs2_process()</code> and
* <code>bw_hs2_process_multi()</code> now use <code>size_t</code>
* to count samples and channels.</li>
* <li>Added more <code>const</code> specifiers to input
* arguments.</li>
* <li>Added more <code>const</code> and <code>BW_RESTRICT</code>
* specifiers to input arguments and implementation.</li>
* <li>Moved C++ code to C header.</li>
* <li>Added overladed C++ <code>process()</code> function taking
* C-style arrays as arguments.</li>
@ -142,7 +142,7 @@ static inline void bw_hs2_process(bw_hs2_coeffs *BW_RESTRICT coeffs, bw_hs2_stat
*
* #### bw_hs2_process_multi()
* ```>>> */
static inline void bw_hs2_process_multi(bw_hs2_coeffs *BW_RESTRICT coeffs, bw_hs2_state * const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples);
static inline void bw_hs2_process_multi(bw_hs2_coeffs *BW_RESTRICT coeffs, bw_hs2_state *BW_RESTRICT const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples);
/*! <<<```
* Processes the first `n_samples` of the `n_channels` input buffers `x` and
* fills the first `n_samples` of the `n_channels` output buffers `y`, while
@ -281,7 +281,7 @@ static inline void bw_hs2_process(bw_hs2_coeffs *BW_RESTRICT coeffs, bw_hs2_stat
}
}
static inline void bw_hs2_process_multi(bw_hs2_coeffs *BW_RESTRICT coeffs, bw_hs2_state * const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples) {
static inline void bw_hs2_process_multi(bw_hs2_coeffs *BW_RESTRICT coeffs, bw_hs2_state *BW_RESTRICT const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples) {
bw_hs2_update_coeffs_ctrl(coeffs);
for (size_t i = 0; i < n_samples; i++) {
bw_hs2_update_coeffs_audio(coeffs);
@ -360,7 +360,7 @@ public:
private:
bw_hs2_coeffs coeffs;
bw_hs2_state states[N_CHANNELS];
bw_hs2_state *statesP[N_CHANNELS];
bw_hs2_state *BW_RESTRICT statesP[N_CHANNELS];
};
template<size_t N_CHANNELS>

View File

@ -35,8 +35,8 @@
* <li><code>bw_lp1_process()</code> and
* <code>bw_lp1_process_multi()</code> now use <code>size_t</code>
* to count samples and channels.</li>
* <li>Added more <code>const</code> specifiers to input
* arguments.</li>
* <li>Added more <code>const</code> and <code>BW_RESTRICT</code>
* specifiers to input arguments and implementation.</li>
* <li>Moved C++ code to C header.</li>
* <li>Added overladed C++ <code>process()</code> function taking
* C-style arrays as arguments.</li>
@ -146,7 +146,7 @@ static inline void bw_lp1_process(bw_lp1_coeffs *BW_RESTRICT coeffs, bw_lp1_stat
*
* #### bw_lp1_process_multi()
* ```>>> */
static inline void bw_lp1_process_multi(bw_lp1_coeffs *BW_RESTRICT coeffs, bw_lp1_state * const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples);
static inline void bw_lp1_process_multi(bw_lp1_coeffs *BW_RESTRICT coeffs, bw_lp1_state *BW_RESTRICT const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples);
/*! <<<```
* Processes the first `n_samples` of the `n_channels` input buffers `x` and
* fills the first `n_samples` of the `n_channels` output buffers `y`, while
@ -293,7 +293,7 @@ static inline void bw_lp1_process(bw_lp1_coeffs *BW_RESTRICT coeffs, bw_lp1_stat
}
}
static inline void bw_lp1_process_multi(bw_lp1_coeffs *BW_RESTRICT coeffs, bw_lp1_state * const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples) {
static inline void bw_lp1_process_multi(bw_lp1_coeffs *BW_RESTRICT coeffs, bw_lp1_state *BW_RESTRICT const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples) {
for (size_t i = 0; i < n_samples; i++) {
bw_lp1_update_coeffs_audio(coeffs);
for (size_t j = 0; j < n_channels; j++)
@ -357,7 +357,7 @@ public:
private:
bw_lp1_coeffs coeffs;
bw_lp1_state states[N_CHANNELS];
bw_lp1_state *statesP[N_CHANNELS];
bw_lp1_state *BW_RESTRICT statesP[N_CHANNELS];
};
template<size_t N_CHANNELS>

View File

@ -33,8 +33,8 @@
* <li><code>bw_ls1_process()</code> and
* <code>bw_ls1_process_multi()</code> now use <code>size_t</code>
* to count samples and channels.</li>
* <li>Added more <code>const</code> specifiers to input
* arguments.</li>
* <li>Added more <code>const</code> and <code>BW_RESTRICT</code>
* specifiers to input arguments and implementation.</li>
* <li>Moved C++ code to C header.</li>
* <li>Added overladed C++ <code>process()</code> function taking
* C-style arrays as arguments.</li>
@ -143,7 +143,7 @@ static inline void bw_ls1_process(bw_ls1_coeffs *BW_RESTRICT coeffs, bw_ls1_stat
*
* #### bw_ls1_process_multi()
* ```>>> */
static inline void bw_ls1_process_multi(bw_ls1_coeffs *BW_RESTRICT coeffs, bw_ls1_state * const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples);
static inline void bw_ls1_process_multi(bw_ls1_coeffs *BW_RESTRICT coeffs, bw_ls1_state *BW_RESTRICT const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples);
/*! <<<```
* Processes the first `n_samples` of the `n_channels` input buffers `x` and
* fills the first `n_samples` of the `n_channels` output buffers `y`, while
@ -258,7 +258,7 @@ static inline void bw_ls1_process(bw_ls1_coeffs *BW_RESTRICT coeffs, bw_ls1_stat
}
}
static inline void bw_ls1_process_multi(bw_ls1_coeffs *BW_RESTRICT coeffs, bw_ls1_state * const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples) {
static inline void bw_ls1_process_multi(bw_ls1_coeffs *BW_RESTRICT coeffs, bw_ls1_state *BW_RESTRICT const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples) {
bw_ls1_update_coeffs_ctrl(coeffs);
for (size_t i = 0; i < n_samples; i++) {
bw_ls1_update_coeffs_audio(coeffs);
@ -329,7 +329,7 @@ public:
private:
bw_ls1_coeffs coeffs;
bw_ls1_state states[N_CHANNELS];
bw_ls1_state *statesP[N_CHANNELS];
bw_ls1_state *BW_RESTRICT statesP[N_CHANNELS];
};
template<size_t N_CHANNELS>

View File

@ -33,8 +33,8 @@
* <li><code>bw_ls2_process()</code> and
* <code>bw_ls2_process_multi()</code> now use <code>size_t</code>
* to count samples and channels.</li>
* <li>Added more <code>const</code> specifiers to input
* arguments.</li>
* <li>Added more <code>const</code> and <code>BW_RESTRICT</code>
* specifiers to input arguments and implementation.</li>
* <li>Moved C++ code to C header.</li>
* <li>Added overladed C++ <code>process()</code> function taking
* C-style arrays as arguments.</li>
@ -143,7 +143,7 @@ static inline void bw_ls2_process(bw_ls2_coeffs *BW_RESTRICT coeffs, bw_ls2_stat
*
* #### bw_ls2_process_multi()
* ```>>> */
static inline void bw_ls2_process_multi(bw_ls2_coeffs *BW_RESTRICT coeffs, bw_ls2_state * const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples);
static inline void bw_ls2_process_multi(bw_ls2_coeffs *BW_RESTRICT coeffs, bw_ls2_state *BW_RESTRICT const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples);
/*! <<<```
* Processes the first `n_samples` of the `n_channels` input buffers `x` and
* fills the first `n_samples` of the `n_channels` output buffers `y`, while
@ -280,7 +280,7 @@ static inline void bw_ls2_process(bw_ls2_coeffs *BW_RESTRICT coeffs, bw_ls2_stat
}
}
static inline void bw_ls2_process_multi(bw_ls2_coeffs *BW_RESTRICT coeffs, bw_ls2_state * const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples) {
static inline void bw_ls2_process_multi(bw_ls2_coeffs *BW_RESTRICT coeffs, bw_ls2_state *BW_RESTRICT const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples) {
bw_ls2_update_coeffs_ctrl(coeffs);
for (size_t i = 0; i < n_samples; i++) {
bw_ls2_update_coeffs_audio(coeffs);
@ -359,7 +359,7 @@ public:
private:
bw_ls2_coeffs coeffs;
bw_ls2_state states[N_CHANNELS];
bw_ls2_state *statesP[N_CHANNELS];
bw_ls2_state *BW_RESTRICT statesP[N_CHANNELS];
};
template<size_t N_CHANNELS>

View File

@ -60,9 +60,12 @@
* improved implementation.</li>
* <li>Fixed input validity ranges in <code>bw_asinhf()</code> and
* <code>bw_acoshf()</code>.</li>
* <li>Added <code>BW_RESTRICT</code> specifiers to input
* arguments of <code>bw_intfracf()</code>.</li>
* <li>Removed usage of reserved identifiers and designated
* initializers.</li>
* <li>Added <code>extern "C"</code> to functions.</li>
* <li>Added more debugging checks in <code>bw_intfracf()</code>.</li>
* <li>Improved documentation w.r.t. validity of input values and
* approximation errors.</li>
* </ul>
@ -255,7 +258,7 @@ static inline float bw_ceilf(float x);
*
* #### bw_intfracf()
* ```>>> */
static inline void bw_intfracf(float x, float *i, float *f);
static inline void bw_intfracf(float x, float *BW_RESTRICT i, float *BW_RESTRICT f);
/*! <<<```
* Puts the integer part (floor) of `x` in `i` and the fractional part in
* `f`.
@ -660,8 +663,11 @@ static inline float bw_ceilf(float x) {
return r;
}
static inline void bw_intfracf(float x, float *i, float *f) {
static inline void bw_intfracf(float x, float *BW_RESTRICT i, float *BW_RESTRICT f) {
BW_ASSERT(bw_is_finite(x));
BW_ASSERT(i != NULL);
BW_ASSERT(f != NULL);
BW_ASSERT(i != f);
*i = bw_floorf(x);
*f = x - *i;
BW_ASSERT(bw_is_finite(*i));

View File

@ -32,8 +32,8 @@
* <li><code>bw_mm1_process()</code> and
* <code>bw_mm1_process_multi()</code> now use <code>size_t</code>
* to count samples and channels.</li>
* <li>Added more <code>const</code> specifiers to input
* arguments.</li>
* <li>Added more <code>const</code> and <code>BW_RESTRICT</code>
* specifiers to input arguments and implementation.</li>
* <li>Moved C++ code to C header.</li>
* <li>Added overladed C++ <code>process()</code> function taking
* C-style arrays as arguments.</li>
@ -142,7 +142,7 @@ static inline void bw_mm1_process(bw_mm1_coeffs *BW_RESTRICT coeffs, bw_mm1_stat
*
* #### bw_mm1_process_multi()
* ```>>> */
static inline void bw_mm1_process_multi(bw_mm1_coeffs *BW_RESTRICT coeffs, bw_mm1_state * const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples);
static inline void bw_mm1_process_multi(bw_mm1_coeffs *BW_RESTRICT coeffs, bw_mm1_state *BW_RESTRICT const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples);
/*! <<<```
* Processes the first `n_samples` of the `n_channels` input buffers `x` and
* fills the first `n_samples` of the `n_channels` output buffers `y`, while
@ -273,7 +273,7 @@ static inline void bw_mm1_process(bw_mm1_coeffs *BW_RESTRICT coeffs, bw_mm1_stat
}
}
static inline void bw_mm1_process_multi(bw_mm1_coeffs *BW_RESTRICT coeffs, bw_mm1_state * const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples) {
static inline void bw_mm1_process_multi(bw_mm1_coeffs *BW_RESTRICT coeffs, bw_mm1_state *BW_RESTRICT const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples) {
bw_mm1_update_coeffs_ctrl(coeffs);
for (size_t i = 0; i < n_samples; i++) {
bw_mm1_update_coeffs_audio(coeffs);
@ -348,7 +348,7 @@ public:
private:
bw_mm1_coeffs coeffs;
bw_mm1_state states[N_CHANNELS];
bw_mm1_state *statesP[N_CHANNELS];
bw_mm1_state *BW_RESTRICT statesP[N_CHANNELS];
};
template<size_t N_CHANNELS>

View File

@ -32,8 +32,8 @@
* <li><code>bw_mm2_process()</code> and
* <code>bw_mm2_process_multi()</code> now use <code>size_t</code>
* to count samples and channels.</li>
* <li>Added more <code>const</code> specifiers to input
* arguments.</li>
* <li>Added more <code>const</code> and <code>BW_RESTRICT</code>
* specifiers to input arguments and implementation.</li>
* <li>Moved C++ code to C header.</li>
* <li>Added overladed C++ <code>process()</code> function taking
* C-style arrays as arguments.</li>
@ -142,7 +142,7 @@ static inline void bw_mm2_process(bw_mm2_coeffs *BW_RESTRICT coeffs, bw_mm2_stat
*
* #### bw_mm2_process_multi()
* ```>>> */
static inline void bw_mm2_process_multi(bw_mm2_coeffs *BW_RESTRICT coeffs, bw_mm2_state * const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples);
static inline void bw_mm2_process_multi(bw_mm2_coeffs *BW_RESTRICT coeffs, bw_mm2_state *BW_RESTRICT const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples);
/*! <<<```
* Processes the first `n_samples` of the `n_channels` input buffers `x` and
* fills the first `n_samples` of the `n_channels` output buffers `y`, while
@ -318,7 +318,7 @@ static inline void bw_mm2_process(bw_mm2_coeffs *BW_RESTRICT coeffs, bw_mm2_stat
}
}
static inline void bw_mm2_process_multi(bw_mm2_coeffs *BW_RESTRICT coeffs, bw_mm2_state * const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples) {
static inline void bw_mm2_process_multi(bw_mm2_coeffs *BW_RESTRICT coeffs, bw_mm2_state *BW_RESTRICT const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples) {
bw_mm2_update_coeffs_ctrl(coeffs);
for (size_t i = 0; i < n_samples; i++) {
bw_mm2_update_coeffs_audio(coeffs);
@ -408,7 +408,7 @@ public:
private:
bw_mm2_coeffs coeffs;
bw_mm2_state states[N_CHANNELS];
bw_mm2_state *statesP[N_CHANNELS];
bw_mm2_state *BW_RESTRICT statesP[N_CHANNELS];
};
template<size_t N_CHANNELS>

View File

@ -32,8 +32,8 @@
* <li><code>bw_noise_gate_process()</code> and
* <code>bw_noise_gate_process_multi()</code> now use
* <code>size_t</code> to count samples and channels.</li>
* <li>Added more <code>const</code> specifiers to input
* arguments.</li>
* <li>Added more <code>const</code> and <code>BW_RESTRICT</code>
* specifiers to input arguments and implementation.</li>
* <li>Moved C++ code to C header.</li>
* <li>Added overladed C++ <code>process()</code> function taking
* C-style arrays as arguments.</li>
@ -137,7 +137,7 @@ static inline void bw_noise_gate_process(bw_noise_gate_coeffs *BW_RESTRICT coeff
*
* #### bw_noise_gate_process_multi()
* ```>>> */
static inline void bw_noise_gate_process_multi(bw_noise_gate_coeffs *BW_RESTRICT coeffs, bw_noise_gate_state * const *BW_RESTRICT state, const float * const *x, const float * const *x_sc, float * const *y, size_t n_channels, size_t n_samples);
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, float * const *y, size_t n_channels, size_t n_samples);
/*! <<<```
* Processes the first `n_samples` of the `n_channels` input buffers `x` and
* the first `n_samples` of the `n_channels` sidechain input buffers `x_sc`,
@ -275,7 +275,7 @@ static inline void bw_noise_gate_process(bw_noise_gate_coeffs *BW_RESTRICT coeff
}
}
static inline void bw_noise_gate_process_multi(bw_noise_gate_coeffs *BW_RESTRICT coeffs, bw_noise_gate_state * const *BW_RESTRICT state, const float * const *x, const float * const *x_sc, float * const *y, size_t n_channels, size_t n_samples) {
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, float * const *y, size_t n_channels, size_t n_samples) {
bw_noise_gate_update_coeffs_ctrl(coeffs);
for (size_t i = 0; i < n_samples; i++) {
bw_noise_gate_update_coeffs_audio(coeffs);
@ -325,12 +325,12 @@ public:
void reset();
void process(
const float * const *x,
const float * const *xSC,
const float * const *x_sc,
float * const *y,
size_t nSamples);
void process(
std::array<const float *, N_CHANNELS> x,
std::array<const float *, N_CHANNELS> xSC,
std::array<const float *, N_CHANNELS> x_sc,
std::array<float *, N_CHANNELS> y,
size_t nSamples);
@ -352,7 +352,7 @@ public:
private:
bw_noise_gate_coeffs coeffs;
bw_noise_gate_state states[N_CHANNELS];
bw_noise_gate_state *statesP[N_CHANNELS];
bw_noise_gate_state *BW_RESTRICT statesP[N_CHANNELS];
};
template<size_t N_CHANNELS>
@ -377,19 +377,19 @@ inline void NoiseGate<N_CHANNELS>::reset() {
template<size_t N_CHANNELS>
inline void NoiseGate<N_CHANNELS>::process(
const float * const *x,
const float * const *xSC,
const float * const *x_sc,
float * const *y,
size_t nSamples) {
bw_noise_gate_process_multi(&coeffs, statesP, x, xSC, y, N_CHANNELS, nSamples);
bw_noise_gate_process_multi(&coeffs, statesP, x, x_sc, y, N_CHANNELS, nSamples);
}
template<size_t N_CHANNELS>
inline void NoiseGate<N_CHANNELS>::process(
std::array<const float *, N_CHANNELS> x,
std::array<const float *, N_CHANNELS> xSC,
std::array<const float *, N_CHANNELS> x_sc,
std::array<float *, N_CHANNELS> y,
size_t nSamples) {
process(x.data(), xSC.data(), y.data(), nSamples);
process(x.data(), x_sc.data(), y.data(), nSamples);
}
template<size_t N_CHANNELS>

View File

@ -36,8 +36,8 @@
* <li><code>bw_noise_gen_process()</code> and
* <code>bw_noise_gen_process_multi()</code> now use
* <code>size_t</code> to count samples and channels.</li>
* <li>Added more <code>const</code> specifiers to input
* arguments.</li>
* <li>Added more <code>const</code> and <code>BW_RESTRICT</code>
* specifiers to input arguments and implementation.</li>
* <li>Moved C++ code to C header.</li>
* <li>Added overladed C++ <code>process()</code> function taking
* C-style arrays as arguments.</li>
@ -117,7 +117,7 @@ static inline void bw_noise_gen_process(bw_noise_gen_coeffs *BW_RESTRICT coeffs,
*
* #### bw_noise_gen_process_multi()
* ```>>> */
static inline void bw_noise_gen_process_multi(bw_noise_gen_coeffs *BW_RESTRICT coeffs, float * const *y, size_t n_channels, size_t n_samples);
static inline void bw_noise_gen_process_multi(bw_noise_gen_coeffs *BW_RESTRICT coeffs, float *BW_RESTRICT const *BW_RESTRICT y, size_t n_channels, size_t n_samples);
/*! <<<```
* Generates and fills the first `n_samples` of the `n_channels` output
* buffers `y` using `coeffs`.
@ -165,7 +165,7 @@ struct bw_noise_gen_coeffs {
float scaling_k;
// Parameters
uint64_t *state;
uint64_t *BW_RESTRICT state;
char sample_rate_scaling;
};
@ -195,7 +195,7 @@ static inline void bw_noise_gen_process(bw_noise_gen_coeffs *BW_RESTRICT coeffs,
y[i] = bw_noise_gen_process1_scaling(coeffs);
}
static inline void bw_noise_gen_process_multi(bw_noise_gen_coeffs *BW_RESTRICT coeffs, float * const *y, size_t n_channels, size_t n_samples) {
static inline void bw_noise_gen_process_multi(bw_noise_gen_coeffs *BW_RESTRICT coeffs, float *BW_RESTRICT const *BW_RESTRICT y, size_t n_channels, size_t n_samples) {
for (size_t i = 0; i < n_channels; i++)
bw_noise_gen_process(coeffs, y[i], n_samples);
}
@ -227,10 +227,10 @@ public:
void setSampleRate(float sampleRate);
void process(
float * const *y,
float *BW_RESTRICT const *BW_RESTRICT y,
size_t nSamples);
void process(
std::array<float *, N_CHANNELS> y,
std::array<float *BW_RESTRICT, N_CHANNELS> y,
size_t nSamples);
void setSampleRateScaling(bool value);
@ -262,14 +262,14 @@ inline void NoiseGen<N_CHANNELS>::setSampleRate(float sampleRate) {
template<size_t N_CHANNELS>
inline void NoiseGen<N_CHANNELS>::process(
float * const *y,
float *BW_RESTRICT const *BW_RESTRICT y,
size_t nSamples) {
bw_noise_gen_process_multi(&coeffs, y, N_CHANNELS, nSamples);
}
template<size_t N_CHANNELS>
inline void NoiseGen<N_CHANNELS>::process(
std::array<float *, N_CHANNELS> y,
std::array<float *BW_RESTRICT, N_CHANNELS> y,
size_t nSamples) {
process(y.data(), nSamples);
}

View File

@ -33,8 +33,8 @@
* <li><code>bw_notch_process()</code> and
* <code>bw_notch_process_multi()</code> now use
* <code>size_t</code> to count samples and channels.</li>
* <li>Added more <code>const</code> specifiers to input
* arguments.</li>
* <li>Added more <code>const</code> and <code>BW_RESTRICT</code>
* specifiers to input arguments and implementation.</li>
* <li>Moved C++ code to C header.</li>
* <li>Added overladed C++ <code>process()</code> function taking
* C-style arrays as arguments.</li>
@ -143,7 +143,7 @@ static inline void bw_notch_process(bw_notch_coeffs *BW_RESTRICT coeffs, bw_notc
*
* #### bw_notch_process_multi()
* ```>>> */
static inline void bw_notch_process_multi(bw_notch_coeffs *BW_RESTRICT coeffs, bw_notch_state * const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples);
static inline void bw_notch_process_multi(bw_notch_coeffs *BW_RESTRICT coeffs, bw_notch_state *BW_RESTRICT const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples);
/*! <<<```
* Processes the first `n_samples` of the `n_channels` input buffers `x` and
* fills the first `n_samples` of the `n_channels` output buffers `y`, while
@ -231,7 +231,7 @@ static inline void bw_notch_process(bw_notch_coeffs *BW_RESTRICT coeffs, bw_notc
}
}
static inline void bw_notch_process_multi(bw_notch_coeffs *BW_RESTRICT coeffs, bw_notch_state * const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples) {
static inline void bw_notch_process_multi(bw_notch_coeffs *BW_RESTRICT coeffs, bw_notch_state *BW_RESTRICT const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples) {
bw_notch_update_coeffs_ctrl(coeffs);
for (size_t i = 0; i < n_samples; i++) {
bw_notch_update_coeffs_audio(coeffs);
@ -291,7 +291,7 @@ public:
private:
bw_notch_coeffs coeffs;
bw_notch_state states[N_CHANNELS];
bw_notch_state *statesP[N_CHANNELS];
bw_notch_state *BW_RESTRICT statesP[N_CHANNELS];
};
template<size_t N_CHANNELS>

View File

@ -34,8 +34,8 @@
* <ul>
* <li>Now using <code>size_t</code> instead of
* <code>BW_SIZE_T</code>.</li>
* <li>Added more <code>const</code> specifiers to input
* arguments.</li>
* <li>Added more <code>const</code> and <code>BW_RESTRICT</code>
* specifiers to input arguments and implementation.</li>
* <li>Moved C++ code to C header.</li>
* <li>Added overladed C++ <code>process()</code> function taking
* C-style arrays as arguments.</li>
@ -196,7 +196,7 @@ static inline void bw_one_pole_process(bw_one_pole_coeffs *BW_RESTRICT coeffs, b
*
* #### bw_one_pole_process_multi()
* ```>>> */
static inline void bw_one_pole_process_multi(bw_one_pole_coeffs *BW_RESTRICT coeffs, bw_one_pole_state * const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples);
static inline void bw_one_pole_process_multi(bw_one_pole_coeffs *BW_RESTRICT coeffs, bw_one_pole_state *BW_RESTRICT const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples);
/*! <<<```
* Processes the first `n_samples` of the `n_channels` input buffers `x` and
* fills the first `n_samples` of the `n_channels` output buffers `y`, while
@ -706,7 +706,7 @@ static inline void bw_one_pole_process(bw_one_pole_coeffs *BW_RESTRICT coeffs, b
BW_ASSERT_DEEP(!bw_has_nan(y, n_samples));
}
static inline void bw_one_pole_process_multi(bw_one_pole_coeffs *BW_RESTRICT coeffs, bw_one_pole_state * const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples) {
static inline void bw_one_pole_process_multi(bw_one_pole_coeffs *BW_RESTRICT coeffs, bw_one_pole_state *BW_RESTRICT const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples) {
BW_ASSERT(coeffs != NULL);
BW_ASSERT_DEEP(bw_one_pole_coeffs_is_valid(coeffs));
BW_ASSERT_DEEP(coeffs->state >= bw_one_pole_coeffs_state_reset_coeffs);
@ -1014,7 +1014,7 @@ public:
private:
bw_one_pole_coeffs coeffs;
bw_one_pole_state states[N_CHANNELS];
bw_one_pole_state *statesP[N_CHANNELS];
bw_one_pole_state *BW_RESTRICT statesP[N_CHANNELS];
};
template<size_t N_CHANNELS>

View File

@ -38,8 +38,8 @@
* <li><code>bw_osc_filt_process()</code> and
* <code>bw_osc_filt_process_multi()</code> now use
* <code>size_t</code> to count samples and channels.</li>
* <li>Added more <code>const</code> specifiers to input
* arguments.</li>
* <li>Added more <code>const</code> and <code>BW_RESTRICT</code>
* specifiers to input arguments and implementation.</li>
* <li>Moved C++ code to C header.</li>
* <li>Added overladed C++ <code>process()</code> function taking
* C-style arrays as arguments.</li>
@ -110,7 +110,7 @@ static inline void bw_osc_filt_process(bw_osc_filt_state *BW_RESTRICT state, con
*
* #### bw_osc_filt_process_multi()
* ```>>> */
static inline void bw_osc_filt_process_multi(bw_osc_filt_state * const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples);
static inline void bw_osc_filt_process_multi(bw_osc_filt_state *BW_RESTRICT const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples);
/*! <<<```
* Processes the first `n_samples` of the `n_channels` input buffers `x` and
* fills the first `n_samples` of the `n_channels` output buffers `y`, while
@ -152,7 +152,7 @@ static inline void bw_osc_filt_process(bw_osc_filt_state *BW_RESTRICT state, con
y[i] = bw_osc_filt_process1(state, x[i]);
}
static inline void bw_osc_filt_process_multi(bw_osc_filt_state * const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples) {
static inline void bw_osc_filt_process_multi(bw_osc_filt_state *BW_RESTRICT const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples) {
for (size_t i = 0; i < n_channels; i++)
bw_osc_filt_process(state[i], x[i], y[i], n_samples);
}
@ -195,7 +195,7 @@ public:
private:
bw_osc_filt_state states[N_CHANNELS];
bw_osc_filt_state *statesP[N_CHANNELS];
bw_osc_filt_state *BW_RESTRICT statesP[N_CHANNELS];
};
template<size_t N_CHANNELS>

View File

@ -40,8 +40,8 @@
* <li><code>bw_peak_process()</code> and
* <code>bw_peak_process_multi()</code> now use <code>size_t</code>
* to count samples and channels.</li>
* <li>Added more <code>const</code> specifiers to input
* arguments.</li>
* <li>Added more <code>const</code> and <code>BW_RESTRICT</code>
* specifiers to input arguments and implementation.</li>
* <li>Moved C++ code to C header.</li>
* <li>Added overladed C++ <code>process()</code> function taking
* C-style arrays as arguments.</li>
@ -152,7 +152,7 @@ static inline void bw_peak_process(bw_peak_coeffs *BW_RESTRICT coeffs, bw_peak_s
*
* #### bw_peak_process_multi()
* ```>>> */
static inline void bw_peak_process_multi(bw_peak_coeffs *BW_RESTRICT coeffs, bw_peak_state * const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples);
static inline void bw_peak_process_multi(bw_peak_coeffs *BW_RESTRICT coeffs, bw_peak_state *BW_RESTRICT const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples);
/*! <<<```
* Processes the first `n_samples` of the `n_channels` input buffers `x` and
* fills the first `n_samples` of the `n_channels` output buffers `y`, while
@ -315,7 +315,7 @@ static inline void bw_peak_process(bw_peak_coeffs *BW_RESTRICT coeffs, bw_peak_s
}
}
static inline void bw_peak_process_multi(bw_peak_coeffs *BW_RESTRICT coeffs, bw_peak_state * const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples) {
static inline void bw_peak_process_multi(bw_peak_coeffs *BW_RESTRICT coeffs, bw_peak_state *BW_RESTRICT const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples) {
bw_peak_update_coeffs_ctrl(coeffs);
for (size_t i = 0; i < n_samples; i++) {
bw_peak_update_coeffs_audio(coeffs);
@ -411,7 +411,7 @@ public:
private:
bw_peak_coeffs coeffs;
bw_peak_state states[N_CHANNELS];
bw_peak_state *statesP[N_CHANNELS];
bw_peak_state *BW_RESTRICT statesP[N_CHANNELS];
};
template<size_t N_CHANNELS>

View File

@ -34,8 +34,8 @@
* <li><code>bw_phase_gen_process()</code> and
* <code>bw_phase_gen_process_multi()</code> now use
* <code>size_t</code> to count samples and channels.</li>
* <li>Added more <code>const</code> specifiers to input
* arguments.</li>
* <li>Added more <code>const</code> and <code>BW_RESTRICT</code>
* specifiers to input arguments and implementation.</li>
* <li>Moved C++ code to C header.</li>
* <li>Added overladed C++ <code>process()</code> function taking
* C-style arrays as arguments.</li>
@ -165,7 +165,7 @@ static inline void bw_phase_gen_process(bw_phase_gen_coeffs *BW_RESTRICT coeffs,
*
* #### bw_phase_gen_process_multi()
* ```>>> */
static inline void bw_phase_gen_process_multi(bw_phase_gen_coeffs *BW_RESTRICT coeffs, bw_phase_gen_state * const *BW_RESTRICT state, const float * const *x_mod, float * const *y, float * const *y_phase_inc, size_t n_channels, size_t n_samples);
static inline void bw_phase_gen_process_multi(bw_phase_gen_coeffs *BW_RESTRICT coeffs, bw_phase_gen_state *BW_RESTRICT const *BW_RESTRICT state, const float * const *x_mod, float * const *y, float * const *y_phase_inc, size_t n_channels, size_t n_samples);
/*! <<<```
* Generates and fills the first `n_samples` of the `n_channels` output
* buffers `y`, while using and updating both the common `coeffs` and each of
@ -342,7 +342,7 @@ static inline void bw_phase_gen_process(bw_phase_gen_coeffs *BW_RESTRICT coeffs,
}
}
static inline void bw_phase_gen_process_multi(bw_phase_gen_coeffs *BW_RESTRICT coeffs, bw_phase_gen_state * const *BW_RESTRICT state, const float * const *x_mod, float * const *y, float * const *y_phase_inc, size_t n_channels, size_t n_samples) {
static inline void bw_phase_gen_process_multi(bw_phase_gen_coeffs *BW_RESTRICT coeffs, bw_phase_gen_state *BW_RESTRICT const *BW_RESTRICT state, const float * const *x_mod, float * const *y, float * const *y_phase_inc, size_t n_channels, size_t n_samples) {
bw_phase_gen_update_coeffs_ctrl(coeffs);
if (y != NULL) {
if (x_mod != NULL) {
@ -500,7 +500,7 @@ public:
private:
bw_phase_gen_coeffs coeffs;
bw_phase_gen_state states[N_CHANNELS];
bw_phase_gen_state *statesP[N_CHANNELS];
bw_phase_gen_state *BW_RESTRICT statesP[N_CHANNELS];
};
template<size_t N_CHANNELS>

View File

@ -35,8 +35,8 @@
* <li><code>bw_phaser_process()</code> and
* <code>bw_phaser_process_multi()</code> now use
* <code>size_t</code> to count samples and channels.</li>
* <li>Added more <code>const</code> specifiers to input
* arguments.</li>
* <li>Added more <code>const</code> and <code>BW_RESTRICT</code>
* specifiers to input arguments and implementation.</li>
* <li>Moved C++ code to C header.</li>
* <li>Added overladed C++ <code>process()</code> function taking
* C-style arrays as arguments.</li>
@ -139,7 +139,7 @@ static inline void bw_phaser_process(bw_phaser_coeffs *BW_RESTRICT coeffs, bw_ph
*
* #### bw_phaser_process_multi()
* ```>>> */
static inline void bw_phaser_process_multi(bw_phaser_coeffs *BW_RESTRICT coeffs, bw_phaser_state * const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples);
static inline void bw_phaser_process_multi(bw_phaser_coeffs *BW_RESTRICT coeffs, bw_phaser_state *BW_RESTRICT const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples);
/*! <<<```
* Processes the first `n_samples` of the `n_channels` input buffers `x` and
* fills the first `n_samples` of the `n_channels` output buffers `y`, while
@ -263,7 +263,7 @@ static inline void bw_phaser_process(bw_phaser_coeffs *BW_RESTRICT coeffs, bw_ph
}
}
static inline void bw_phaser_process_multi(bw_phaser_coeffs *BW_RESTRICT coeffs, bw_phaser_state * const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples) {
static inline void bw_phaser_process_multi(bw_phaser_coeffs *BW_RESTRICT coeffs, bw_phaser_state *BW_RESTRICT const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples) {
bw_phaser_update_coeffs_ctrl(coeffs);
for (size_t i = 0; i < n_samples; i++) {
bw_phaser_update_coeffs_audio(coeffs);
@ -328,7 +328,7 @@ public:
private:
bw_phaser_coeffs coeffs;
bw_phaser_state states[N_CHANNELS];
bw_phaser_state *statesP[N_CHANNELS];
bw_phaser_state *BW_RESTRICT statesP[N_CHANNELS];
};
template<size_t N_CHANNELS>

View File

@ -39,8 +39,8 @@
* <li><code>bw_pink_filt_process()</code> and
* <code>bw_pink_filt_process_multi()</code> now use
* <code>size_t</code> to count samples and channels.</li>
* <li>Added more <code>const</code> specifiers to input
* arguments.</li>
* <li>Added more <code>const</code> and <code>BW_RESTRICT</code>
* specifiers to input arguments and implementation.</li>
* <li>Moved C++ code to C header.</li>
* <li>Added overladed C++ <code>process()</code> function taking
* C-style arrays as arguments.</li>
@ -148,7 +148,7 @@ static inline void bw_pink_filt_process(bw_pink_filt_coeffs *BW_RESTRICT coeffs,
*
* #### bw_pink_filt_process_multi()
* ```>>> */
static inline void bw_pink_filt_process_multi(bw_pink_filt_coeffs *BW_RESTRICT coeffs, bw_pink_filt_state * const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples);
static inline void bw_pink_filt_process_multi(bw_pink_filt_coeffs *BW_RESTRICT coeffs, bw_pink_filt_state *BW_RESTRICT const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples);
/*! <<<```
* Processes the first `n_samples` of the `n_channels` input buffers `x` and
* fills the first `n_samples` of the `n_channels` output buffers `y`, while
@ -248,7 +248,7 @@ static inline void bw_pink_filt_process(bw_pink_filt_coeffs *BW_RESTRICT coeffs,
y[i] = bw_pink_filt_process1(coeffs, state, x[i]);
}
static inline void bw_pink_filt_process_multi(bw_pink_filt_coeffs *BW_RESTRICT coeffs, bw_pink_filt_state * const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples) {
static inline void bw_pink_filt_process_multi(bw_pink_filt_coeffs *BW_RESTRICT coeffs, bw_pink_filt_state *BW_RESTRICT const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples) {
for (size_t i = 0; i < n_channels; i++)
bw_pink_filt_process(coeffs, state[i], x[i], y[i], n_samples);
}
@ -305,7 +305,7 @@ public:
private:
bw_pink_filt_coeffs coeffs;
bw_pink_filt_state states[N_CHANNELS];
bw_pink_filt_state *statesP[N_CHANNELS];
bw_pink_filt_state *BW_RESTRICT statesP[N_CHANNELS];
};
template<size_t N_CHANNELS>

View File

@ -35,8 +35,8 @@
* <li><code>bw_ppm_process()</code> and
* <code>bw_ppm_process_multi()</code> now use <code>size_t</code>
* to count samples and channels.</li>
* <li>Added more <code>const</code> specifiers to input
* arguments.</li>
* <li>Added more <code>const</code> and <code>BW_RESTRICT</code>
* specifiers to input arguments and implementation.</li>
* <li>Moved C++ code to C header.</li>
* <li>Added overladed C++ <code>process()</code> function taking
* C-style arrays as arguments.</li>
@ -144,7 +144,7 @@ static inline void bw_ppm_process(bw_ppm_coeffs *BW_RESTRICT coeffs, bw_ppm_stat
*
* #### bw_ppm_process_multi()
* ```>>> */
static inline void bw_ppm_process_multi(bw_ppm_coeffs *BW_RESTRICT coeffs, bw_ppm_state * const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples);
static inline void bw_ppm_process_multi(bw_ppm_coeffs *BW_RESTRICT coeffs, bw_ppm_state *BW_RESTRICT const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples);
/*! <<<```
* Processes the first `n_samples` of the `n_channels` input buffers `x` and
* fills the first `n_samples` of the `n_channels` output buffers `y`, while
@ -242,7 +242,7 @@ static inline void bw_ppm_process(bw_ppm_coeffs *BW_RESTRICT coeffs, bw_ppm_stat
}
}
static inline void bw_ppm_process_multi(bw_ppm_coeffs *BW_RESTRICT coeffs, bw_ppm_state * const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples) {
static inline void bw_ppm_process_multi(bw_ppm_coeffs *BW_RESTRICT coeffs, bw_ppm_state *BW_RESTRICT const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples) {
bw_ppm_update_coeffs_ctrl(coeffs);
if (y != NULL)
for (size_t i = 0; i < n_samples; i++) {
@ -313,7 +313,7 @@ public:
private:
bw_ppm_coeffs coeffs;
bw_ppm_state states[N_CHANNELS];
bw_ppm_state *statesP[N_CHANNELS];
bw_ppm_state *BW_RESTRICT statesP[N_CHANNELS];
};
template<size_t N_CHANNELS>

View File

@ -42,8 +42,8 @@
* <li><code>bw_reverb_process()</code> and
* <code>bw_reverb_process_multi()</code> now use
* <code>size_t</code> to count samples and channels.</li>
* <li>Added more <code>const</code> specifiers to input
* arguments.</li>
* <li>Added more <code>const</code> and <code>BW_RESTRICT</code>
* specifiers to input arguments and implementation.</li>
* <li>Moved C++ code to C header.</li>
* <li>Added overladed C++ <code>process()</code> function taking
* C-style arrays as arguments.</li>
@ -107,7 +107,7 @@ static inline size_t bw_reverb_mem_req(const bw_reverb_coeffs *BW_RESTRICT coeff
*
* #### bw_reverb_mem_set()
* ```>>> */
static inline void bw_reverb_mem_set(const bw_reverb_coeffs *BW_RESTRICT coeffs, bw_reverb_state *BW_RESTRICT state, void *mem);
static inline void bw_reverb_mem_set(const bw_reverb_coeffs *BW_RESTRICT coeffs, bw_reverb_state *BW_RESTRICT state, void *BW_RESTRICT mem);
/*! <<<```
* Associates the contiguous memory block `mem` to the given `state`.
*
@ -154,7 +154,7 @@ static inline void bw_reverb_process(bw_reverb_coeffs *BW_RESTRICT coeffs, bw_re
*
* #### bw_reverb_process_multi()
* ```>>> */
static inline void bw_reverb_process_multi(bw_reverb_coeffs *BW_RESTRICT coeffs, bw_reverb_state * const *BW_RESTRICT state, const float * const *x_l, const float * const *x_r, float * const *y_l, float * const *y_r, size_t n_channels, size_t n_samples);
static inline void bw_reverb_process_multi(bw_reverb_coeffs *BW_RESTRICT coeffs, bw_reverb_state *BW_RESTRICT const *BW_RESTRICT state, const float * const *x_l, const float * const *x_r, float * const *y_l, float * const *y_r, size_t n_channels, size_t n_samples);
/*! <<<```
* Processes the first `n_samples` of the `n_channels` input buffers `x_l`
* (left) and `x_r` (right) and fills the first `n_samples` of the
@ -403,7 +403,7 @@ static inline size_t bw_reverb_mem_req(const bw_reverb_coeffs *BW_RESTRICT coeff
+ bw_delay_mem_req(&coeffs->delay_d4_coeffs);
}
static inline void bw_reverb_mem_set(const bw_reverb_coeffs *BW_RESTRICT coeffs, bw_reverb_state *BW_RESTRICT state, void *mem) {
static inline void bw_reverb_mem_set(const bw_reverb_coeffs *BW_RESTRICT coeffs, bw_reverb_state *BW_RESTRICT state, void *BW_RESTRICT mem) {
char *m = (char *)mem;
bw_delay_mem_set(&coeffs->predelay_coeffs, &state->predelay_state, m);
m += bw_delay_mem_req(&coeffs->predelay_coeffs);
@ -591,7 +591,7 @@ static inline void bw_reverb_process(bw_reverb_coeffs *BW_RESTRICT coeffs, bw_re
}
}
static inline void bw_reverb_process_multi(bw_reverb_coeffs *BW_RESTRICT coeffs, bw_reverb_state * const *BW_RESTRICT state, const float * const *x_l, const float * const *x_r, float * const *y_l, float * const *y_r, size_t n_channels, size_t n_samples) {
static inline void bw_reverb_process_multi(bw_reverb_coeffs *BW_RESTRICT coeffs, bw_reverb_state *BW_RESTRICT const *BW_RESTRICT state, const float * const *x_l, const float * const *x_r, float * const *y_l, float * const *y_r, size_t n_channels, size_t n_samples) {
bw_reverb_update_coeffs_ctrl(coeffs);
for (size_t i = 0; i < n_samples; i++) {
bw_reverb_update_coeffs_audio(coeffs);
@ -671,8 +671,8 @@ public:
private:
bw_reverb_coeffs coeffs;
bw_reverb_state states[N_CHANNELS];
bw_reverb_state *statesP[N_CHANNELS];
void *mem;
bw_reverb_state *BW_RESTRICT statesP[N_CHANNELS];
void *BW_RESTRICT mem;
};
template<size_t N_CHANNELS>

View File

@ -43,8 +43,8 @@
* <li><code>bw_satur_process()</code> and
* <code>bw_satur_process_multi()</code> now use
* <code>size_t</code> to count samples and channels.</li>
* <li>Added more <code>const</code> specifiers to input
* arguments.</li>
* <li>Added more <code>const</code> and <code>BW_RESTRICT</code>
* specifiers to input arguments and implementation.</li>
* <li>Moved C++ code to C header.</li>
* <li>Added overladed C++ <code>process()</code> function taking
* C-style arrays as arguments.</li>
@ -158,7 +158,7 @@ static inline void bw_satur_process(bw_satur_coeffs *BW_RESTRICT coeffs, bw_satu
*
* #### bw_satur_process_multi()
* ```>>> */
static inline void bw_satur_process_multi(bw_satur_coeffs *BW_RESTRICT coeffs, bw_satur_state * const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples);
static inline void bw_satur_process_multi(bw_satur_coeffs *BW_RESTRICT coeffs, bw_satur_state *BW_RESTRICT const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples);
/*! <<<```
* Processes the first `n_samples` of the `n_channels` input buffers `x` and
* fills the first `n_samples` of the `n_channels` output buffers `y`, while
@ -312,7 +312,7 @@ static inline void bw_satur_process(bw_satur_coeffs *BW_RESTRICT coeffs, bw_satu
}
}
static inline void bw_satur_process_multi(bw_satur_coeffs *BW_RESTRICT coeffs, bw_satur_state * const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples) {
static inline void bw_satur_process_multi(bw_satur_coeffs *BW_RESTRICT coeffs, bw_satur_state *BW_RESTRICT const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples) {
bw_satur_update_coeffs_ctrl(coeffs);
for (size_t i = 0; i < n_samples; i++) {
bw_satur_update_coeffs_audio(coeffs);
@ -377,7 +377,7 @@ public:
private:
bw_satur_coeffs coeffs;
bw_satur_state states[N_CHANNELS];
bw_satur_state *statesP[N_CHANNELS];
bw_satur_state *BW_RESTRICT statesP[N_CHANNELS];
};
template<size_t N_CHANNELS>

View File

@ -32,8 +32,8 @@
* <li><code>bw_slew_lim_process()</code> and
* <code>bw_slew_lim_process_multi()</code> now use
* <code>size_t</code> to count samples and channels.</li>
* <li>Added more <code>const</code> specifiers to input
* arguments.</li>
* <li>Added more <code>const</code> and <code>BW_RESTRICT</code>
* specifiers to input arguments and implementation.</li>
* <li>Moved C++ code to C header.</li>
* <li>Added overladed C++ <code>process()</code> function taking
* C-style arrays as arguments.</li>
@ -157,7 +157,7 @@ static inline void bw_slew_lim_process(bw_slew_lim_coeffs *BW_RESTRICT coeffs, b
*
* #### bw_slew_lim_process_multi()
* ```>>> */
static inline void bw_slew_lim_process_multi(bw_slew_lim_coeffs *BW_RESTRICT coeffs, bw_slew_lim_state * const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples);
static inline void bw_slew_lim_process_multi(bw_slew_lim_coeffs *BW_RESTRICT coeffs, bw_slew_lim_state *BW_RESTRICT const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples);
/*! <<<```
* Processes the first `n_samples` of the `n_channels` input buffers `x` and
* fills the first `n_samples` of the `n_channels` output buffers `y`, while
@ -327,7 +327,7 @@ static inline void bw_slew_lim_process(bw_slew_lim_coeffs *BW_RESTRICT coeffs, b
}
}
static inline void bw_slew_lim_process_multi(bw_slew_lim_coeffs *BW_RESTRICT coeffs, bw_slew_lim_state * const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples) {
static inline void bw_slew_lim_process_multi(bw_slew_lim_coeffs *BW_RESTRICT coeffs, bw_slew_lim_state *BW_RESTRICT const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples) {
bw_slew_lim_update_coeffs_ctrl(coeffs);
if (y != NULL) {
if (coeffs->max_rate_up != INFINITY) {
@ -448,7 +448,7 @@ public:
private:
bw_slew_lim_coeffs coeffs;
bw_slew_lim_state states[N_CHANNELS];
bw_slew_lim_state *statesP[N_CHANNELS];
bw_slew_lim_state *BW_RESTRICT statesP[N_CHANNELS];
};
template<size_t N_CHANNELS>

View File

@ -36,8 +36,8 @@
* <li><code>bw_sr_reduce_lim_process()</code> and
* <code>bw_sr_reduce_lim_process_multi()</code> now use
* <code>size_t</code> to count samples and channels.</li>
* <li>Added more <code>const</code> specifiers to input
* arguments.</li>
* <li>Added more <code>const</code> and <code>BW_RESTRICT</code>
* specifiers to input arguments and implementation.</li>
* <li>Moved C++ code to C header.</li>
* <li>Added overladed C++ <code>process()</code> function taking
* C-style arrays as arguments.</li>
@ -120,7 +120,7 @@ static inline void bw_sr_reduce_process(bw_sr_reduce_coeffs *BW_RESTRICT coeffs,
*
* #### bw_sr_reduce_process_multi()
* ```>>> */
static inline void bw_sr_reduce_process_multi(bw_sr_reduce_coeffs *BW_RESTRICT coeffs, bw_sr_reduce_state * const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples);
static inline void bw_sr_reduce_process_multi(bw_sr_reduce_coeffs *BW_RESTRICT coeffs, bw_sr_reduce_state *BW_RESTRICT const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples);
/*! <<<```
* Processes the first `n_samples` of the `n_channels` input buffers `x` and
* fills the first `n_samples` of the `n_channels` output buffers `y`, while
@ -186,7 +186,7 @@ static inline void bw_sr_reduce_process(bw_sr_reduce_coeffs *BW_RESTRICT coeffs,
y[i] = bw_sr_reduce_process1(coeffs, state, x[i]);
}
static inline void bw_sr_reduce_process_multi(bw_sr_reduce_coeffs *BW_RESTRICT coeffs, bw_sr_reduce_state * const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples) {
static inline void bw_sr_reduce_process_multi(bw_sr_reduce_coeffs *BW_RESTRICT coeffs, bw_sr_reduce_state *BW_RESTRICT const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples) {
for (size_t i = 0; i < n_channels; i++)
bw_sr_reduce_process(coeffs, state[i], x[i], y[i], n_samples);
}
@ -236,7 +236,7 @@ public:
private:
bw_sr_reduce_coeffs coeffs;
bw_sr_reduce_state states[N_CHANNELS];
bw_sr_reduce_state *statesP[N_CHANNELS];
bw_sr_reduce_state *BW_RESTRICT statesP[N_CHANNELS];
};
template<size_t N_CHANNELS>

View File

@ -32,8 +32,8 @@
* <li><code>bw_src_process()</code> and
* <code>bw_src_process_multi()</code> now use <code>size_t</code>
* to count samples and channels.</li>
* <li>Added more <code>const</code> specifiers to input
* arguments.</li>
* <li>Added more <code>const</code> and <code>BW_RESTRICT</code>
* specifiers to input arguments and implementation.</li>
* <li>Moved C++ code to C header and fixed C++ API.</li>
* <li>Added overladed C++ <code>process()</code> function taking
* C-style arrays as arguments.</li>
@ -102,7 +102,7 @@ static inline void bw_src_reset_state(const bw_src_coeffs *BW_RESTRICT coeffs, b
*
* #### bw_src_process()
* ```>>> */
static inline void bw_src_process(const bw_src_coeffs *BW_RESTRICT coeffs, bw_src_state *BW_RESTRICT state, const float *x, float *y, size_t *n_in_samples, size_t *n_out_samples);
static inline void bw_src_process(const bw_src_coeffs *BW_RESTRICT coeffs, bw_src_state *BW_RESTRICT state, const float *x, float *y, size_t *BW_RESTRICT n_in_samples, size_t *BW_RESTRICT n_out_samples);
/*! <<<```
* Processes at most the first `n_in_samples` of the input buffer `x` and
* fills the output buffer `y` with at most `n_out_samples` using `coeffs`,
@ -114,7 +114,7 @@ static inline void bw_src_process(const bw_src_coeffs *BW_RESTRICT coeffs, bw_sr
*
* #### bw_src_process_multi()
* ```>>> */
static inline void bw_src_process_multi(const bw_src_coeffs *BW_RESTRICT coeffs, bw_src_state * const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t *n_in_samples, size_t *n_out_samples);
static inline void bw_src_process_multi(const bw_src_coeffs *BW_RESTRICT coeffs, bw_src_state *BW_RESTRICT const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t *BW_RESTRICT n_in_samples, size_t *BW_RESTRICT n_out_samples);
/*! <<<```
* Processes at most the first `n_in_samples[i]` of each input buffer `x[i]`
* and fills the corresponding output buffer `y[i]` with at most
@ -200,7 +200,7 @@ static inline void bw_src_reset_state(const bw_src_coeffs *BW_RESTRICT coeffs, b
state->xz3 = x_0;
}
static inline void bw_src_process(const bw_src_coeffs *BW_RESTRICT coeffs, bw_src_state *BW_RESTRICT state, const float *x, float *y, size_t *n_in_samples, size_t *n_out_samples) {
static inline void bw_src_process(const bw_src_coeffs *BW_RESTRICT coeffs, bw_src_state *BW_RESTRICT state, const float *x, float *y, size_t *BW_RESTRICT n_in_samples, size_t *BW_RESTRICT n_out_samples) {
size_t i = 0;
size_t j = 0;
if (coeffs->k < 0) {
@ -267,7 +267,7 @@ static inline void bw_src_process(const bw_src_coeffs *BW_RESTRICT coeffs, bw_sr
*n_out_samples = j;
}
static inline void bw_src_process_multi(const bw_src_coeffs *BW_RESTRICT coeffs, bw_src_state * const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t *n_in_samples, size_t *n_out_samples) {
static inline void bw_src_process_multi(const bw_src_coeffs *BW_RESTRICT coeffs, bw_src_state *BW_RESTRICT const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t *BW_RESTRICT n_in_samples, size_t *BW_RESTRICT n_out_samples) {
for (size_t i = 0; i < n_channels; i++)
bw_src_process(coeffs, state[i], x[i], y[i], n_in_samples + i, n_out_samples + i);
}
@ -293,8 +293,8 @@ public:
void process(
const float * const *x,
float * const *y,
size_t *nInSamples,
size_t *nOutSamples);
size_t *BW_RESTRICT nInSamples,
size_t *BW_RESTRICT nOutSamples);
void process(
std::array<const float *, N_CHANNELS> x,
std::array<float *, N_CHANNELS> y,
@ -313,7 +313,7 @@ public:
private:
bw_src_coeffs coeffs;
bw_src_state states[N_CHANNELS];
bw_src_state *statesP[N_CHANNELS];
bw_src_state *BW_RESTRICT statesP[N_CHANNELS];
};
template<size_t N_CHANNELS>
@ -333,8 +333,8 @@ template<size_t N_CHANNELS>
inline void SRC<N_CHANNELS>::process(
const float * const *x,
float * const *y,
size_t *nInSamples,
size_t *nOutSamples) {
size_t *BW_RESTRICT nInSamples,
size_t *BW_RESTRICT nOutSamples) {
bw_src_process_multi(coeffs, statesP, x, y, N_CHANNELS, nInSamples, nOutSamples);
}

View File

@ -38,8 +38,8 @@
* <li><code>bw_src_int_lim_process()</code> and
* <code>bw_src_int_lim_process_multi()</code> now use
* <code>size_t</code> to count samples and channels.</li>
* <li>Added more <code>const</code> specifiers to input
* arguments.</li>
* <li>Added more <code>const</code> and <code>BW_RESTRICT</code>
* specifiers to input arguments and implementation.</li>
* <li>Moved C++ code to C header.</li>
* <li>Added overladed C++ <code>process()</code> function taking
* C-style arrays as arguments.</li>
@ -122,7 +122,7 @@ static inline size_t bw_src_int_process(const bw_src_int_coeffs *BW_RESTRICT coe
*
* #### bw_src_int_process_multi()
* ```>>> */
static inline void bw_src_int_process_multi(const bw_src_int_coeffs *BW_RESTRICT coeffs, bw_src_int_state * const *BW_RESTRICT state, const float * const *x, float * const *y, size_t *n, size_t n_channels, size_t n_in_samples);
static inline void bw_src_int_process_multi(const bw_src_int_coeffs *BW_RESTRICT coeffs, bw_src_int_state *BW_RESTRICT const *BW_RESTRICT state, const float * const *x, float * const *y, size_t *BW_RESTRICT n, size_t n_channels, size_t n_in_samples);
/*! <<<```
* Processes the first `n_in_samples` of the `n_channels` input buffers `x`
* and fills the `n_channels` output buffers `y` using `coeffs`, while using
@ -240,7 +240,7 @@ static inline size_t bw_src_int_process(const bw_src_int_coeffs *BW_RESTRICT coe
return n;
}
static inline void bw_src_int_process_multi(const bw_src_int_coeffs *BW_RESTRICT coeffs, bw_src_int_state * const *BW_RESTRICT state, const float * const *x, float * const *y, size_t *n, size_t n_channels, size_t n_in_samples) {
static inline void bw_src_int_process_multi(const bw_src_int_coeffs *BW_RESTRICT coeffs, bw_src_int_state *BW_RESTRICT const *BW_RESTRICT state, const float * const *x, float * const *y, size_t *BW_RESTRICT n, size_t n_channels, size_t n_in_samples) {
if (n != NULL)
for (size_t i = 0; i < n_channels; i++)
n[i] = bw_src_int_process(coeffs, state[i], x[i], y[i], n_in_samples);
@ -288,7 +288,7 @@ public:
private:
bw_src_int_coeffs coeffs;
bw_src_int_state states[N_CHANNELS];
bw_src_int_state *statesP[N_CHANNELS];
bw_src_int_state *BW_RESTRICT statesP[N_CHANNELS];
};
template<size_t N_CHANNELS>

View File

@ -33,8 +33,8 @@
* <li><code>bw_svf_process()</code> and
* <code>bw_svf_process_multi()</code> now use <code>size_t</code>
* to count samples and channels.</li>
* <li>Added more <code>const</code> specifiers to input
* arguments.</li>
* <li>Added more <code>const</code> and <code>BW_RESTRICT</code>
* specifiers to input arguments and implementation.</li>
* <li>Moved C++ code to C header.</li>
* <li>Added overladed C++ <code>process()</code> function taking
* C-style arrays as arguments.</li>
@ -164,7 +164,7 @@ static inline void bw_svf_process(bw_svf_coeffs *BW_RESTRICT coeffs, bw_svf_stat
*
* #### bw_svf_process_multi()
* ```>>> */
static inline void bw_svf_process_multi(bw_svf_coeffs *BW_RESTRICT coeffs, bw_svf_state * const *BW_RESTRICT state, const float * const *x, float * const *y_lp, float * const *y_bp, float * const *y_hp, size_t n_channels, size_t n_samples);
static inline void bw_svf_process_multi(bw_svf_coeffs *BW_RESTRICT coeffs, bw_svf_state *BW_RESTRICT const *BW_RESTRICT state, const float * const *x, float * const *y_lp, float * const *y_bp, float * const *y_hp, size_t n_channels, size_t n_samples);
/*! <<<```
* Processes the first `n_samples` of the `n_channels` input buffers `x` and
* fills the first `n_samples` of the `n_channels` output buffers `y_lp`
@ -404,7 +404,7 @@ static inline void bw_svf_process(bw_svf_coeffs *BW_RESTRICT coeffs, bw_svf_stat
}
}
static inline void bw_svf_process_multi(bw_svf_coeffs *BW_RESTRICT coeffs, bw_svf_state * const *BW_RESTRICT state, const float * const *x, float * const *y_lp, float * const *y_bp, float * const *y_hp, size_t n_channels, size_t n_samples) {
static inline void bw_svf_process_multi(bw_svf_coeffs *BW_RESTRICT coeffs, bw_svf_state *BW_RESTRICT const *BW_RESTRICT state, const float * const *x, float * const *y_lp, float * const *y_bp, float * const *y_hp, size_t n_channels, size_t n_samples) {
if (y_lp != NULL) {
if (y_bp != NULL) {
if (y_hp != NULL) {
@ -573,7 +573,7 @@ public:
private:
bw_svf_coeffs coeffs;
bw_svf_state states[N_CHANNELS];
bw_svf_state *statesP[N_CHANNELS];
bw_svf_state *BW_RESTRICT statesP[N_CHANNELS];
};
template<size_t N_CHANNELS>

View File

@ -34,8 +34,8 @@
* <li><code>bw_trem_process()</code> and
* <code>bw_trem_process_multi()</code> now use <code>size_t</code>
* to count samples and channels.</li>
* <li>Added more <code>const</code> specifiers to input
* arguments.</li>
* <li>Added more <code>const</code> and <code>BW_RESTRICT</code>
* specifiers to input arguments and implementation.</li>
* <li>Moved C++ code to C header.</li>
* <li>Added overladed C++ <code>process()</code> function taking
* C-style arrays as arguments.</li>
@ -137,7 +137,7 @@ static inline void bw_trem_process(bw_trem_coeffs *BW_RESTRICT coeffs, bw_trem_s
*
* #### bw_trem_process_multi()
* ```>>> */
static inline void bw_trem_process_multi(bw_trem_coeffs *BW_RESTRICT coeffs, bw_trem_state * const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples);
static inline void bw_trem_process_multi(bw_trem_coeffs *BW_RESTRICT coeffs, bw_trem_state *BW_RESTRICT const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples);
/*! <<<```
* Processes the first `n_samples` of the `n_channels` input buffers `x` and
* fills the first `n_samples` of the `n_channels` output buffers `y`, while
@ -233,7 +233,7 @@ static inline void bw_trem_process(bw_trem_coeffs *BW_RESTRICT coeffs, bw_trem_s
}
}
static inline void bw_trem_process_multi(bw_trem_coeffs *BW_RESTRICT coeffs, bw_trem_state * const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples) {
static inline void bw_trem_process_multi(bw_trem_coeffs *BW_RESTRICT coeffs, bw_trem_state *BW_RESTRICT const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples) {
bw_trem_update_coeffs_ctrl(coeffs);
for (size_t i = 0; i < n_samples; i++) {
bw_trem_update_coeffs_audio(coeffs);
@ -292,8 +292,8 @@ public:
private:
bw_trem_coeffs coeffs;
bw_trem_state states[N_CHANNELS];
bw_trem_state *statesP[N_CHANNELS];
bw_trem_state states[N_CHANNELS];
bw_trem_state *BW_RESTRICT statesP[N_CHANNELS];
};
template<size_t N_CHANNELS>

View File

@ -31,7 +31,8 @@
* <ul>
* <li>Now using <code>size_t</code> instead of
* <code>BW_SIZE_T</code>.</li>
* <li>Added <code>const</code> where needed to callback types in
* <li>Added <code>const</code> and <code>BW_RESTRICT</code> where
* needed to callback types in
* <code>bw_voice_alloc_opts</code> and to
* <code>bw_voice_alloc()</code>.</li>
* <li>Removed usage of reserved identifiers.</li>
@ -103,7 +104,7 @@ typedef struct {
*
* #### bw_voice_alloc()
* ```>>> */
void bw_voice_alloc(const bw_voice_alloc_opts *BW_RESTRICT opts, bw_note_queue *BW_RESTRICT queue, void * const *BW_RESTRICT voices, size_t n_voices);
void bw_voice_alloc(const bw_voice_alloc_opts *BW_RESTRICT opts, bw_note_queue *BW_RESTRICT queue, void *BW_RESTRICT const *BW_RESTRICT voices, size_t n_voices);
/*! <<<```
* It performs voice allocation according to `opts` and using the events in
* `queue`.
@ -125,7 +126,7 @@ void bw_voice_alloc(const bw_voice_alloc_opts *BW_RESTRICT opts, bw_note_queue *
extern "C" {
#endif
void bw_voice_alloc(const bw_voice_alloc_opts *BW_RESTRICT opts, bw_note_queue *BW_RESTRICT queue, void * const *BW_RESTRICT voices, size_t n_voices) {
void bw_voice_alloc(const bw_voice_alloc_opts *BW_RESTRICT opts, bw_note_queue *BW_RESTRICT queue, void *BW_RESTRICT const *BW_RESTRICT voices, size_t n_voices) {
BW_ASSERT(opts != NULL);
BW_ASSERT(opts->priority == bw_voice_alloc_priority_low || opts->priority == bw_voice_alloc_priority_high);
BW_ASSERT(n_voices == 0 || opts->note_on != NULL);

View File

@ -34,8 +34,8 @@
* <li><code>bw_wah_process()</code> and
* <code>bw_wah_process_multi()</code> now use <code>size_t</code>
* to count samples and channels.</li>
* <li>Added more <code>const</code> specifiers to input
* arguments.</li>
* <li>Added more <code>const</code> and <code>BW_RESTRICT</code>
* specifiers to input arguments and implementation.</li>
* <li>Moved C++ code to C header.</li>
* <li>Added overladed C++ <code>process()</code> function taking
* C-style arrays as arguments.</li>
@ -151,7 +151,7 @@ static inline void bw_wah_process(bw_wah_coeffs *BW_RESTRICT coeffs, bw_wah_stat
*
* #### bw_wah_process_multi()
* ```>>> */
static inline void bw_wah_process_multi(bw_wah_coeffs *BW_RESTRICT coeffs, bw_wah_state * const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples);
static inline void bw_wah_process_multi(bw_wah_coeffs *BW_RESTRICT coeffs, bw_wah_state *BW_RESTRICT const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples);
/*! <<<```
* Processes the first `n_samples` of the `n_channels` input buffers `x` and
* fills the first `n_samples` of the `n_channels` output buffers `y`, while
@ -233,7 +233,7 @@ static inline void bw_wah_process(bw_wah_coeffs *BW_RESTRICT coeffs, bw_wah_stat
}
}
static inline void bw_wah_process_multi(bw_wah_coeffs *BW_RESTRICT coeffs, bw_wah_state * const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples) {
static inline void bw_wah_process_multi(bw_wah_coeffs *BW_RESTRICT coeffs, bw_wah_state *BW_RESTRICT const *BW_RESTRICT state, const float * const *x, float * const *y, size_t n_channels, size_t n_samples) {
bw_wah_update_coeffs_ctrl(coeffs);
for (size_t i = 0; i < n_samples; i++) {
bw_wah_update_coeffs_audio(coeffs);
@ -288,7 +288,7 @@ public:
private:
bw_wah_coeffs coeffs;
bw_wah_state states[N_CHANNELS];
bw_wah_state *statesP[N_CHANNELS];
bw_wah_state *BW_RESTRICT statesP[N_CHANNELS];
};
template<size_t N_CHANNELS>