diff --git a/include/bw_ap1.h b/include/bw_ap1.h
index b1eddf1..97fa898 100644
--- a/include/bw_ap1.h
+++ b/include/bw_ap1.h
@@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 1.1.1 }}}
+ * version {{{ 1.2.0 }}}
* requires {{{ bw_common bw_lp1 bw_math bw_one_pole }}}
* description {{{
* First-order allpass filter (90° shift at cutoff, approaching 180° shift
@@ -28,8 +28,11 @@
* }}}
* changelog {{{
*
- * - Version 1.1.1:
+ *
- Version 1.2.0:
*
+ * - Added support for
BW_INCLUDE_WITH_QUOTES
,
+ * BW_NO_CXX
, and
+ * BW_CXX_NO_EXTERN_C
.
* - Added debugging checks from
bw_ap1_process()
to
* bw_ap1_process_multi()
.
* - Added debugging checks in
bw_ap1_process_multi()
to
@@ -95,9 +98,13 @@
#ifndef BW_AP1_H
#define BW_AP1_H
-#include
+#ifdef BW_INCLUDE_WITH_QUOTES
+# include "bw_common.h"
+#else
+# include
+#endif
-#ifdef __cplusplus
+#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
extern "C" {
#endif
@@ -285,7 +292,7 @@ static inline char bw_ap1_state_is_valid(
* than or equal to that of `bw_ap1_state`.
* }}} */
-#ifdef __cplusplus
+#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
}
#endif
@@ -294,9 +301,13 @@ static inline char bw_ap1_state_is_valid(
/* WARNING: This part of the file is not part of the public API. Its content may
* change at any time in future versions. Please, do not use it directly. */
-#include
+#ifdef BW_INCLUDE_WITH_QUOTES
+# include "bw_lp1.h"
+#else
+# include
+#endif
-#ifdef __cplusplus
+#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
extern "C" {
#endif
@@ -631,13 +642,16 @@ static inline char bw_ap1_state_is_valid(
return bw_lp1_state_is_valid(coeffs ? &coeffs->lp1_coeffs : BW_NULL, &state->lp1_state);
}
-#ifdef __cplusplus
+#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
}
-
-#ifndef BW_CXX_NO_ARRAY
-# include
#endif
+#if !defined(BW_NO_CXX) && defined(__cplusplus)
+
+# ifndef BW_CXX_NO_ARRAY
+# include
+# endif
+
namespace Brickworks {
/*** Public C++ API ***/
@@ -657,33 +671,33 @@ public:
float x0 = 0.f,
float * BW_RESTRICT y0 = nullptr);
-#ifndef BW_CXX_NO_ARRAY
+# ifndef BW_CXX_NO_ARRAY
void reset(
float x0,
std::array * BW_RESTRICT y0);
-#endif
+# endif
void reset(
const float * x0,
float * y0 = nullptr);
-#ifndef BW_CXX_NO_ARRAY
+# ifndef BW_CXX_NO_ARRAY
void reset(
std::array x0,
std::array * BW_RESTRICT y0 = nullptr);
-#endif
+# endif
void process(
const float * const * x,
float * const * y,
size_t nSamples);
-#ifndef BW_CXX_NO_ARRAY
+# ifndef BW_CXX_NO_ARRAY
void process(
std::array x,
std::array y,
size_t nSamples);
-#endif
+# endif
void setCutoff(
float value);
@@ -735,14 +749,14 @@ inline void AP1::reset(
bw_ap1_reset_state(&coeffs, states + i, x0);
}
-#ifndef BW_CXX_NO_ARRAY
+# 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
+# endif
template
inline void AP1::reset(
@@ -752,14 +766,14 @@ inline void AP1::reset(
bw_ap1_reset_state_multi(&coeffs, statesP, x0, y0, N_CHANNELS);
}
-#ifndef BW_CXX_NO_ARRAY
+# 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
+# endif
template
inline void AP1::process(
@@ -769,7 +783,7 @@ inline void AP1::process(
bw_ap1_process_multi(&coeffs, statesP, x, y, N_CHANNELS, nSamples);
}
-#ifndef BW_CXX_NO_ARRAY
+# ifndef BW_CXX_NO_ARRAY
template
inline void AP1::process(
std::array x,
@@ -777,7 +791,7 @@ inline void AP1::process(
size_t nSamples) {
process(x.data(), y.data(), nSamples);
}
-#endif
+# endif
template
inline void AP1::setCutoff(
diff --git a/include/bw_ap2.h b/include/bw_ap2.h
index 4e20af5..4c99c5c 100644
--- a/include/bw_ap2.h
+++ b/include/bw_ap2.h
@@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 1.1.1 }}}
+ * version {{{ 1.2.0 }}}
* requires {{{ bw_common bw_math bw_one_pole bw_svf }}}
* description {{{
* Second-order allpass filter (180° shift at cutoff, approaching 360° shift
@@ -28,8 +28,11 @@
* }}}
* changelog {{{
*
- * - Version 1.1.1:
+ *
- Version 1.2.0:
*
+ * - Added support for
BW_INCLUDE_WITH_QUOTES
,
+ * BW_NO_CXX
, and
+ * BW_CXX_NO_EXTERN_C
.
* - Added debugging checks from
bw_ap2_process()
to
* bw_ap2_process_multi()
.
* - Added debugging checks in
bw_ap2_process_multi()
to
@@ -94,9 +97,13 @@
#ifndef BW_AP2_H
#define BW_AP2_H
-#include
+#ifdef BW_INCLUDE_WITH_QUOTES
+# include "bw_common.h"
+#else
+# include
+#endif
-#ifdef __cplusplus
+#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
extern "C" {
#endif
@@ -294,7 +301,7 @@ static inline char bw_ap2_state_is_valid(
* than or equal to that of `bw_ap2_state`.
* }}} */
-#ifdef __cplusplus
+#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
}
#endif
@@ -303,9 +310,13 @@ static inline char bw_ap2_state_is_valid(
/* WARNING: This part of the file is not part of the public API. Its content may
* change at any time in future versions. Please, do not use it directly. */
-#include
+#ifdef BW_INCLUDE_WITH_QUOTES
+# include "bw_svf.h"
+#else
+# include
+#endif
-#ifdef __cplusplus
+#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
extern "C" {
#endif
@@ -659,13 +670,16 @@ static inline char bw_ap2_state_is_valid(
return bw_svf_state_is_valid(coeffs ? &coeffs->svf_coeffs : BW_NULL, &state->svf_state);
}
-#ifdef __cplusplus
+#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
}
-
-#ifndef BW_CXX_NO_ARRAY
-# include
#endif
+#if !defined(BW_NO_CXX) && defined(__cplusplus)
+
+# ifndef BW_CXX_NO_ARRAY
+# include
+# endif
+
namespace Brickworks {
/*** Public C++ API ***/
@@ -685,33 +699,33 @@ public:
float x0 = 0.f,
float * BW_RESTRICT y0 = nullptr);
-#ifndef BW_CXX_NO_ARRAY
+# ifndef BW_CXX_NO_ARRAY
void reset(
float x0,
std::array * BW_RESTRICT y0);
-#endif
+# endif
void reset(
const float * x0,
float * y0 = nullptr);
-#ifndef BW_CXX_NO_ARRAY
+# ifndef BW_CXX_NO_ARRAY
void reset(
std::array x0,
std::array * BW_RESTRICT y0 = nullptr);
-#endif
+# endif
void process(
const float * const * x,
float * const * y,
size_t nSamples);
-#ifndef BW_CXX_NO_ARRAY
+# ifndef BW_CXX_NO_ARRAY
void process(
std::array x,
std::array y,
size_t nSamples);
-#endif
+# endif
void setCutoff(
float value);
@@ -766,14 +780,14 @@ inline void AP2::reset(
bw_ap2_reset_state(&coeffs, states + i, x0);
}
-#ifndef BW_CXX_NO_ARRAY
+# 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
+# endif
template
inline void AP2::reset(
@@ -783,14 +797,14 @@ inline void AP2::reset(
bw_ap2_reset_state_multi(&coeffs, statesP, x0, y0, N_CHANNELS);
}
-#ifndef BW_CXX_NO_ARRAY
+# 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
+# endif
template
inline void AP2::process(
@@ -800,7 +814,7 @@ inline void AP2::process(
bw_ap2_process_multi(&coeffs, statesP, x, y, N_CHANNELS, nSamples);
}
-#ifndef BW_CXX_NO_ARRAY
+# ifndef BW_CXX_NO_ARRAY
template
inline void AP2::process(
std::array x,
@@ -808,7 +822,7 @@ inline void AP2::process(
size_t nSamples) {
process(x.data(), y.data(), nSamples);
}
-#endif
+# endif
template
inline void AP2::setCutoff(
diff --git a/include/bw_balance.h b/include/bw_balance.h
index 440dc3a..d95614b 100644
--- a/include/bw_balance.h
+++ b/include/bw_balance.h
@@ -20,15 +20,18 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 1.1.1 }}}
+ * version {{{ 1.2.0 }}}
* requires {{{ bw_common bw_gain bw_math bw_one_pole }}}
* description {{{
* Stereo balance.
* }}}
* changelog {{{
*
- * - Version 1.1.1:
+ *
- Version 1.2.0:
*
+ * - Added support for
BW_INCLUDE_WITH_QUOTES
,
+ * BW_NO_CXX
, and
+ * BW_CXX_NO_EXTERN_C
.
* - Added debugging checks from
bw_balance_process()
to
* bw_balance_process_multi()
.
* - Added debugging checks in
@@ -84,9 +87,13 @@
#ifndef BW_BALANCE_H
#define BW_BALANCE_H
-#include
+#ifdef BW_INCLUDE_WITH_QUOTES
+# include "bw_common.h"
+#else
+# include
+#endif
-#ifdef __cplusplus
+#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
extern "C" {
#endif
@@ -203,7 +210,7 @@ static inline char bw_balance_coeffs_is_valid(
* than or equal to that of `bw_balance_coeffs`.
* }}} */
-#ifdef __cplusplus
+#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
}
#endif
@@ -212,10 +219,15 @@ static inline char bw_balance_coeffs_is_valid(
/* WARNING: This part of the file is not part of the public API. Its content may
* change at any time in future versions. Please, do not use it directly. */
-#include
-#include
+#ifdef BW_INCLUDE_WITH_QUOTES
+# include "bw_math.h"
+# include "bw_gain.h"
+#else
+# include
+# include
+#endif
-#ifdef __cplusplus
+#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
extern "C" {
#endif
@@ -482,13 +494,16 @@ static inline char bw_balance_coeffs_is_valid(
return bw_gain_coeffs_is_valid(&coeffs->l_coeffs) && bw_gain_coeffs_is_valid(&coeffs->r_coeffs);
}
-#ifdef __cplusplus
+#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
}
-
-#ifndef BW_CXX_NO_ARRAY
-# include
#endif
+#if !defined(BW_NO_CXX) && defined(__cplusplus)
+
+# ifndef BW_CXX_NO_ARRAY
+# include
+# endif
+
namespace Brickworks {
/*** Public C++ API ***/
@@ -513,14 +528,14 @@ public:
float * const * yR,
size_t nSamples);
-#ifndef BW_CXX_NO_ARRAY
+# ifndef BW_CXX_NO_ARRAY
void process(
std::array xL,
std::array xR,
std::array yL,
std::array yR,
size_t nSamples);
-#endif
+# endif
void setBalance(
float value);
@@ -564,7 +579,7 @@ inline void Balance::process(
bw_balance_process_multi(&coeffs, xL, xR, yL, yR, N_CHANNELS, nSamples);
}
-#ifndef BW_CXX_NO_ARRAY
+# ifndef BW_CXX_NO_ARRAY
template
inline void Balance::process(
std::array xL,
@@ -574,7 +589,7 @@ inline void Balance::process(
size_t nSamples) {
process(xL.data(), xR.data(), yL.data(), yR.data(), nSamples);
}
-#endif
+# endif
template
inline void Balance::setBalance(
diff --git a/include/bw_bd_reduce.h b/include/bw_bd_reduce.h
index 6160c42..12263d8 100644
--- a/include/bw_bd_reduce.h
+++ b/include/bw_bd_reduce.h
@@ -34,6 +34,9 @@
*
- Version 1.2.0:
*
* - Added gate parameter.
+ * - Added support for
BW_INCLUDE_WITH_QUOTES
,
+ * BW_NO_CXX
, and
+ * BW_CXX_NO_EXTERN_C
.
* - Added debugging checks from
bw_bd_reduce_process()
* to bw_bd_reduce_process_multi()
.
* - Added debugging checks in
@@ -93,9 +96,13 @@
#ifndef BW_BD_REDUCE_H
#define BW_BD_REDUCE_H
-#include
+#ifdef BW_INCLUDE_WITH_QUOTES
+# include "bw_common.h"
+#else
+# include
+#endif
-#ifdef __cplusplus
+#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
extern "C" {
#endif
@@ -236,7 +243,7 @@ static inline char bw_bd_reduce_coeffs_is_valid(
* than or equal to that of `bw_bd_reduce_coeffs`.
* }}} */
-#ifdef __cplusplus
+#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
}
#endif
@@ -245,9 +252,13 @@ static inline char bw_bd_reduce_coeffs_is_valid(
/* WARNING: This part of the file is not part of the public API. Its content may
* change at any time in future versions. Please, do not use it directly. */
-#include
+#ifdef BW_INCLUDE_WITH_QUOTES
+# include "bw_math.h"
+#else
+# include
+#endif
-#ifdef __cplusplus
+#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
extern "C" {
#endif
@@ -527,13 +538,16 @@ static inline char bw_bd_reduce_coeffs_is_valid(
return 1;
}
-#ifdef __cplusplus
+#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
}
-
-#ifndef BW_CXX_NO_ARRAY
-# include
#endif
+#if !defined(BW_NO_CXX) && defined(__cplusplus)
+
+# ifndef BW_CXX_NO_ARRAY
+# include
+# endif
+
namespace Brickworks {
/*** Public C++ API ***/
@@ -556,12 +570,12 @@ public:
float * const * y,
size_t nSamples);
-#ifndef BW_CXX_NO_ARRAY
+# ifndef BW_CXX_NO_ARRAY
void process(
std::array x,
std::array y,
size_t nSamples);
-#endif
+# endif
void setBitDepth(
char value);
@@ -612,7 +626,7 @@ inline void BDReduce::process(
bw_bd_reduce_process_multi(&coeffs, x, y, N_CHANNELS, nSamples);
}
-#ifndef BW_CXX_NO_ARRAY
+# ifndef BW_CXX_NO_ARRAY
template
inline void BDReduce::process(
std::array x,
@@ -620,7 +634,7 @@ inline void BDReduce::process(
size_t nSamples) {
process(x.data(), y.data(), nSamples);
}
-#endif
+# endif
template
inline void BDReduce::setBitDepth(
diff --git a/include/bw_buf.h b/include/bw_buf.h
index 77e85ed..409126c 100644
--- a/include/bw_buf.h
+++ b/include/bw_buf.h
@@ -31,6 +31,9 @@
*
* - Added
bw_buf_copy()
and
* bw_buf_copy_multi()
.
+ * - Added support for
BW_INCLUDE_WITH_QUOTES
,
+ * BW_NO_CXX
, and
+ * BW_CXX_NO_EXTERN_C
.
* - Added debugging check in
*
bw_buf_{neg,add,scale,mix,mul}_multi()
to ensure
* that buffers used for both input and output appear at the same
@@ -90,9 +93,13 @@
#ifndef BW_BUF_H
#define BW_BUF_H
-#include
+#ifdef BW_INCLUDE_WITH_QUOTES
+# include "bw_common.h"
+#else
+# include
+#endif
-#ifdef __cplusplus
+#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
extern "C" {
#endif
@@ -258,7 +265,7 @@ static inline void bw_buf_mul_multi(
* `n_channels` buffers `dest`.
* }}} */
-#ifdef __cplusplus
+#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
}
#endif
@@ -267,7 +274,7 @@ static inline void bw_buf_mul_multi(
/* WARNING: This part of the file is not part of the public API. Its content may
* change at any time in future versions. Please, do not use it directly. */
-#ifdef __cplusplus
+#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
extern "C" {
#endif
@@ -527,13 +534,16 @@ static inline void bw_buf_mul_multi(
bw_buf_mul(src1[i], src2[i], dest[i], n_elems);
}
-#ifdef __cplusplus
+#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
}
-
-#ifndef BW_CXX_NO_ARRAY
-# include
#endif
+#if !defined(BW_NO_CXX) && defined(__cplusplus)
+
+# ifndef BW_CXX_NO_ARRAY
+# include
+# endif
+
namespace Brickworks {
/*** Public C++ API ***/
@@ -547,13 +557,13 @@ inline void bufFill(
float * BW_RESTRICT const * BW_RESTRICT dest,
size_t nSamples);
-#ifndef BW_CXX_NO_ARRAY
+# ifndef BW_CXX_NO_ARRAY
template
inline void bufFill(
float k,
std::array dest,
size_t nSamples);
-#endif
+# endif
/*! <<<```
*
* ##### Brickworks::bufCopy
@@ -564,13 +574,13 @@ inline void bufCopy(
float * const * dest,
size_t nSamples);
-#ifndef BW_CXX_NO_ARRAY
+# ifndef BW_CXX_NO_ARRAY
template
inline void bufCopy(
const std::array src,
const std::array dest,
size_t nSamples);
-#endif
+# endif
/*! <<<```
*
* ##### Brickworks::bufNeg
@@ -581,13 +591,13 @@ inline void bufNeg(
float * const * dest,
size_t nSamples);
-#ifndef BW_CXX_NO_ARRAY
+# ifndef BW_CXX_NO_ARRAY
template
inline void bufNeg(
const std::array src,
const std::array dest,
size_t nSamples);
-#endif
+# endif
/*! <<<```
*
* ##### Brickworks::bufAdd
@@ -599,14 +609,14 @@ inline void bufAdd(
float * const * dest,
size_t nSamples);
-#ifndef BW_CXX_NO_ARRAY
+# ifndef BW_CXX_NO_ARRAY
template
inline void bufAdd(
const std::array src,
float k,
const std::array dest,
size_t nSamples);
-#endif
+# endif
/*! <<<```
*
* ##### Brickworks::bufScale
@@ -618,14 +628,14 @@ inline void bufScale(
float * const * dest,
size_t nSamples);
-#ifndef BW_CXX_NO_ARRAY
+# ifndef BW_CXX_NO_ARRAY
template
inline void bufScale(
const std::array src,
float k,
const std::array dest,
size_t nSamples);
-#endif
+# endif
/*! <<<```
*
* ##### Brickworks::bufMix
@@ -637,14 +647,14 @@ inline void bufMix(
float * const * dest,
size_t nSamples);
-#ifndef BW_CXX_NO_ARRAY
+# 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
+# endif
/*! <<<```
*
* ##### Brickworks::bufMul
@@ -656,14 +666,14 @@ inline void bufMul(
float * const * dest,
size_t nSamples);
-#ifndef BW_CXX_NO_ARRAY
+# 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
+# endif
/*! <<<```
* }}} */
@@ -680,7 +690,7 @@ inline void bufFill(
bw_buf_fill_multi(k, dest, N_CHANNELS, nSamples);
}
-#ifndef BW_CXX_NO_ARRAY
+# ifndef BW_CXX_NO_ARRAY
template
inline void bufFill(
float k,
@@ -688,7 +698,7 @@ inline void bufFill(
size_t nSamples) {
bufFill(k, dest.data(), nSamples);
}
-#endif
+# endif
template
inline void bufCopy(
@@ -698,7 +708,7 @@ inline void bufCopy(
bw_buf_copy_multi(src, dest, N_CHANNELS, nSamples);
}
-#ifndef BW_CXX_NO_ARRAY
+# ifndef BW_CXX_NO_ARRAY
template
inline void bufCopy(
const std::array src,
@@ -706,7 +716,7 @@ inline void bufCopy(
size_t nSamples) {
bufCopy(src.data(), dest.data(), nSamples);
}
-#endif
+# endif
template
inline void bufNeg(
@@ -716,7 +726,7 @@ inline void bufNeg(
bw_buf_neg_multi(src, dest, N_CHANNELS, nSamples);
}
-#ifndef BW_CXX_NO_ARRAY
+# ifndef BW_CXX_NO_ARRAY
template
inline void bufNeg(
const std::array src,
@@ -724,7 +734,7 @@ inline void bufNeg(
size_t nSamples) {
bufNeg(src.data(), dest.data(), nSamples);
}
-#endif
+# endif
template
inline void bufAdd(
@@ -735,7 +745,7 @@ inline void bufAdd(
bw_buf_add_multi(src, k, dest, N_CHANNELS, nSamples);
}
-#ifndef BW_CXX_NO_ARRAY
+# ifndef BW_CXX_NO_ARRAY
template
inline void bufAdd(
const std::array src,
@@ -744,7 +754,7 @@ inline void bufAdd(
size_t nSamples) {
bufAdd(src.data(), k, dest.data(), nSamples);
}
-#endif
+# endif
template
inline void bufScale(
@@ -755,7 +765,7 @@ inline void bufScale(
bw_buf_scale_multi(src, k, dest, N_CHANNELS, nSamples);
}
-#ifndef BW_CXX_NO_ARRAY
+# ifndef BW_CXX_NO_ARRAY
template
inline void bufScale(
const std::array src,
@@ -764,7 +774,7 @@ inline void bufScale(
size_t nSamples) {
bufScale(src.data(), k, dest.data(), nSamples);
}
-#endif
+# endif
template
inline void bufMix(
@@ -775,7 +785,7 @@ inline void bufMix(
bw_buf_mix_multi(src1, src2, dest, N_CHANNELS, nSamples);
}
-#ifndef BW_CXX_NO_ARRAY
+# ifndef BW_CXX_NO_ARRAY
template
inline void bufMix(
const std::array src1,
@@ -784,7 +794,7 @@ inline void bufMix(
size_t nSamples) {
bufMix(src1.data(), src2.data(), dest.data(), nSamples);
}
-#endif
+# endif
template
inline void bufMul(
@@ -795,7 +805,7 @@ inline void bufMul(
bw_buf_mul_multi(src1, src2, dest, N_CHANNELS, nSamples);
}
-#ifndef BW_CXX_NO_ARRAY
+# ifndef BW_CXX_NO_ARRAY
template
inline void bufMul(
const std::array src1,
@@ -804,7 +814,7 @@ inline void bufMul(
size_t nSamples) {
bufMul(src1.data(), src2.data(), dest.data(), nSamples);
}
-#endif
+# endif
}
#endif
diff --git a/include/bw_cab.h b/include/bw_cab.h
index 9eb95a5..ae0ec01 100644
--- a/include/bw_cab.h
+++ b/include/bw_cab.h
@@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 1.0.1 }}}
+ * version {{{ 1.1.0 }}}
* requires {{{ bw_common bw_gain bw_math bw_one_pole bw_svf }}}
* description {{{
* Cab simulator effect.
@@ -30,8 +30,11 @@
* }}}
* changelog {{{
*
- * - Version 1.0.1:
+ *
- Version 1.1.0:
*
+ * - Added support for
BW_INCLUDE_WITH_QUOTES
,
+ * BW_NO_CXX
, and
+ * BW_CXX_NO_EXTERN_C
.
* - Added debugging checks from
bw_cab_process()
to
* bw_cab_process_multi()
.
* - Added debugging checks in
bw_cab_process_multi()
to
@@ -51,9 +54,13 @@
#ifndef BW_CAB_H
#define BW_CAB_H
-#include
+#ifdef BW_INCLUDE_WITH_QUOTES
+# include "bw_common.h"
+#else
+# include
+#endif
-#ifdef __cplusplus
+#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
extern "C" {
#endif
@@ -238,7 +245,7 @@ static inline char bw_cab_state_is_valid(
* than or equal to that of `bw_cab_state`.
* }}} */
-#ifdef __cplusplus
+#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
}
#endif
@@ -247,10 +254,15 @@ static inline char bw_cab_state_is_valid(
/* WARNING: This part of the file is not part of the public API. Its content may
* change at any time in future versions. Please, do not use it directly. */
-#include
-#include
+#ifdef BW_INCLUDE_WITH_QUOTES
+# include "bw_svf.h"
+# include "bw_gain.h"
+#else
+# include
+# include
+#endif
-#ifdef __cplusplus
+#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
extern "C" {
#endif
@@ -656,13 +668,16 @@ static inline char bw_cab_state_is_valid(
&& bw_svf_state_is_valid(coeffs ? &coeffs->bph_coeffs : BW_NULL, &state->bph_state);
}
-#ifdef __cplusplus
+#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
}
-
-#ifndef BW_CXX_NO_ARRAY
-# include
#endif
+#if !defined(BW_NO_CXX) && defined(__cplusplus)
+
+# ifndef BW_CXX_NO_ARRAY
+# include
+# endif
+
namespace Brickworks {
/*** Public C++ API ***/
@@ -682,33 +697,33 @@ public:
float x0 = 0.f,
float * BW_RESTRICT y0 = nullptr);
-#ifndef BW_CXX_NO_ARRAY
+# ifndef BW_CXX_NO_ARRAY
void reset(
float x0,
std::array * BW_RESTRICT y0);
-#endif
+# endif
void reset(
const float * x0,
float * y0 = nullptr);
-#ifndef BW_CXX_NO_ARRAY
+# ifndef BW_CXX_NO_ARRAY
void reset(
std::array x0,
std::array * BW_RESTRICT y0 = nullptr);
-#endif
+# endif
void process(
const float * const * x,
float * const * y,
size_t nSamples);
-#ifndef BW_CXX_NO_ARRAY
+# ifndef BW_CXX_NO_ARRAY
void process(
std::array x,
std::array y,
size_t nSamples);
-#endif
+# endif
void setCutoffLow(
float value);
@@ -760,14 +775,14 @@ inline void Cab::reset(
bw_cab_reset_state(&coeffs, states + i, x0);
}
-#ifndef BW_CXX_NO_ARRAY
+# 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
+# endif
template
inline void Cab::reset(
@@ -777,14 +792,14 @@ inline void Cab::reset(
bw_cab_reset_state_multi(&coeffs, statesP, x0, y0, N_CHANNELS);
}
-#ifndef BW_CXX_NO_ARRAY
+# 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
+# endif
template
inline void Cab::process(
@@ -794,7 +809,7 @@ inline void Cab::process(
bw_cab_process_multi(&coeffs, statesP, x, y, N_CHANNELS, nSamples);
}
-#ifndef BW_CXX_NO_ARRAY
+# ifndef BW_CXX_NO_ARRAY
template
inline void Cab::process(
std::array x,
@@ -802,7 +817,7 @@ inline void Cab::process(
size_t nSamples) {
process(x.data(), y.data(), nSamples);
}
-#endif
+# endif
template
inline void Cab::setCutoffLow(
diff --git a/include/bw_chorus.h b/include/bw_chorus.h
index 73aab76..cde7e50 100644
--- a/include/bw_chorus.h
+++ b/include/bw_chorus.h
@@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 1.1.1 }}}
+ * version {{{ 1.2.0 }}}
* requires {{{
* bw_buf bw_comb bw_common bw_delay bw_gain bw_math bw_one_pole bw_osc_sin
* bw_phase_gen
@@ -36,8 +36,11 @@
* }}}
* changelog {{{
*
- * - Version 1.1.1:
+ *
- Version 1.2.0:
*
+ * - Added support for
BW_INCLUDE_WITH_QUOTES
,
+ * BW_NO_CXX
, and
+ * BW_CXX_NO_EXTERN_C
.
* - Added debugging checks from
bw_chorus_process()
to
* bw_chorus_process_multi()
.
* - Added debugging checks in
bw_chorus_process_multi()
@@ -101,9 +104,13 @@
#ifndef BW_CHORUS_H
#define BW_CHORUS_H
-#include
+#ifdef BW_INCLUDE_WITH_QUOTES
+# include "bw_common.h"
+#else
+# include
+#endif
-#ifdef __cplusplus
+#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
extern "C" {
#endif
@@ -357,7 +364,7 @@ static inline char bw_chorus_state_is_valid(
* than or equal to that of `bw_chorus_state`.
* }}} */
-#ifdef __cplusplus
+#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
}
#endif
@@ -366,11 +373,17 @@ static inline char bw_chorus_state_is_valid(
/* WARNING: This part of the file is not part of the public API. Its content may
* change at any time in future versions. Please, do not use it directly. */
-#include
-#include
-#include
+#ifdef BW_INCLUDE_WITH_QUOTES
+# include "bw_phase_gen.h"
+# include "bw_osc_sin.h"
+# include "bw_comb.h"
+#else
+# include
+# include
+# include
+#endif
-#ifdef __cplusplus
+#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
extern "C" {
#endif
@@ -832,13 +845,16 @@ static inline char bw_chorus_state_is_valid(
return bw_comb_state_is_valid(coeffs ? &coeffs->comb_coeffs : BW_NULL, &state->comb_state);
}
-#ifdef __cplusplus
+#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
}
-
-#ifndef BW_CXX_NO_ARRAY
-# include
#endif
+#if !defined(BW_NO_CXX) && defined(__cplusplus)
+
+# ifndef BW_CXX_NO_ARRAY
+# include
+# endif
+
namespace Brickworks {
/*** Public C++ API ***/
@@ -861,33 +877,33 @@ public:
float x0 = 0.f,
float * BW_RESTRICT y0 = nullptr);
-#ifndef BW_CXX_NO_ARRAY
+# ifndef BW_CXX_NO_ARRAY
void reset(
float x0,
std::array * BW_RESTRICT y0);
-#endif
+# endif
void reset(
const float * x0,
float * y0 = nullptr);
-#ifndef BW_CXX_NO_ARRAY
+# ifndef BW_CXX_NO_ARRAY
void reset(
std::array x0,
std::array * BW_RESTRICT y0 = nullptr);
-#endif
+# endif
void process(
const float * const * x,
float * const * y,
size_t nSamples);
-#ifndef BW_CXX_NO_ARRAY
+# ifndef BW_CXX_NO_ARRAY
void process(
std::array x,
std::array y,
size_t nSamples);
-#endif
+# endif
void setRate(
float value);
@@ -964,14 +980,14 @@ inline void Chorus::reset(
bw_chorus_reset_state(&coeffs, states + i, x0);
}
-#ifndef BW_CXX_NO_ARRAY
+# 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
+# endif
template
inline void Chorus::reset(
@@ -981,14 +997,14 @@ inline void Chorus::reset(
bw_chorus_reset_state_multi(&coeffs, statesP, x0, y0, N_CHANNELS);
}
-#ifndef BW_CXX_NO_ARRAY
+# 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
+# endif
template
inline void Chorus::process(
@@ -998,7 +1014,7 @@ inline void Chorus::process(
bw_chorus_process_multi(&coeffs, statesP, x, y, N_CHANNELS, nSamples);
}
-#ifndef BW_CXX_NO_ARRAY
+# ifndef BW_CXX_NO_ARRAY
template
inline void Chorus::process(
std::array x,
@@ -1006,7 +1022,7 @@ inline void Chorus::process(
size_t nSamples) {
process(x.data(), y.data(), nSamples);
}
-#endif
+# endif
template
inline void Chorus::setRate(
diff --git a/include/bw_clip.h b/include/bw_clip.h
index b1130ab..0c82d57 100644
--- a/include/bw_clip.h
+++ b/include/bw_clip.h
@@ -20,7 +20,7 @@
/*!
* module_type {{{ dsp }}}
- * version {{{ 1.1.1 }}}
+ * version {{{ 1.2.0 }}}
* requires {{{ bw_common bw_math bw_one_pole }}}
* description {{{
* Antialiased hard clipper with parametric bias and gain
@@ -45,8 +45,11 @@
* }}}
* changelog {{{
*
- * - Version 1.1.1:
+ *
- Version 1.2.0:
*
+ * - Added support for
BW_INCLUDE_WITH_QUOTES
,
+ * BW_NO_CXX
, and
+ * BW_CXX_NO_EXTERN_C
.
* - Added debugging checks from
bw_clip_process()
to
* bw_clip_process_multi()
.
* - Added debugging checks in
bw_clip_process_multi()
@@ -101,9 +104,13 @@
#ifndef BW_CLIP_H
#define BW_CLIP_H
-#include
+#ifdef BW_INCLUDE_WITH_QUOTES
+# include "bw_common.h"
+#else
+# include
+#endif
-#ifdef __cplusplus
+#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
extern "C" {
#endif
@@ -297,7 +304,7 @@ static inline char bw_clip_state_is_valid(
* than or equal to that of `bw_clip_state`.
* }}} */
-#ifdef __cplusplus
+#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
}
#endif
@@ -306,10 +313,15 @@ static inline char bw_clip_state_is_valid(
/* WARNING: This part of the file is not part of the public API. Its content may
* change at any time in future versions. Please, do not use it directly. */
-#include
-#include
+#ifdef BW_INCLUDE_WITH_QUOTES
+# include "bw_math.h"
+# include "bw_one_pole.h"
+#else
+# include
+# include
+#endif
-#ifdef __cplusplus
+#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
extern "C" {
#endif
@@ -743,13 +755,16 @@ static inline char bw_clip_state_is_valid(
return bw_is_finite(state->x_z1) && bw_is_finite(state->F_z1);
}
-#ifdef __cplusplus
+#if !defined(BW_CXX_NO_EXTERN_C) && defined(__cplusplus)
}
-
-#ifndef BW_CXX_NO_ARRAY
-# include
#endif
+#if !defined(BW_NO_CXX) && defined(__cplusplus)
+
+# ifndef BW_CXX_NO_ARRAY
+# include
+# endif
+
namespace Brickworks {
/*** Public C++ API ***/
@@ -769,33 +784,33 @@ public:
float x0 = 0.f,
float * BW_RESTRICT y0 = nullptr);
-#ifndef BW_CXX_NO_ARRAY
+# ifndef BW_CXX_NO_ARRAY
void reset(
float x0,
std::array