do not attenuate that much in the server, more fair reduction of quality parameters in the server
This commit is contained in:
parent
205daead99
commit
17e78fab95
2 changed files with 9 additions and 6 deletions
|
@ -298,8 +298,11 @@ void CChannelSet::SetOutputParameters()
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
int iCurCh = 0;
|
// we try to set the worst parameters to the clients which connected
|
||||||
while ( ( iCurCh < USED_NUM_CHANNELS ) && ( !bUploadRateIsBelowLimit ) )
|
// 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() )
|
if ( vecChannels[iCurCh].IsConnected() )
|
||||||
{
|
{
|
||||||
|
@ -312,8 +315,8 @@ void CChannelSet::SetOutputParameters()
|
||||||
( CalculateTotalUploadRateKbps() <= iUploadRateLimitKbps );
|
( CalculateTotalUploadRateKbps() <= iUploadRateLimitKbps );
|
||||||
}
|
}
|
||||||
|
|
||||||
// next channel
|
// next channel (backwards counting)
|
||||||
iCurCh++;
|
iCurCh--;
|
||||||
}
|
}
|
||||||
|
|
||||||
// next trial index
|
// next trial index
|
||||||
|
|
|
@ -183,8 +183,8 @@ CVector<short> CServer::ProcessData ( CVector<CVector<double> >& vecvecdData,
|
||||||
|
|
||||||
const int iNumClients = vecvecdData.Size();
|
const int iNumClients = vecvecdData.Size();
|
||||||
|
|
||||||
// 3 dB offset to avoid overload if all clients are set to gain 1
|
// some offset to avoid overload when mixing clients together
|
||||||
const double dNorm = (double) 2.0;
|
const double dNorm = (double) 1.25;
|
||||||
|
|
||||||
// mix all audio data from all clients together
|
// mix all audio data from all clients together
|
||||||
for ( int i = 0; i < MIN_SERVER_BLOCK_SIZE_SAMPLES; i++ )
|
for ( int i = 0; i < MIN_SERVER_BLOCK_SIZE_SAMPLES; i++ )
|
||||||
|
|
Loading…
Reference in a new issue