diff --git a/src/global.h b/src/global.h index 66516f2e..09162dd0 100755 --- a/src/global.h +++ b/src/global.h @@ -72,7 +72,8 @@ #define SND_CRD_BLOCK_SIZE_SAMPLES ( BLOCK_DURATION_MS * SND_CRD_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 MAX_NET_BUF_SIZE_NUM_BL 12 /* number of blocks */ +#define MIN_NET_BUF_SIZE_NUM_BL ( BLOCK_SIZE_SAMPLES / MIN_BLOCK_SIZE_SAMPLES ) /* default network buffer size */ #define DEF_NET_BUF_SIZE_NUM_BL 5 /* number of blocks */ diff --git a/src/llconclientdlg.cpp b/src/llconclientdlg.cpp index 3b0619a4..72f0f0c9 100755 --- a/src/llconclientdlg.cpp +++ b/src/llconclientdlg.cpp @@ -94,7 +94,7 @@ CLlconClientDlg::CLlconClientDlg ( CClient* pNCliP, QWidget* parent, TextSndBufOut->setText("Out: " + QString().setNum(iCurNumOutBuf)); /* network buffer */ - SliderNetBuf->setRange(1, MAX_NET_BUF_SIZE_NUM_BL); + SliderNetBuf->setRange(MIN_NET_BUF_SIZE_NUM_BL, MAX_NET_BUF_SIZE_NUM_BL); const int iCurNumNetBuf = pClient->GetSockBufSize(); SliderNetBuf->setValue(iCurNumNetBuf); TextNetBuf->setText("Size: " + QString().setNum(iCurNumNetBuf));