avoid buffer length of one for the auto jitter buffer detection

This commit is contained in:
Volker Fischer 2016-01-30 18:22:19 +00:00
parent f66db79b8b
commit 4dd24a9173
2 changed files with 15 additions and 13 deletions

View file

@ -93,19 +93,21 @@ bool CNetBuf::Get ( CVector<uint8_t>& vecbyData,
CNetBufWithStats::CNetBufWithStats() : CNetBufWithStats::CNetBufWithStats() :
CNetBuf ( false ) // base class init: no simulation mode CNetBuf ( false ) // base class init: no simulation mode
{ {
// define the sizes of the simulation buffers, // Define the sizes of the simulation buffers,
// must be NUM_STAT_SIMULATION_BUFFERS elements! // must be NUM_STAT_SIMULATION_BUFFERS elements!
viBufSizesForSim[0] = 1; // Avoid the buffer length 1 because we do not have a solution for a
viBufSizesForSim[1] = 2; // sample rate offset correction. Caused by the jitter we usually get bad
viBufSizesForSim[2] = 3; // performance with just one buffer.
viBufSizesForSim[3] = 4; viBufSizesForSim[0] = 2;
viBufSizesForSim[4] = 5; viBufSizesForSim[1] = 3;
viBufSizesForSim[5] = 6; viBufSizesForSim[2] = 4;
viBufSizesForSim[6] = 7; viBufSizesForSim[3] = 5;
viBufSizesForSim[7] = 8; viBufSizesForSim[4] = 6;
viBufSizesForSim[8] = 9; viBufSizesForSim[5] = 7;
viBufSizesForSim[9] = 10; viBufSizesForSim[6] = 8;
viBufSizesForSim[10] = 11; viBufSizesForSim[7] = 9;
viBufSizesForSim[8] = 10;
viBufSizesForSim[9] = 11;
// set all simulation buffers in simulation mode // set all simulation buffers in simulation mode
for ( int i = 0; i < NUM_STAT_SIMULATION_BUFFERS; i++ ) for ( int i = 0; i < NUM_STAT_SIMULATION_BUFFERS; i++ )

View file

@ -43,7 +43,7 @@
#define UP_MAX_ERROR_BOUND 0.01 #define UP_MAX_ERROR_BOUND 0.01
// number of simulation network jitter buffers for evaluating the statistic // number of simulation network jitter buffers for evaluating the statistic
#define NUM_STAT_SIMULATION_BUFFERS 11 #define NUM_STAT_SIMULATION_BUFFERS 10
/* Classes ********************************************************************/ /* Classes ********************************************************************/