Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Jamulus.pro
Original file line number Diff line number Diff line change
Expand Up @@ -732,6 +732,8 @@ DISTFILES += ChangeLog \
src/res/IndicatorGreen.png \
src/res/IndicatorYellow.png \
src/res/IndicatorRed.png \
src/res/IndicatorYellowFancy.png \
src/res/IndicatorRedFancy.png \
src/res/faderbackground.png \
src/res/faderhandle.png \
src/res/faderhandlesmall.png \
Expand Down Expand Up @@ -1130,3 +1132,4 @@ contains(CONFIG, "disable_version_check") {
}

ANDROID_ABIS = armeabi-v7a arm64-v8a x86 x86_64

61 changes: 58 additions & 3 deletions src/clientdlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,34 @@ CClientDlg::CClientDlg ( CClient* pNCliP,

ledBuffers->setAccessibleName ( tr ( "Buffers status LED indicator" ) );

// current connection status parameter
QString strConnStats = "<b>" +
tr ( "Current Connection Status "
"Parameter" ) +
":</b> " +
tr ( "The Ping Time is the time required for the audio "
"stream to travel from the client to the server and back again. This "
"delay is introduced by the network and should be about "
"20-30 ms. If this delay is higher than about 50 ms, your distance to "
"the server is too large or your internet connection is not "
"sufficient." ) +
"<br>" +
tr ( "Overall Delay is calculated from the current Ping Time and the "
"delay introduced by the current buffer settings." );

lblPing->setWhatsThis ( strConnStats );
lblPingVal->setWhatsThis ( strConnStats );
lblDelay->setWhatsThis ( strConnStats );
lblDelayVal->setWhatsThis ( strConnStats );
ledDelay->setWhatsThis ( strConnStats );
ledDelay->setToolTip ( tr ( "If this LED indicator turns red, "
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not part of this PR, but we should use QString ( … %1 … ) .arg ( APP_NAME ); here

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not part of this PR, but we should use QString ( … %1 … ) .arg ( APP_NAME ); here

Yes, I agree. Just to re-iterate, this not only does not have to be part of this PR, it should not be part of this PR to avoid introducing even more translation movements.

"you will not have much fun using the " ) +
APP_NAME + tr ( " software." ) + TOOLTIP_COM_END_TEXT );
lblPingVal->setText ( "---" );
lblPingUnit->setText ( "" );
lblDelayVal->setText ( "---" );
lblDelayUnit->setText ( "" );

// init GUI design
SetGUIDesign ( pClient->GetGUIDesign() );

Expand Down Expand Up @@ -1035,7 +1063,6 @@ void CClientDlg::OnTimerBuffersLED()

// update the buffer LED and the general settings dialog, too
ledBuffers->SetLight ( eCurStatus );
ClientSettingsDlg.SetStatus ( eCurStatus );
}

void CClientDlg::OnTimerPing()
Expand Down Expand Up @@ -1073,8 +1100,9 @@ void CClientDlg::OnPingTimeResult ( int iPingTime )
if ( ClientSettingsDlg.isVisible() )
{
// set ping time result to general settings dialog
ClientSettingsDlg.SetPingTimeResult ( iPingTime, iOverallDelayMs, eOverallDelayLEDColor );
ClientSettingsDlg.UpdateUploadRate();
}
SetPingTime ( iPingTime, iOverallDelayMs, eOverallDelayLEDColor );

// update delay LED on the main window
ledDelay->SetLight ( eOverallDelayLEDColor );
Expand Down Expand Up @@ -1224,7 +1252,12 @@ OnTimerStatus();
// reset LEDs
ledBuffers->Reset();
ledDelay->Reset();
ClientSettingsDlg.ResetStatusAndPingLED();

// clear text labels with client parameters
lblPingVal->setText ( "---" );
lblPingUnit->setText ( "" );
lblDelayVal->setText ( "---" );
lblDelayUnit->setText ( "" );

// clear mixer board (remove all faders)
MainMixerBoard->HideAll();
Expand Down Expand Up @@ -1378,3 +1411,25 @@ void CClientDlg::SetMixerBoardDeco ( const ERecorderState newRecorderState, cons
}
}
}

void CClientDlg::SetPingTime ( const int iPingTime, const int iOverallDelayMs, const CMultiColorLED::ELightColor eOverallDelayLEDColor )
{
// apply values to GUI labels, take special care if ping time exceeds
// a certain value
if ( iPingTime > 500 )
{
const QString sErrorText = "<font color=\"red\"><b>&#62;500</b></font>";
lblPingVal->setText ( sErrorText );
lblDelayVal->setText ( sErrorText );
}
else
{
lblPingVal->setText ( QString().setNum ( iPingTime ) );
lblDelayVal->setText ( QString().setNum ( iOverallDelayMs ) );
}
lblPingUnit->setText ( "ms" );
lblDelayUnit->setText ( "ms" );

// set current LED status
ledDelay->SetLight ( eOverallDelayLEDColor );
}
1 change: 1 addition & 0 deletions src/clientdlg.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ class CClientDlg : public CBaseDlg, private Ui_CClientDlgBase
void Connect ( const QString& strSelectedAddress, const QString& strMixerBoardLabel );
void Disconnect();
void ManageDragNDrop ( QDropEvent* Event, const bool bCheckAccept );
void SetPingTime ( const int iPingTime, const int iOverallDelayMs, const CMultiColorLED::ELightColor eOverallDelayLEDColor );

CClient* pClient;
CClientSettings* pSettings;
Expand Down
Loading