CreateLevelsForAllConChannels shall call CStereoSignalLevelMeter::CalcLogResult
This commit is contained in:
parent
9503630c4a
commit
631c473acc
3 changed files with 8 additions and 18 deletions
|
@ -11,8 +11,7 @@
|
|||
* fixed column widths are slightly too narrow for "Ping Time" and "Musicians" and typos
|
||||
|
||||
|
||||
|
||||
TODO in CreateLevelsForAllConChannels we should call CStereoSignalLevelMeter::CalcLogResult instead -> make it public and static
|
||||
TODO fix UpdateCurLevel() for new 64 samples frame size
|
||||
|
||||
TODO auto jitter buffer performance not good at 64 samples frame size
|
||||
|
||||
|
|
|
@ -1715,17 +1715,7 @@ void CServer::CreateLevelsForAllConChannels ( const int i
|
|||
vecChannels[iChId].SetPrevLevel ( dCurLevel );
|
||||
|
||||
// logarithmic measure
|
||||
// TODO we should call CStereoSignalLevelMeter::CalcLogResult instead -> make it public and static
|
||||
const double dNormChanLevel = dCurLevel / _MAXSHORT;
|
||||
double dCurSigLevel;
|
||||
if ( dNormChanLevel > 0 )
|
||||
{
|
||||
dCurSigLevel = 20.0 * log10 ( dNormChanLevel );
|
||||
}
|
||||
else
|
||||
{
|
||||
dCurSigLevel = -100000.0; // large negative value
|
||||
}
|
||||
double dCurSigLevel = CStereoSignalLevelMeter::CalcLogResult ( dCurLevel );
|
||||
|
||||
// map to signal level meter
|
||||
dCurSigLevel -= LOW_BOUND_SIG_METER;
|
||||
|
|
|
@ -597,6 +597,8 @@ public:
|
|||
void Update ( const CVector<short>& vecsAudio );
|
||||
double MicLevelLeft() { return CalcLogResult ( dCurLevelL ); }
|
||||
double MicLevelRight() { return CalcLogResult ( dCurLevelR ); }
|
||||
static double CalcLogResult ( const double& dLinearLevel );
|
||||
|
||||
void Reset()
|
||||
{
|
||||
dCurLevelL = 0.0;
|
||||
|
@ -604,7 +606,6 @@ public:
|
|||
}
|
||||
|
||||
protected:
|
||||
double CalcLogResult ( const double& dLinearLevel );
|
||||
double UpdateCurLevel ( double dCurLevel,
|
||||
const short& sMax );
|
||||
|
||||
|
|
Loading…
Reference in a new issue