only allow network buffer sizes which are meaningful

This commit is contained in:
Volker Fischer 2006-03-07 20:33:33 +00:00
parent 21ca2c62a2
commit 452f7dfca3
2 changed files with 3 additions and 2 deletions

View file

@ -72,7 +72,8 @@
#define SND_CRD_BLOCK_SIZE_SAMPLES ( BLOCK_DURATION_MS * SND_CRD_SAMPLE_RATE / 1000 ) #define SND_CRD_BLOCK_SIZE_SAMPLES ( BLOCK_DURATION_MS * SND_CRD_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 )
/* 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 */

View file

@ -94,7 +94,7 @@ CLlconClientDlg::CLlconClientDlg ( CClient* pNCliP, QWidget* parent,
TextSndBufOut->setText("Out: " + QString().setNum(iCurNumOutBuf)); TextSndBufOut->setText("Out: " + QString().setNum(iCurNumOutBuf));
/* network buffer */ /* 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(); const int iCurNumNetBuf = pClient->GetSockBufSize();
SliderNetBuf->setValue(iCurNumNetBuf); SliderNetBuf->setValue(iCurNumNetBuf);
TextNetBuf->setText("Size: " + QString().setNum(iCurNumNetBuf)); TextNetBuf->setText("Size: " + QString().setNum(iCurNumNetBuf));