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 ( "" ),
|
||||
bOpenChatOnNewMessage ( true ),
|
||||
bDoAutoSockBufSize ( true ),
|
||||
iSndCrdPreferredMonoBlSizeIndex ( CSndCrdBufferSizes::GetDefaultIndex() )
|
||||
iSndCrdPreferredMonoBlSizeIndex ( CSndCrdBufferSizes::GetDefaultIndex() ),
|
||||
iSndCrdMonoBlockSizeSam ( 0 )
|
||||
{
|
||||
// connection for protocol
|
||||
QObject::connect ( &Channel,
|
||||
|
|
|
@ -121,6 +121,7 @@ public:
|
|||
void SetSndCrdPreferredMonoBlSizeIndex ( const int iNewIdx );
|
||||
int GetSndCrdPreferredMonoBlSizeIndex()
|
||||
{ return iSndCrdPreferredMonoBlSizeIndex; }
|
||||
int GetSndCrdActualMonoBlSize() { return iSndCrdMonoBlockSizeSam; }
|
||||
|
||||
void SetAudioCompressionOut ( const EAudComprType eNewAudComprTypeOut )
|
||||
{
|
||||
|
|
|
@ -163,13 +163,21 @@ void CClientSettingsDlg::UpdateJitterBufferFrame()
|
|||
void CClientSettingsDlg::UpdateSoundCardFrame()
|
||||
{
|
||||
// update slider value and text
|
||||
const int iCurBufIdx = pClient->GetSndCrdPreferredMonoBlSizeIndex();
|
||||
SliderSndCrdBufferDelay->setValue ( iCurBufIdx );
|
||||
const int iCurPrefBufIdx = pClient->GetSndCrdPreferredMonoBlSizeIndex();
|
||||
const int iCurActualBufIdx = pClient->GetSndCrdActualMonoBlSize();
|
||||
SliderSndCrdBufferDelay->setValue ( iCurPrefBufIdx );
|
||||
|
||||
// preferred size
|
||||
TextLabelPreferredSndCrdBufDelay->setText (
|
||||
QString().setNum ( (double) CSndCrdBufferSizes::GetBufferSizeFromIndex ( iCurBufIdx ) *
|
||||
QString().setNum ( (double) CSndCrdBufferSizes::GetBufferSizeFromIndex ( iCurPrefBufIdx ) *
|
||||
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 )
|
||||
|
|
Loading…
Reference in a new issue