diff --git a/include/bw_ap1.h b/include/bw_ap1.h
index 002a890..26ebbca 100644
--- a/include/bw_ap1.h
+++ b/include/bw_ap1.h
@@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 1.0.1 }}}
+ * version {{{ 1.1.0 }}}
* requires {{{ bw_common bw_lp1 bw_math bw_one_pole }}}
* description {{{
* First-order allpass filter (90° shift at cutoff, approaching 180° shift
@@ -28,9 +28,10 @@
* }}}
* changelog {{{
*
- * - Version 1.0.1:
+ *
- Version 1.1.0:
*
- * - Now using
BW_NULL
.
+ * - Now using
BW_NULL
and
+ * BW_CXX_NO_ARRAY
.
*
*
* - Version 1.0.0:
@@ -606,7 +607,9 @@ static inline char bw_ap1_state_is_valid(
#ifdef __cplusplus
}
-#include
+#ifndef BW_CXX_NO_ARRAY
+# include
+#endif
namespace Brickworks {
@@ -627,27 +630,33 @@ public:
float x0 = 0.f,
float * BW_RESTRICT y0 = nullptr);
+#ifndef BW_CXX_NO_ARRAY
void reset(
float x0,
std::array * BW_RESTRICT y0);
+#endif
void reset(
const float * x0,
float * y0 = nullptr);
+#ifndef BW_CXX_NO_ARRAY
void reset(
std::array x0,
std::array * BW_RESTRICT y0 = nullptr);
+#endif
void process(
const float * const * x,
float * const * y,
size_t nSamples);
+#ifndef BW_CXX_NO_ARRAY
void process(
std::array x,
std::array y,
size_t nSamples);
+#endif
void setCutoff(
float value);
@@ -699,12 +708,14 @@ inline void AP1::reset(
bw_ap1_reset_state(&coeffs, states + i, x0);
}
+#ifndef BW_CXX_NO_ARRAY
template
inline void AP1::reset(
float x0,
std::array * BW_RESTRICT y0) {
reset(x0, y0 != nullptr ? y0->data() : nullptr);
}
+#endif
template
inline void AP1::reset(
@@ -714,12 +725,14 @@ inline void AP1::reset(
bw_ap1_reset_state_multi(&coeffs, statesP, x0, y0, N_CHANNELS);
}
+#ifndef BW_CXX_NO_ARRAY
template
inline void AP1::reset(
std::array x0,
std::array * BW_RESTRICT y0) {
reset(x0.data(), y0 != nullptr ? y0->data() : nullptr);
}
+#endif
template
inline void AP1::process(
@@ -729,6 +742,7 @@ inline void AP1::process(
bw_ap1_process_multi(&coeffs, statesP, x, y, N_CHANNELS, nSamples);
}
+#ifndef BW_CXX_NO_ARRAY
template
inline void AP1::process(
std::array x,
@@ -736,6 +750,7 @@ inline void AP1::process(
size_t nSamples) {
process(x.data(), y.data(), nSamples);
}
+#endif
template
inline void AP1::setCutoff(
diff --git a/include/bw_ap2.h b/include/bw_ap2.h
index 2b257ad..a8efd2c 100644
--- a/include/bw_ap2.h
+++ b/include/bw_ap2.h
@@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 1.0.1 }}}
+ * version {{{ 1.1.0 }}}
* requires {{{ bw_common bw_math bw_one_pole bw_svf }}}
* description {{{
* Second-order allpass filter (180° shift at cutoff, approaching 360° shift
@@ -28,9 +28,10 @@
* }}}
* changelog {{{
*
- * - Version 1.0.1:
+ *
- Version 1.1.0:
*
- * - Now using
BW_NULL
.
+ * - Now using
BW_NULL
and
+ * BW_CXX_NO_ARRAY
.
*
*
* - Version 1.0.0:
@@ -634,7 +635,9 @@ static inline char bw_ap2_state_is_valid(
#ifdef __cplusplus
}
-#include
+#ifndef BW_CXX_NO_ARRAY
+# include
+#endif
namespace Brickworks {
@@ -655,27 +658,33 @@ public:
float x0 = 0.f,
float * BW_RESTRICT y0 = nullptr);
+#ifndef BW_CXX_NO_ARRAY
void reset(
float x0,
std::array * BW_RESTRICT y0);
+#endif
void reset(
const float * x0,
float * y0 = nullptr);
+#ifndef BW_CXX_NO_ARRAY
void reset(
std::array x0,
std::array * BW_RESTRICT y0 = nullptr);
+#endif
void process(
const float * const * x,
float * const * y,
size_t nSamples);
+#ifndef BW_CXX_NO_ARRAY
void process(
std::array x,
std::array y,
size_t nSamples);
+#endif
void setCutoff(
float value);
@@ -730,12 +739,14 @@ inline void AP2::reset(
bw_ap2_reset_state(&coeffs, states + i, x0);
}
+#ifndef BW_CXX_NO_ARRAY
template
inline void AP2::reset(
float x0,
std::array * BW_RESTRICT y0) {
reset(x0, y0 != nullptr ? y0->data() : nullptr);
}
+#endif
template
inline void AP2::reset(
@@ -745,12 +756,14 @@ inline void AP2::reset(
bw_ap2_reset_state_multi(&coeffs, statesP, x0, y0, N_CHANNELS);
}
+#ifndef BW_CXX_NO_ARRAY
template
inline void AP2::reset(
std::array x0,
std::array * BW_RESTRICT y0) {
reset(x0.data(), y0 != nullptr ? y0->data() : nullptr);
}
+#endif
template
inline void AP2::process(
@@ -760,6 +773,7 @@ inline void AP2::process(
bw_ap2_process_multi(&coeffs, statesP, x, y, N_CHANNELS, nSamples);
}
+#ifndef BW_CXX_NO_ARRAY
template
inline void AP2::process(
std::array x,
@@ -767,6 +781,7 @@ inline void AP2::process(
size_t nSamples) {
process(x.data(), y.data(), nSamples);
}
+#endif
template
inline void AP2::setCutoff(
diff --git a/include/bw_balance.h b/include/bw_balance.h
index 8f8d801..6bfb8fe 100644
--- a/include/bw_balance.h
+++ b/include/bw_balance.h
@@ -20,16 +20,17 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 1.0.1 }}}
+ * version {{{ 1.1.0 }}}
* requires {{{ bw_common bw_gain bw_math bw_one_pole }}}
* description {{{
* Stereo balance.
* }}}
* changelog {{{
*
- * - Version 1.0.1:
+ *
- Version 1.1.0:
*
- * - Now using
BW_NULL
.
+ * - Now using
BW_NULL
and
+ * BW_CXX_NO_ARRAY
.
*
*
* - Version 1.0.0:
@@ -452,7 +453,9 @@ static inline char bw_balance_coeffs_is_valid(
#ifdef __cplusplus
}
-#include
+#ifndef BW_CXX_NO_ARRAY
+# include
+#endif
namespace Brickworks {
@@ -478,12 +481,14 @@ public:
float * const * yR,
size_t nSamples);
+#ifndef BW_CXX_NO_ARRAY
void process(
std::array xL,
std::array xR,
std::array yL,
std::array yR,
size_t nSamples);
+#endif
void setBalance(
float value);
@@ -527,6 +532,7 @@ inline void Balance::process(
bw_balance_process_multi(&coeffs, xL, xR, yL, yR, N_CHANNELS, nSamples);
}
+#ifndef BW_CXX_NO_ARRAY
template
inline void Balance::process(
std::array xL,
@@ -536,6 +542,7 @@ inline void Balance::process(
size_t nSamples) {
process(xL.data(), xR.data(), yL.data(), yR.data(), nSamples);
}
+#endif
template
inline void Balance::setBalance(
diff --git a/include/bw_bd_reduce.h b/include/bw_bd_reduce.h
index 95b0fef..d73072a 100644
--- a/include/bw_bd_reduce.h
+++ b/include/bw_bd_reduce.h
@@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 1.0.1 }}}
+ * version {{{ 1.1.0 }}}
* requires {{{ bw_common bw_math }}}
* description {{{
* Bit depth reducer.
@@ -31,9 +31,10 @@
* }}}
* changelog {{{
*
- * - Version 1.0.1:
+ *
- Version 1.1.0:
*
- * - Now using
BW_NULL
.
+ * - Now using
BW_NULL
and
+ * BW_CXX_NO_ARRAY
.
*
*
* - Version 1.0.0:
@@ -418,7 +419,9 @@ static inline char bw_bd_reduce_coeffs_is_valid(
#ifdef __cplusplus
}
-#include
+#ifndef BW_CXX_NO_ARRAY
+# include
+#endif
namespace Brickworks {
@@ -442,10 +445,12 @@ public:
float * const * y,
size_t nSamples);
+#ifndef BW_CXX_NO_ARRAY
void process(
std::array x,
std::array y,
size_t nSamples);
+#endif
void setBitDepth(
char value);
@@ -487,6 +492,7 @@ inline void BDReduce::process(
bw_bd_reduce_process_multi(&coeffs, x, y, N_CHANNELS, nSamples);
}
+#ifndef BW_CXX_NO_ARRAY
template
inline void BDReduce::process(
std::array x,
@@ -494,6 +500,7 @@ inline void BDReduce::process(
size_t nSamples) {
process(x.data(), y.data(), nSamples);
}
+#endif
template
inline void BDReduce::setBitDepth(
diff --git a/include/bw_buf.h b/include/bw_buf.h
index c8d5c10..7b66467 100644
--- a/include/bw_buf.h
+++ b/include/bw_buf.h
@@ -20,16 +20,17 @@
/*!
* module_type {{{ utility }}}
- * version {{{ 1.0.1 }}}
+ * version {{{ 1.1.0 }}}
* requires {{{ bw_common }}}
* description {{{
* Common operations on buffers.
* }}}
* changelog {{{
*
- * - Version 1.0.1:
+ *
- Version 1.1.0:
*
- * - Now using
BW_NULL
.
+ * - Now using
BW_NULL
and
+ * BW_CXX_NO_ARRAY
.
*
*
* - Version 1.0.0:
@@ -446,7 +447,9 @@ static inline void bw_buf_mul_multi(
#ifdef __cplusplus
}
-#include
+#ifndef BW_CXX_NO_ARRAY
+# include
+#endif
namespace Brickworks {
@@ -461,11 +464,13 @@ inline void bufFill(
float * BW_RESTRICT const * BW_RESTRICT dest,
size_t nSamples);
+#ifndef BW_CXX_NO_ARRAY
template
inline void bufFill(
float k,
std::array dest,
size_t nSamples);
+#endif
/*! <<<```
*
* ##### Brickworks::bufNeg
@@ -476,11 +481,13 @@ inline void bufNeg(
float * const * dest,
size_t nSamples);
+#ifndef BW_CXX_NO_ARRAY
template
inline void bufNeg(
const std::array src,
const std::array dest,
size_t nSamples);
+#endif
/*! <<<```
*
* ##### Brickworks::bufAdd
@@ -492,12 +499,14 @@ inline void bufAdd(
float * const * dest,
size_t nSamples);
+#ifndef BW_CXX_NO_ARRAY
template
inline void bufAdd(
const std::array src,
float k,
const std::array dest,
size_t nSamples);
+#endif
/*! <<<```
*
* ##### Brickworks::bufScale
@@ -509,12 +518,14 @@ inline void bufScale(
float * const * dest,
size_t nSamples);
+#ifndef BW_CXX_NO_ARRAY
template
inline void bufScale(
const std::array src,
float k,
const std::array dest,
size_t nSamples);
+#endif
/*! <<<```
*
* ##### Brickworks::bufMix
@@ -526,12 +537,14 @@ inline void bufMix(
float * const * dest,
size_t nSamples);
+#ifndef BW_CXX_NO_ARRAY
template
inline void bufMix(
const std::array src1,
const std::array src2,
const std::array dest,
size_t nSamples);
+#endif
/*! <<<```
*
* ##### Brickworks::bufMul
@@ -543,12 +556,14 @@ inline void bufMul(
float * const * dest,
size_t nSamples);
+#ifndef BW_CXX_NO_ARRAY
template
inline void bufMul(
const std::array src1,
const std::array src2,
const std::array dest,
size_t nSamples);
+#endif
/*! <<<```
* }}} */
@@ -565,6 +580,7 @@ inline void bufFill(
bw_buf_fill_multi(k, dest, N_CHANNELS, nSamples);
}
+#ifndef BW_CXX_NO_ARRAY
template
inline void bufFill(
float k,
@@ -572,6 +588,7 @@ inline void bufFill(
size_t nSamples) {
bufFill(k, dest.data(), nSamples);
}
+#endif
template
inline void bufNeg(
@@ -581,6 +598,7 @@ inline void bufNeg(
bw_buf_neg_multi(src, dest, N_CHANNELS, nSamples);
}
+#ifndef BW_CXX_NO_ARRAY
template
inline void bufNeg(
const std::array src,
@@ -588,6 +606,7 @@ inline void bufNeg(
size_t nSamples) {
bufNeg(src.data(), dest.data(), nSamples);
}
+#endif
template
inline void bufAdd(
@@ -598,6 +617,7 @@ inline void bufAdd(
bw_buf_add_multi(src, k, dest, N_CHANNELS, nSamples);
}
+#ifndef BW_CXX_NO_ARRAY
template
inline void bufAdd(
const std::array src,
@@ -606,6 +626,7 @@ inline void bufAdd(
size_t nSamples) {
bufAdd(src.data(), k, dest.data(), nSamples);
}
+#endif
template
inline void bufScale(
@@ -616,6 +637,7 @@ inline void bufScale(
bw_buf_scale_multi(src, k, dest, N_CHANNELS, nSamples);
}
+#ifndef BW_CXX_NO_ARRAY
template
inline void bufScale(
const std::array src,
@@ -624,6 +646,7 @@ inline void bufScale(
size_t nSamples) {
bufScale(src.data(), k, dest.data(), nSamples);
}
+#endif
template
inline void bufMix(
@@ -634,6 +657,7 @@ inline void bufMix(
bw_buf_mix_multi(src1, src2, dest, N_CHANNELS, nSamples);
}
+#ifndef BW_CXX_NO_ARRAY
template
inline void bufMix(
const std::array src1,
@@ -642,6 +666,7 @@ inline void bufMix(
size_t nSamples) {
bufMix(src1.data(), src2.data(), dest.data(), nSamples);
}
+#endif
template
inline void bufMul(
@@ -652,6 +677,7 @@ inline void bufMul(
bw_buf_mul_multi(src1, src2, dest, N_CHANNELS, nSamples);
}
+#ifndef BW_CXX_NO_ARRAY
template
inline void bufMul(
const std::array src1,
@@ -660,6 +686,7 @@ inline void bufMul(
size_t nSamples) {
bufMul(src1.data(), src2.data(), dest.data(), nSamples);
}
+#endif
}
#endif
diff --git a/include/bw_cab.h b/include/bw_cab.h
index ac39f42..dd41aa9 100644
--- a/include/bw_cab.h
+++ b/include/bw_cab.h
@@ -632,7 +632,9 @@ static inline char bw_cab_state_is_valid(
#ifdef __cplusplus
}
-#include
+#ifndef BW_CXX_NO_ARRAY
+# include
+#endif
namespace Brickworks {
@@ -653,27 +655,33 @@ public:
float x0 = 0.f,
float * BW_RESTRICT y0 = nullptr);
+#ifndef BW_CXX_NO_ARRAY
void reset(
float x0,
std::array * BW_RESTRICT y0);
+#endif
void reset(
const float * x0,
float * y0 = nullptr);
+#ifndef BW_CXX_NO_ARRAY
void reset(
std::array x0,
std::array * BW_RESTRICT y0 = nullptr);
+#endif
void process(
const float * const * x,
float * const * y,
size_t nSamples);
+#ifndef BW_CXX_NO_ARRAY
void process(
std::array x,
std::array y,
size_t nSamples);
+#endif
void setCutoffLow(
float value);
@@ -725,12 +733,14 @@ inline void Cab::reset(
bw_cab_reset_state(&coeffs, states + i, x0);
}
+#ifndef BW_CXX_NO_ARRAY
template
inline void Cab::reset(
float x0,
std::array * BW_RESTRICT y0) {
reset(x0, y0 != nullptr ? y0->data() : nullptr);
}
+#endif
template
inline void Cab::reset(
@@ -740,12 +750,14 @@ inline void Cab::reset(
bw_cab_reset_state_multi(&coeffs, statesP, x0, y0, N_CHANNELS);
}
+#ifndef BW_CXX_NO_ARRAY
template
inline void Cab::reset(
std::array x0,
std::array * BW_RESTRICT y0) {
reset(x0.data(), y0 != nullptr ? y0->data() : nullptr);
}
+#endif
template
inline void Cab::process(
@@ -755,6 +767,7 @@ inline void Cab::process(
bw_cab_process_multi(&coeffs, statesP, x, y, N_CHANNELS, nSamples);
}
+#ifndef BW_CXX_NO_ARRAY
template
inline void Cab::process(
std::array x,
@@ -762,6 +775,7 @@ inline void Cab::process(
size_t nSamples) {
process(x.data(), y.data(), nSamples);
}
+#endif
template
inline void Cab::setCutoffLow(
diff --git a/include/bw_chorus.h b/include/bw_chorus.h
index dc229ec..fcfa14d 100644
--- a/include/bw_chorus.h
+++ b/include/bw_chorus.h
@@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 1.0.1 }}}
+ * version {{{ 1.1.0 }}}
* requires {{{
* bw_buf bw_comb bw_common bw_delay bw_gain bw_math bw_one_pole bw_osc_sin
* bw_phase_gen
@@ -36,9 +36,10 @@
* }}}
* changelog {{{
*
- * - Version 1.0.1:
+ *
- Version 1.1.0:
*
- * - Now using
BW_NULL
.
+ * - Now using
BW_NULL
and
+ * BW_CXX_NO_ARRAY
.
*
*
* - Version 1.0.0:
@@ -805,7 +806,9 @@ static inline char bw_chorus_state_is_valid(
#ifdef __cplusplus
}
-#include
+#ifndef BW_CXX_NO_ARRAY
+# include
+#endif
namespace Brickworks {
@@ -829,27 +832,33 @@ public:
float x0 = 0.f,
float * BW_RESTRICT y0 = nullptr);
+#ifndef BW_CXX_NO_ARRAY
void reset(
float x0,
std::array * BW_RESTRICT y0);
+#endif
void reset(
const float * x0,
float * y0 = nullptr);
+#ifndef BW_CXX_NO_ARRAY
void reset(
std::array x0,
std::array * BW_RESTRICT y0 = nullptr);
+#endif
void process(
const float * const * x,
float * const * y,
size_t nSamples);
+#ifndef BW_CXX_NO_ARRAY
void process(
std::array x,
std::array y,
size_t nSamples);
+#endif
void setRate(
float value);
@@ -926,12 +935,14 @@ inline void Chorus::reset(
bw_chorus_reset_state(&coeffs, states + i, x0);
}
+#ifndef BW_CXX_NO_ARRAY
template
inline void Chorus::reset(
float x0,
std::array * BW_RESTRICT y0) {
reset(x0, y0 != nullptr ? y0->data() : nullptr);
}
+#endif
template
inline void Chorus::reset(
@@ -941,12 +952,14 @@ inline void Chorus::reset(
bw_chorus_reset_state_multi(&coeffs, statesP, x0, y0, N_CHANNELS);
}
+#ifndef BW_CXX_NO_ARRAY
template
inline void Chorus::reset(
std::array x0,
std::array * BW_RESTRICT y0) {
reset(x0.data(), y0 != nullptr ? y0->data() : nullptr);
}
+#endif
template
inline void Chorus::process(
@@ -956,6 +969,7 @@ inline void Chorus::process(
bw_chorus_process_multi(&coeffs, statesP, x, y, N_CHANNELS, nSamples);
}
+#ifndef BW_CXX_NO_ARRAY
template
inline void Chorus::process(
std::array x,
@@ -963,6 +977,7 @@ inline void Chorus::process(
size_t nSamples) {
process(x.data(), y.data(), nSamples);
}
+#endif
template
inline void Chorus::setRate(
diff --git a/include/bw_clip.h b/include/bw_clip.h
index 11b6958..deec8a9 100644
--- a/include/bw_clip.h
+++ b/include/bw_clip.h
@@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 1.0.1 }}}
+ * version {{{ 1.1.0 }}}
* requires {{{ bw_common bw_math bw_one_pole }}}
* description {{{
* Antialiased hard clipper with parametric bias and gain
@@ -45,9 +45,10 @@
* }}}
* changelog {{{
*
- * - Version 1.0.1:
+ *
- Version 1.1.0:
*
- * - Now using
BW_NULL
.
+ * - Now using
BW_NULL
and
+ * BW_CXX_NO_ARRAY
.
*
*
* - Version 1.0.0:
@@ -718,7 +719,9 @@ static inline char bw_clip_state_is_valid(
#ifdef __cplusplus
}
-#include
+#ifndef BW_CXX_NO_ARRAY
+# include
+#endif
namespace Brickworks {
@@ -739,27 +742,33 @@ public:
float x0 = 0.f,
float * BW_RESTRICT y0 = nullptr);
+#ifndef BW_CXX_NO_ARRAY
void reset(
float x0,
std::array * BW_RESTRICT y0);
+#endif
void reset(
const float * x0,
float * y0 = nullptr);
+#ifndef BW_CXX_NO_ARRAY
void reset(
std::array x0,
std::array * BW_RESTRICT y0 = nullptr);
+#endif
void process(
const float * const * x,
float * const * y,
size_t nSamples);
+#ifndef BW_CXX_NO_ARRAY
void process(
std::array x,
std::array y,
size_t nSamples);
+#endif
void setBias(
float value);
@@ -811,12 +820,14 @@ inline void Clip::reset(
bw_clip_reset_state(&coeffs, states + i, x0);
}
+#ifndef BW_CXX_NO_ARRAY
template
inline void Clip::reset(
float x0,
std::array * BW_RESTRICT y0) {
reset(x0, y0 != nullptr ? y0->data() : nullptr);
}
+#endif
template
inline void Clip::reset(
@@ -826,12 +837,14 @@ inline void Clip::reset(
bw_clip_reset_state_multi(&coeffs, statesP, x0, y0, N_CHANNELS);
}
+#ifndef BW_CXX_NO_ARRAY
template
inline void Clip::reset(
std::array x0,
std::array * BW_RESTRICT y0) {
reset(x0.data(), y0 != nullptr ? y0->data() : nullptr);
}
+#endif
template
inline void Clip::process(
@@ -841,6 +854,7 @@ inline void Clip::process(
bw_clip_process_multi(&coeffs, statesP, x, y, N_CHANNELS, nSamples);
}
+#ifndef BW_CXX_NO_ARRAY
template
inline void Clip::process(
std::array x,
@@ -848,6 +862,7 @@ inline void Clip::process(
size_t nSamples) {
process(x.data(), y.data(), nSamples);
}
+#endif
template
inline void Clip::setBias(
diff --git a/include/bw_comb.h b/include/bw_comb.h
index 6602b1f..9beed5b 100644
--- a/include/bw_comb.h
+++ b/include/bw_comb.h
@@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 1.0.1 }}}
+ * version {{{ 1.1.0 }}}
* requires {{{
* bw_buf bw_common bw_delay bw_gain bw_math bw_one_pole
* }}}
@@ -37,9 +37,10 @@
* }}}
* changelog {{{
*
- * - Version 1.0.1:
+ *
- Version 1.1.0:
*
- * - Now using
BW_NULL
.
+ * - Now using
BW_NULL
and
+ * BW_CXX_NO_ARRAY
.
*
*
* - Version 1.0.0:
@@ -872,7 +873,9 @@ static inline char bw_comb_state_is_valid(
#ifdef __cplusplus
}
-#include
+#ifndef BW_CXX_NO_ARRAY
+# include
+#endif
namespace Brickworks {
@@ -896,27 +899,33 @@ public:
float x0 = 0.f,
float * BW_RESTRICT y0 = nullptr);
+#ifndef BW_CXX_NO_ARRAY
void reset(
float x0,
std::array * BW_RESTRICT y0);
+#endif
void reset(
const float * x0,
float * y0 = nullptr);
+#ifndef BW_CXX_NO_ARRAY
void reset(
std::array x0,
std::array * BW_RESTRICT y0 = nullptr);
+#endif
void process(
const float * const * x,
float * const * y,
size_t nSamples);
+#ifndef BW_CXX_NO_ARRAY
void process(
std::array x,
std::array y,
size_t nSamples);
+#endif
void setDelayFF(
float value);
@@ -990,12 +999,14 @@ inline void Comb::reset(
bw_comb_reset_state(&coeffs, states + i, x0);
}
+#ifndef BW_CXX_NO_ARRAY
template
inline void Comb::reset(
float x0,
std::array * BW_RESTRICT y0) {
reset(x0, y0 != nullptr ? y0->data() : nullptr);
}
+#endif
template
inline void Comb::reset(
@@ -1005,12 +1016,14 @@ inline void Comb::reset(
bw_comb_reset_state_multi(&coeffs, statesP, x0, y0, N_CHANNELS);
}
+#ifndef BW_CXX_NO_ARRAY
template
inline void Comb::reset(
std::array x0,
std::array * BW_RESTRICT y0) {
reset(x0.data(), y0 != nullptr ? y0->data() : nullptr);
}
+#endif
template
inline void Comb::process(
@@ -1020,6 +1033,7 @@ inline void Comb::process(
bw_comb_process_multi(&coeffs, statesP, x, y, N_CHANNELS, nSamples);
}
+#ifndef BW_CXX_NO_ARRAY
template
inline void Comb::process(
std::array x,
@@ -1027,6 +1041,7 @@ inline void Comb::process(
size_t nSamples) {
process(x.data(), y.data(), nSamples);
}
+#endif
template
inline void Comb::setDelayFF(
diff --git a/include/bw_common.h b/include/bw_common.h
index 838bf76..a84b4be 100644
--- a/include/bw_common.h
+++ b/include/bw_common.h
@@ -31,6 +31,7 @@
*
* - Added
BW_NULL
and relaxed NULL
* definition requirement in C++.
+ * - Added
BW_CXX_NO_ARRAY
.
* - Fixed sign-related warning in
bw_hash_sdbm()
.
*
*
@@ -92,6 +93,12 @@
/*** Public API ***/
+#ifdef __cplusplus
+# if __cplusplus < 201103L
+# error Detected C++ compiler that doesn't support C++11
+# endif
+#endif
+
/*! api {{{
*
* #### Basic definitions
@@ -150,6 +157,14 @@
# error INFINITY not defined
#endif
/*! ...
+ *
+ * #### BW_CXX_NO_ARRAY
+ *
+ * C++ APIs of Brickworks modules typically include overloaded methods that
+ * use `std::array` arguments, and thus require the `` header file.
+ *
+ * If this is not wanted, defining `BW_CXX_NO_ARRAY` suppresses such methods
+ * and the inclusion of said header file.
*
* #### BW_RESTRICT
*
diff --git a/include/bw_comp.h b/include/bw_comp.h
index 2b36eea..43b1c1f 100644
--- a/include/bw_comp.h
+++ b/include/bw_comp.h
@@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 1.0.1 }}}
+ * version {{{ 1.1.0 }}}
* requires {{{
* bw_common bw_env_follow bw_gain bw_math bw_one_pole
* }}}
@@ -29,9 +29,10 @@
* }}}
* changelog {{{
*
- * - Version 1.0.1:
+ *
- Version 1.1.0:
*
- * - Now using
BW_NULL
.
+ * - Now using
BW_NULL
and
+ * BW_CXX_NO_ARRAY
.
*
*
* - Version 1.0.0:
@@ -801,7 +802,9 @@ static inline char bw_comp_state_is_valid(
#ifdef __cplusplus
}
-#include
+#ifndef BW_CXX_NO_ARRAY
+# include
+#endif
namespace Brickworks {
@@ -823,20 +826,24 @@ public:
float xSc0 = 0.f,
float * BW_RESTRICT y0 = nullptr);
+#ifndef BW_CXX_NO_ARRAY
void reset(
float x0,
float xSc0,
std::array * BW_RESTRICT y0);
+#endif
void reset(
const float * x0,
const float * xSc0,
float * y0 = nullptr);
+#ifndef BW_CXX_NO_ARRAY
void reset(
std::array x0,
std::array xSc0,
std::array * BW_RESTRICT y0 = nullptr);
+#endif
void process(
const float * const * x,
@@ -844,11 +851,13 @@ public:
float * const * y,
size_t nSamples);
+#ifndef BW_CXX_NO_ARRAY
void process(
std::array x,
std::array xSc,
std::array y,
size_t nSamples);
+#endif
void setTreshLin(
float value);
@@ -913,6 +922,7 @@ inline void Comp::reset(
bw_comp_reset_state(&coeffs, states + i, x0, xSc0);
}
+#ifndef BW_CXX_NO_ARRAY
template
inline void Comp::reset(
float x0,
@@ -920,6 +930,7 @@ inline void Comp::reset(
std::array * BW_RESTRICT y0) {
reset(x0, xSc0, y0 != nullptr ? y0->data() : nullptr);
}
+#endif
template
inline void Comp::reset(
@@ -930,6 +941,7 @@ inline void Comp::reset(
bw_comp_reset_state_multi(&coeffs, statesP, x0, xSc0, y0, N_CHANNELS);
}
+#ifndef BW_CXX_NO_ARRAY
template
inline void Comp::reset(
std::array x0,
@@ -937,6 +949,7 @@ inline void Comp::reset(
std::array * BW_RESTRICT y0) {
reset(x0.data(), xSc0.data(), y0 != nullptr ? y0->data() : nullptr);
}
+#endif
template
inline void Comp::process(
@@ -947,6 +960,7 @@ inline void Comp::process(
bw_comp_process_multi(&coeffs, statesP, x, xSc, y, N_CHANNELS, nSamples);
}
+#ifndef BW_CXX_NO_ARRAY
template
inline void Comp::process(
std::array x,
@@ -955,6 +969,7 @@ inline void Comp::process(
size_t nSamples) {
process(x.data(), xSc.data(), y.data(), nSamples);
}
+#endif
template
inline void Comp::setTreshLin(
diff --git a/include/bw_delay.h b/include/bw_delay.h
index 1e6a20c..1713c09 100644
--- a/include/bw_delay.h
+++ b/include/bw_delay.h
@@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 1.0.1 }}}
+ * version {{{ 1.1.0 }}}
* requires {{{ bw_buf bw_common bw_math }}}
* description {{{
* Interpolated delay line, not smoothed.
@@ -31,9 +31,10 @@
* }}}
* changelog {{{
*
- * - Version