From 086b4d116f1d59fcb5fad8bd7130cd89cd3fc42f Mon Sep 17 00:00:00 2001 From: kevin Date: Mon, 10 Mar 2025 19:51:14 -0400 Subject: [PATCH] cwDspTransforms.h : Added enable_fl to compressor exec() --- cwDspTransforms.cpp | 4 ++-- cwDspTransforms.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cwDspTransforms.cpp b/cwDspTransforms.cpp index 1d8d1a7..08d3db3 100644 --- a/cwDspTransforms.cpp +++ b/cwDspTransforms.cpp @@ -98,7 +98,7 @@ cw::rc_t cw::dsp::compressor::destroy( obj_t*& p ) See compressor.m */ -cw::rc_t cw::dsp::compressor::exec( obj_t* p, const sample_t* x, sample_t* y, unsigned n ) +cw::rc_t cw::dsp::compressor::exec( obj_t* p, const sample_t* x, sample_t* y, unsigned n, bool enable_fl ) { sample_t xx[n]; @@ -113,7 +113,7 @@ cw::rc_t cw::dsp::compressor::exec( obj_t* p, const sample_t* x, sample_t* y, un rmsDb += 100.0; // if the compressor is bypassed - if( p->bypassFl ) + if( p->bypassFl || !enable_fl ) { vop::copy(y,x,n); // copy through - with no input gain return kOkRC; diff --git a/cwDspTransforms.h b/cwDspTransforms.h index 92bfd93..4676f17 100644 --- a/cwDspTransforms.h +++ b/cwDspTransforms.h @@ -40,7 +40,7 @@ namespace cw rc_t create( obj_t*& p, srate_t srate, unsigned procSmpCnt, coeff_t inGain, ftime_t rmsWndMaxMs, ftime_t rmsWndMs, coeff_t threshDb, coeff_t ratio, ftime_t atkMs, ftime_t rlsMs, coeff_t outGain, bool bypassFl ); rc_t destroy( obj_t*& pp ); - rc_t exec( obj_t* p, const sample_t* x, sample_t* y, unsigned n ); + rc_t exec( obj_t* p, const sample_t* x, sample_t* y, unsigned n, bool enable_fl ); void set_attack_ms( obj_t* p, ftime_t ms ); void set_release_ms( obj_t* p, ftime_t ms );