minor cleanup

This commit is contained in:
Volker Fischer 2020-04-06 22:03:35 +02:00
parent f0ae93a07b
commit 0011f6686a
2 changed files with 14 additions and 8 deletions

View file

@ -14,11 +14,17 @@
TODO support OPUS 64 in the server as a first step towards official 64 samples frame size support
TODO in CreateLevelsForAllConChannels we should call CStereoSignalLevelMeter::CalcLogResult instead -> make it public and static
TODO offer the Jamulus ASIO settingspanel in case of an ASIO ERROR to fix, e.g., incorrect sample rate (https://sourceforge.net/p/llcon/discussion/533517/thread/777663cf94/#035f)
TODO client: larger sound card buffers are managed by conversion buffer, not in processintern for loop (note iSndCrdFrameSizeFactor!)
TODO #12 A server in the same NAT region as the client is not visible (https://sourceforge.net/p/llcon/bugs/12/)
TODO client: larger sound card buffers are managed by conversion buffer, not in processintern for loop (note iSndCrdFrameSizeFactor!)
TODO #71 Increase "stability" of Connection Setup server list
TODO update text in CAboutDlg

View file

@ -1010,8 +1010,7 @@ JitterMeas.Measure();
// one client is connected.
if ( iNumClients > 0 )
{
// Low frequency updates
// low frequency updates
if ( iFrameCount > CHANNEL_LEVEL_UPDATE_INTERVAL )
{
iFrameCount = 0;
@ -1019,7 +1018,7 @@ JitterMeas.Measure();
// Calculate channel levels if any client has requested them
for ( int i = 0; i < iNumClients; i++ )
{
if ( vecChannels[ vecChanIDsCurConChan[i] ].ChannelLevelsRequired() )
if ( vecChannels[vecChanIDsCurConChan[i]].ChannelLevelsRequired() )
{
bSendChannelLevels = true;
@ -1643,13 +1642,14 @@ void CServer::CreateLevelsForAllConChannels ( const int i
}
// smoothing
int iChId = vecChanIDsCurConChan [ j ];
dCurLevel = std::max ( dCurLevel, vecChannels[ iChId ].GetPrevLevel() * 0.5 );
vecChannels[ iChId ].SetPrevLevel ( dCurLevel );
const int iChId = vecChanIDsCurConChan[j];
dCurLevel = std::max ( dCurLevel, vecChannels[iChId].GetPrevLevel() * 0.5 );
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;
double dCurSigLevel;
if ( dNormChanLevel > 0 )
{
dCurSigLevel = 20.0 * log10 ( dNormChanLevel );