implemented to show actual sound card buffer size
This commit is contained in:
parent
ee28e3bc8e
commit
8a8cf0b543
3 changed files with 15 additions and 5 deletions
|
@ -36,7 +36,8 @@ CClient::CClient ( const quint16 iPortNumber ) :
|
||||||
strIPAddress ( "" ), strName ( "" ),
|
strIPAddress ( "" ), strName ( "" ),
|
||||||
bOpenChatOnNewMessage ( true ),
|
bOpenChatOnNewMessage ( true ),
|
||||||
bDoAutoSockBufSize ( true ),
|
bDoAutoSockBufSize ( true ),
|
||||||
iSndCrdPreferredMonoBlSizeIndex ( CSndCrdBufferSizes::GetDefaultIndex() )
|
iSndCrdPreferredMonoBlSizeIndex ( CSndCrdBufferSizes::GetDefaultIndex() ),
|
||||||
|
iSndCrdMonoBlockSizeSam ( 0 )
|
||||||
{
|
{
|
||||||
// connection for protocol
|
// connection for protocol
|
||||||
QObject::connect ( &Channel,
|
QObject::connect ( &Channel,
|
||||||
|
|
|
@ -121,6 +121,7 @@ public:
|
||||||
void SetSndCrdPreferredMonoBlSizeIndex ( const int iNewIdx );
|
void SetSndCrdPreferredMonoBlSizeIndex ( const int iNewIdx );
|
||||||
int GetSndCrdPreferredMonoBlSizeIndex()
|
int GetSndCrdPreferredMonoBlSizeIndex()
|
||||||
{ return iSndCrdPreferredMonoBlSizeIndex; }
|
{ return iSndCrdPreferredMonoBlSizeIndex; }
|
||||||
|
int GetSndCrdActualMonoBlSize() { return iSndCrdMonoBlockSizeSam; }
|
||||||
|
|
||||||
void SetAudioCompressionOut ( const EAudComprType eNewAudComprTypeOut )
|
void SetAudioCompressionOut ( const EAudComprType eNewAudComprTypeOut )
|
||||||
{
|
{
|
||||||
|
|
|
@ -163,13 +163,21 @@ void CClientSettingsDlg::UpdateJitterBufferFrame()
|
||||||
void CClientSettingsDlg::UpdateSoundCardFrame()
|
void CClientSettingsDlg::UpdateSoundCardFrame()
|
||||||
{
|
{
|
||||||
// update slider value and text
|
// update slider value and text
|
||||||
const int iCurBufIdx = pClient->GetSndCrdPreferredMonoBlSizeIndex();
|
const int iCurPrefBufIdx = pClient->GetSndCrdPreferredMonoBlSizeIndex();
|
||||||
SliderSndCrdBufferDelay->setValue ( iCurBufIdx );
|
const int iCurActualBufIdx = pClient->GetSndCrdActualMonoBlSize();
|
||||||
|
SliderSndCrdBufferDelay->setValue ( iCurPrefBufIdx );
|
||||||
|
|
||||||
|
// preferred size
|
||||||
TextLabelPreferredSndCrdBufDelay->setText (
|
TextLabelPreferredSndCrdBufDelay->setText (
|
||||||
QString().setNum ( (double) CSndCrdBufferSizes::GetBufferSizeFromIndex ( iCurBufIdx ) *
|
QString().setNum ( (double) CSndCrdBufferSizes::GetBufferSizeFromIndex ( iCurPrefBufIdx ) *
|
||||||
1000 / SND_CRD_SAMPLE_RATE, 'f', 2 ) + " ms (" +
|
1000 / SND_CRD_SAMPLE_RATE, 'f', 2 ) + " ms (" +
|
||||||
QString().setNum ( CSndCrdBufferSizes::GetBufferSizeFromIndex ( iCurBufIdx ) ) + ")" );
|
QString().setNum ( CSndCrdBufferSizes::GetBufferSizeFromIndex ( iCurPrefBufIdx ) ) + ")" );
|
||||||
|
|
||||||
|
// actual size
|
||||||
|
TextLabelActualSndCrdBufDelay->setText (
|
||||||
|
QString().setNum ( (double) iCurActualBufIdx *
|
||||||
|
1000 / SND_CRD_SAMPLE_RATE, 'f', 2 ) + " ms (" +
|
||||||
|
QString().setNum ( iCurActualBufIdx ) + ")" );
|
||||||
}
|
}
|
||||||
|
|
||||||
void CClientSettingsDlg::showEvent ( QShowEvent* showEvent )
|
void CClientSettingsDlg::showEvent ( QShowEvent* showEvent )
|
||||||
|
|
Loading…
Reference in a new issue