CreateLevelsForAllConChannels shall call CStereoSignalLevelMeter::CalcLogResult

This commit is contained in:
Volker Fischer 2020-04-10 16:56:45 +02:00
parent 9503630c4a
commit 631c473acc
3 changed files with 8 additions and 18 deletions

View file

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

View file

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

View file

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