diff --git a/src/channel.cpp b/src/channel.cpp index f23df02a..958845db 100755 --- a/src/channel.cpp +++ b/src/channel.cpp @@ -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"); diff --git a/src/global.h b/src/global.h index d502e6b6..cf9e20d4 100755 --- a/src/global.h +++ b/src/global.h @@ -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 */ diff --git a/src/llconclientdlg.cpp b/src/llconclientdlg.cpp index 72f0f0c9..79f3309e 100755 --- a/src/llconclientdlg.cpp +++ b/src/llconclientdlg.cpp @@ -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 () ); diff --git a/src/llconserverdlg.cpp b/src/llconserverdlg.cpp index 38799e3f..88acef31 100755 --- a/src/llconserverdlg.cpp +++ b/src/llconserverdlg.cpp @@ -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 */