cwDspTransforms.h : Added enable_fl to compressor exec()

This commit is contained in:
kevin 2025-03-10 19:51:14 -04:00
parent 90a910704e
commit 086b4d116f
2 changed files with 3 additions and 3 deletions

View File

@ -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;

View File

@ -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 );