cwAudioTransforms.h : Added 'enable_fl' to 'spec_dist'. Changed 'idb' limit from -150 to -100 in output gain to input gain calculation.
This commit is contained in:
parent
700a670f40
commit
d4f7180102
@ -952,10 +952,16 @@ namespace cw
|
||||
|
||||
|
||||
template< typename T0, typename T1 >
|
||||
rc_t exec( struct obj_str<T0,T1>* p, const T0* magV, const T0* phsV, unsigned binN )
|
||||
rc_t exec( struct obj_str<T0,T1>* p, const T0* magV, const T0* phsV, unsigned binN, bool enable_fl=true )
|
||||
{
|
||||
rc_t rc = kOkRC;
|
||||
|
||||
if( p->bypassFl || !enable_fl )
|
||||
{
|
||||
vop::copy( p->outMagV, magV, binN );
|
||||
}
|
||||
else
|
||||
{
|
||||
double X0m[binN];
|
||||
double X1m[binN];
|
||||
|
||||
@ -991,7 +997,7 @@ namespace cw
|
||||
//if( p->mix > 0 )
|
||||
if(1)
|
||||
{
|
||||
if( idb > -150.0 )
|
||||
if( idb > -100.0 )
|
||||
{
|
||||
// set the output gain such that the mean output magnitude
|
||||
// will match the mean input magnitude
|
||||
@ -1004,14 +1010,12 @@ namespace cw
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// apply the output gain
|
||||
if( p->bypassFl )
|
||||
vop::copy( p->outMagV, magV, binN );
|
||||
else
|
||||
//vop::mul( p->outMagV, X1m, std::min((T1)4.0,p->ogain), binN);
|
||||
vop::mul( p->outMagV, X1m, p->ogain, binN);
|
||||
|
||||
}
|
||||
|
||||
vop::copy( p->outPhsV, phsV, binN);
|
||||
|
||||
return rc;
|
||||
|
Loading…
Reference in New Issue
Block a user