fixes for block sizes
This commit is contained in:
parent
e904c495ea
commit
33ef3dcc69
4 changed files with 5 additions and 12 deletions
|
@ -228,9 +228,6 @@ CChannel::CChannel ()
|
||||||
/* init the socket buffer */
|
/* init the socket buffer */
|
||||||
SetSockBufSize ( MIN_BLOCK_SIZE_SAMPLES, DEF_NET_BUF_SIZE_NUM_BL );
|
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
|
// set initial input and output block size factors
|
||||||
SetNetwInBlSiFact ( NET_BLOCK_SIZE_FACTOR );
|
SetNetwInBlSiFact ( NET_BLOCK_SIZE_FACTOR );
|
||||||
SetNetwOutBlSiFact ( NET_BLOCK_SIZE_FACTOR );
|
SetNetwOutBlSiFact ( NET_BLOCK_SIZE_FACTOR );
|
||||||
|
@ -526,7 +523,7 @@ fflush(pFile);
|
||||||
iInitCnt--;
|
iInitCnt--;
|
||||||
else
|
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");
|
static FILE* pFile = fopen("v.dat", "w");
|
||||||
|
|
|
@ -71,13 +71,9 @@
|
||||||
// maximum value of factor for network block size
|
// maximum value of factor for network block size
|
||||||
#define NET_BLOCK_SIZE_FACTOR_MAX 10
|
#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) */
|
/* maximum network buffer size (which can be chosen by slider) */
|
||||||
#define MAX_NET_BUF_SIZE_NUM_BL 12 /* number of blocks */
|
#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 */
|
/* default network buffer size */
|
||||||
#define DEF_NET_BUF_SIZE_NUM_BL 5 /* number of blocks */
|
#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) */
|
/* time interval of taps for sample rate offset estimation (time stamps) */
|
||||||
#define INTVL_TAPS_SAM_OFF_SET 1 /* s */
|
#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 )
|
#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 */
|
/* length of the moving average buffer for response time measurement */
|
||||||
|
|
|
@ -59,7 +59,7 @@ CLlconClientDlg::CLlconClientDlg ( CClient* pNCliP, QWidget* parent,
|
||||||
/* set text for version and application name */
|
/* set text for version and application name */
|
||||||
TextLabelNameVersion->
|
TextLabelNameVersion->
|
||||||
setText(QString(APP_NAME) + tr(" client ") + QString(VERSION) +
|
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 */
|
/* init server address line edit */
|
||||||
LineEditServerAddr->setText ( pClient->strIPAddress.c_str () );
|
LineEditServerAddr->setText ( pClient->strIPAddress.c_str () );
|
||||||
|
|
|
@ -33,7 +33,7 @@ CLlconServerDlg::CLlconServerDlg ( CServer* pNServP, QWidget* parent,
|
||||||
/* set text for version and application name */
|
/* set text for version and application name */
|
||||||
TextLabelNameVersion->
|
TextLabelNameVersion->
|
||||||
setText(QString(APP_NAME) + tr(" server ") + QString(VERSION) +
|
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 */
|
/* Create bitmaps */
|
||||||
/* Define size of the bitmaps */
|
/* Define size of the bitmaps */
|
||||||
|
|
Loading…
Reference in a new issue