fixes for block sizes

This commit is contained in:
Volker Fischer 2006-03-11 20:57:09 +00:00
parent e904c495ea
commit 33ef3dcc69
4 changed files with 5 additions and 12 deletions

View file

@ -228,9 +228,6 @@ CChannel::CChannel ()
/* init the socket buffer */
SetSockBufSize ( MIN_BLOCK_SIZE_SAMPLES, DEF_NET_BUF_SIZE_NUM_BL );
/* init conversion buffer */
ConvBuf.Init ( BLOCK_SIZE_SAMPLES );
// set initial input and output block size factors
SetNetwInBlSiFact ( NET_BLOCK_SIZE_FACTOR );
SetNetwOutBlSiFact ( NET_BLOCK_SIZE_FACTOR );
@ -526,7 +523,7 @@ fflush(pFile);
iInitCnt--;
else
{
dSamRateEst = dNom / dDenom * NUM_BL_TIME_STAMPS * BLOCK_SIZE_SAMPLES * 1000;
dSamRateEst = dNom / dDenom * NUM_BL_TIME_STAMPS * MIN_BLOCK_SIZE_SAMPLES * 1000;
/*
static FILE* pFile = fopen("v.dat", "w");

View file

@ -71,13 +71,9 @@
// maximum value of factor for network block size
#define NET_BLOCK_SIZE_FACTOR_MAX 10
#define BLOCK_DURATION_MS 6 /* ms */
#define BLOCK_SIZE_SAMPLES ( BLOCK_DURATION_MS * SAMPLE_RATE / 1000 )
/* maximum network buffer size (which can be chosen by slider) */
#define MAX_NET_BUF_SIZE_NUM_BL 12 /* number of blocks */
#define MIN_NET_BUF_SIZE_NUM_BL ( BLOCK_SIZE_SAMPLES / MIN_BLOCK_SIZE_SAMPLES )
#define MIN_NET_BUF_SIZE_NUM_BL NET_BLOCK_SIZE_FACTOR
/* default network buffer size */
#define DEF_NET_BUF_SIZE_NUM_BL 5 /* number of blocks */
@ -96,7 +92,7 @@
/* time interval of taps for sample rate offset estimation (time stamps) */
#define INTVL_TAPS_SAM_OFF_SET 1 /* s */
#define NUM_BL_TIME_STAMPS ( ( INTVL_TAPS_SAM_OFF_SET * 1000 ) / BLOCK_DURATION_MS )
#define NUM_BL_TIME_STAMPS ( ( INTVL_TAPS_SAM_OFF_SET * 1000 ) / MIN_BLOCK_DURATION_MS )
#define VEC_LEN_SAM_OFFS_EST ( TIME_INT_SAM_OFFS_EST / INTVL_TAPS_SAM_OFF_SET )
/* length of the moving average buffer for response time measurement */

View file

@ -59,7 +59,7 @@ CLlconClientDlg::CLlconClientDlg ( CClient* pNCliP, QWidget* parent,
/* set text for version and application name */
TextLabelNameVersion->
setText(QString(APP_NAME) + tr(" client ") + QString(VERSION) +
" (" + QString().setNum(BLOCK_DURATION_MS) + " ms)");
" (" + QString().setNum(MIN_BLOCK_DURATION_MS * NET_BLOCK_SIZE_FACTOR) + " ms)");
/* init server address line edit */
LineEditServerAddr->setText ( pClient->strIPAddress.c_str () );

View file

@ -33,7 +33,7 @@ CLlconServerDlg::CLlconServerDlg ( CServer* pNServP, QWidget* parent,
/* set text for version and application name */
TextLabelNameVersion->
setText(QString(APP_NAME) + tr(" server ") + QString(VERSION) +
" (" + QString().setNum(BLOCK_DURATION_MS) + " ms)");
" (" + QString().setNum(MIN_BLOCK_DURATION_MS * NET_BLOCK_SIZE_FACTOR) + " ms)");
/* Create bitmaps */
/* Define size of the bitmaps */