do not attenuate that much in the server, more fair reduction of quality parameters in the server

This commit is contained in:
Volker Fischer 2009-03-11 21:34:57 +00:00
parent 205daead99
commit 17e78fab95
2 changed files with 9 additions and 6 deletions

View file

@ -298,8 +298,11 @@ void CChannelSet::SetOutputParameters()
break;
}
int iCurCh = 0;
while ( ( iCurCh < USED_NUM_CHANNELS ) && ( !bUploadRateIsBelowLimit ) )
// we try to set the worst parameters to the clients which connected
// the latest to the server, therefore we apply the new parameters to
// the last channels first
int iCurCh = USED_NUM_CHANNELS - 1;
while ( ( iCurCh >= 0 ) && ( !bUploadRateIsBelowLimit ) )
{
if ( vecChannels[iCurCh].IsConnected() )
{
@ -312,8 +315,8 @@ void CChannelSet::SetOutputParameters()
( CalculateTotalUploadRateKbps() <= iUploadRateLimitKbps );
}
// next channel
iCurCh++;
// next channel (backwards counting)
iCurCh--;
}
// next trial index

View file

@ -183,8 +183,8 @@ CVector<short> CServer::ProcessData ( CVector<CVector<double> >& vecvecdData,
const int iNumClients = vecvecdData.Size();
// 3 dB offset to avoid overload if all clients are set to gain 1
const double dNorm = (double) 2.0;
// some offset to avoid overload when mixing clients together
const double dNorm = (double) 1.25;
// mix all audio data from all clients together
for ( int i = 0; i < MIN_SERVER_BLOCK_SIZE_SAMPLES; i++ )