diff --git a/examples/fx_drive/src/bw_example_fx_drive.c b/examples/fx_drive/src/bw_example_fx_drive.c index aefe129..0091efd 100644 --- a/examples/fx_drive/src/bw_example_fx_drive.c +++ b/examples/fx_drive/src/bw_example_fx_drive.c @@ -32,7 +32,7 @@ void bw_example_fx_drive_set_sample_rate(bw_example_fx_drive *instance, float sa void bw_example_fx_drive_reset(bw_example_fx_drive *instance) { bw_drive_reset_coeffs(&instance->drive_coeffs); - bw_drive_reset_state(&instance->drive_coeffs, &instance->drive_state); + bw_drive_reset_state(&instance->drive_coeffs, &instance->drive_state, 0.f); bw_src_int_reset_state(&instance->src_up_coeffs, &instance->src_up_state, 0.f); bw_src_int_reset_state(&instance->src_down_coeffs, &instance->src_down_state, 0.f); } diff --git a/examples/fx_drive/vst3/Makefile b/examples/fx_drive/vst3/Makefile index e85999a..294a59e 100644 --- a/examples/fx_drive/vst3/Makefile +++ b/examples/fx_drive/vst3/Makefile @@ -4,3 +4,6 @@ NAME := bw_example_fx_drive SOURCES = ${SOURCES_COMMON} ${ROOT_DIR}/../src/bw_example_fx_drive.c include ${ROOT_DIR}/../../common/vst3/vst3.mk + +CXXFLAGS += -DRELEASE=1 -DNDEBUG -DBW_NO_DEBUG +#CXXFLAGS += -DDEVELOPMENT=1 -DBW_DEBUG_DEEP diff --git a/examples/fxpp_drive/vst3/Makefile b/examples/fxpp_drive/vst3/Makefile index fe25961..32524ea 100644 --- a/examples/fxpp_drive/vst3/Makefile +++ b/examples/fxpp_drive/vst3/Makefile @@ -4,3 +4,6 @@ NAME := bw_example_fxpp_drive SOURCES = ${SOURCES_COMMON} ${ROOT_DIR}/../src/bw_example_fxpp_drive.cpp include ${ROOT_DIR}/../../common/vst3/vst3.mk + +CXXFLAGS += -DRELEASE=1 -DNDEBUG -DBW_NO_DEBUG +#CXXFLAGS += -DDEVELOPMENT=1 -DBW_DEBUG_DEEP diff --git a/include/bw_clip.h b/include/bw_clip.h index ea0e94b..8d27e12 100644 --- a/include/bw_clip.h +++ b/include/bw_clip.h @@ -425,7 +425,7 @@ static inline float bw_clip_reset_state( const float a = bw_absf(x); const float F = a > 1.f ? a - 0.5f : 0.5f * a * a; const float yb = bw_clipf(x, -1.f, 1.f); - const float y = yb - coeffs->bias_dc; + const float y = (coeffs->gain_compensation ? coeffs->inv_gain : 1.f) * (yb - coeffs->bias_dc); state->x_z1 = x; state->F_z1 = F; diff --git a/include/bw_dist.h b/include/bw_dist.h index aad2222..346fa08 100644 --- a/include/bw_dist.h +++ b/include/bw_dist.h @@ -34,6 +34,7 @@ *