From fe338049b2e9e8cce292292c34913346d1d2d7f0 Mon Sep 17 00:00:00 2001 From: Peter L Jones Date: Thu, 11 Jun 2020 20:49:50 +0100 Subject: [PATCH 1/7] Add recorder state to console --- src/server.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/server.cpp b/src/server.cpp index e52aa3e8..f968d979 100755 --- a/src/server.cpp +++ b/src/server.cpp @@ -240,6 +240,7 @@ CServer::CServer ( const int iNewMaxNumChan, Logging ( iMaxDaysHistory ), iFrameCount ( 0 ), JamRecorder ( strRecordingDirName ), + bEnableRecording ( false ), bWriteStatusHTMLFile ( false ), HighPrecisionTimer ( bNUseDoubleSystemFrameSize ), ServerListManager ( iPortNumber, @@ -405,7 +406,7 @@ CServer::CServer ( const int iNewMaxNumChan, if ( !strRecordingDirName.isEmpty() ) { bRecorderInitialised = JamRecorder.Init ( this, iServerFrameSizeSamples ); - bEnableRecording = bRecorderInitialised; + SetEnableRecording ( bRecorderInitialised ); } // enable all channels (for the server all channel must be enabled the @@ -665,6 +666,7 @@ void CServer::OnAboutToQuit() void CServer::OnHandledSignal ( int sigNum ) { +qDebug() << "OnHandledSignal" << sigNum; #ifdef _WIN32 // Windows does not actually get OnHandledSignal triggered QCoreApplication::instance()->exit(); @@ -705,7 +707,12 @@ void CServer::SetEnableRecording ( bool bNewEnableRecording ) { if ( bRecorderInitialised ) { + // note that this block executes regardless of whether + // what appears to be a change is being applied, to ensure + // the requested state is the result + bEnableRecording = bNewEnableRecording; + qInfo() << "Recording state" << ( bEnableRecording ? "enabled" : "disabled" ); if ( !bEnableRecording ) { From e1b982c34c3c86999080755feac3b5eadd0c6f47 Mon Sep 17 00:00:00 2001 From: Volker Fischer Date: Sat, 13 Jun 2020 08:20:03 +0200 Subject: [PATCH 2/7] merge fixes --- src/server.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/server.cpp b/src/server.cpp index f968d979..1df29a55 100755 --- a/src/server.cpp +++ b/src/server.cpp @@ -666,7 +666,10 @@ void CServer::OnAboutToQuit() void CServer::OnHandledSignal ( int sigNum ) { -qDebug() << "OnHandledSignal" << sigNum; + // show the signal number on the command line (note that this does not work for the Windows command line) +// TODO we should use the ConsoleWriterFactory() instead of qDebug() + qDebug() << "OnHandledSignal: " << sigNum; + #ifdef _WIN32 // Windows does not actually get OnHandledSignal triggered QCoreApplication::instance()->exit(); @@ -710,9 +713,12 @@ void CServer::SetEnableRecording ( bool bNewEnableRecording ) // note that this block executes regardless of whether // what appears to be a change is being applied, to ensure // the requested state is the result - bEnableRecording = bNewEnableRecording; - qInfo() << "Recording state" << ( bEnableRecording ? "enabled" : "disabled" ); + +#if QT_VERSION >= QT_VERSION_CHECK(5, 5, 0) +// TODO we should use the ConsoleWriterFactory() instead of qInfo() + qInfo() << "Recording state " << ( bEnableRecording ? "enabled" : "disabled" ); +#endif if ( !bEnableRecording ) { From e4b01fa39511ac3931e37679992185366ef14a54 Mon Sep 17 00:00:00 2001 From: Volker Fischer Date: Sat, 13 Jun 2020 08:31:28 +0200 Subject: [PATCH 3/7] prepare for pull request: #356 --- src/audiomixerboard.cpp | 12 ++++++------ src/audiomixerboard.h | 5 +++-- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/audiomixerboard.cpp b/src/audiomixerboard.cpp index 127711e6..5753cbab 100644 --- a/src/audiomixerboard.cpp +++ b/src/audiomixerboard.cpp @@ -314,7 +314,7 @@ void CChannelFader::Reset() plblInstrument->setToolTip ( "" ); plblCountryFlag->setVisible ( false ); plblCountryFlag->setToolTip ( "" ); - strReceivedName = ""; + cReceivedChanInfo = CChannelInfo(); SetupFaderTag ( SL_NOT_SET ); // set a defined tool tip time out @@ -438,15 +438,15 @@ void CChannelFader::SetChannelLevel ( const uint16_t iLevel ) void CChannelFader::SetChannelInfos ( const CChannelInfo& cChanInfo ) { + // store received channel info + cReceivedChanInfo = cChanInfo; + // init properties for the tool tip int iTTInstrument = CInstPictures::GetNotUsedInstrument(); QLocale::Country eTTCountry = QLocale::AnyCountry; // Label text -------------------------------------------------------------- - // store original received name - strReceivedName = cChanInfo.strName; - // break text at predefined position const int iBreakPos = MAX_LEN_FADER_TAG / 2; @@ -521,9 +521,9 @@ void CChannelFader::SetChannelInfos ( const CChannelInfo& cChanInfo ) QString strToolTip = ""; // alias/name - if ( !strReceivedName.isEmpty() ) + if ( !cChanInfo.strName.isEmpty() ) { - strToolTip += "

" + tr ( "Alias/Name" ) + "

" + strReceivedName; + strToolTip += "

" + tr ( "Alias/Name" ) + "

" + cChanInfo.strName; } // instrument diff --git a/src/audiomixerboard.h b/src/audiomixerboard.h index 1e955ccd..09aeffad 100644 --- a/src/audiomixerboard.h +++ b/src/audiomixerboard.h @@ -49,7 +49,8 @@ class CChannelFader : public QObject public: CChannelFader ( QWidget* pNW ); - QString GetReceivedName() { return strReceivedName; } + QString GetReceivedName() { return cReceivedChanInfo.strName; } + int GetReceivedInstrument() { return cReceivedChanInfo.iInstrument; } void SetChannelInfos ( const CChannelInfo& cChanInfo ); void Show() { pFrame->show(); } void Hide() { pFrame->hide(); } @@ -101,7 +102,7 @@ protected: QLabel* plblInstrument; QLabel* plblCountryFlag; - QString strReceivedName; + CChannelInfo cReceivedChanInfo; bool bOtherChannelIsSolo; bool bIsMyOwnFader; From b078bfd7b8b6d0df2e0af14fa5ad6b97f3dd5d3b Mon Sep 17 00:00:00 2001 From: Volker Fischer Date: Sat, 13 Jun 2020 08:51:05 +0200 Subject: [PATCH 4/7] further preparation for #356 --- src/audiomixerboard.cpp | 17 ++++++++++++++--- src/audiomixerboard.h | 4 +++- src/clientdlg.h | 2 +- src/util.h | 8 ++++++++ 4 files changed, 26 insertions(+), 5 deletions(-) diff --git a/src/audiomixerboard.cpp b/src/audiomixerboard.cpp index 5753cbab..88b198f3 100644 --- a/src/audiomixerboard.cpp +++ b/src/audiomixerboard.cpp @@ -768,20 +768,31 @@ void CAudioMixerBoard::HideAll() iMyChannelID = INVALID_INDEX; // use original order of channel (by server ID) - ChangeFaderOrder ( false ); + ChangeFaderOrder ( false, ST_BY_NAME ); // emit status of connected clients emit NumClientsChanged ( 0 ); // -> no clients connected } -void CAudioMixerBoard::ChangeFaderOrder ( const bool bDoSort ) +void CAudioMixerBoard::ChangeFaderOrder ( const bool bDoSort, + const EChSortType eChSortType ) { // create a pair list of lower strings and fader ID for each channel QList > PairList; for ( int i = 0; i < MAX_NUM_CHANNELS; i++ ) { - PairList << QPair ( vecpChanFader[i]->GetReceivedName().toLower(), i ); + if ( eChSortType == ST_BY_NAME ) + { + PairList << QPair ( vecpChanFader[i]->GetReceivedName().toLower(), i ); + } + else // ST_BY_INSTRUMENT + { + // note that the sorting will not be the same as we would use QPair + // but this is not a problem since the order of the instrument IDs are arbitrary + // anyway + PairList << QPair ( QString::number ( vecpChanFader[i]->GetReceivedInstrument() ), i ); + } } // if requested, sort the channels diff --git a/src/audiomixerboard.h b/src/audiomixerboard.h index 09aeffad..a3321a34 100644 --- a/src/audiomixerboard.h +++ b/src/audiomixerboard.h @@ -147,7 +147,6 @@ public: CAudioMixerBoard ( QWidget* parent = nullptr, Qt::WindowFlags f = nullptr ); void HideAll(); - void ChangeFaderOrder ( const bool bDoSort ); void ApplyNewConClientList ( CVector& vecChanInfo ); void SetServerName ( const QString& strNewServerName ); void SetGUIDesign ( const EGUIDesign eNewDesign ); @@ -160,6 +159,9 @@ public: void SetFaderLevel ( const int iChannelIdx, const int iValue ); + void ChangeFaderOrder ( const bool bDoSort, + const EChSortType eChSortType ); + void SetChannelLevels ( const CVector& vecChannelLevel ); // settings diff --git a/src/clientdlg.h b/src/clientdlg.h index 2489ed33..27531c83 100755 --- a/src/clientdlg.h +++ b/src/clientdlg.h @@ -152,7 +152,7 @@ public slots: void OnOpenGeneralSettings() { ShowGeneralSettings(); } void OnOpenChatDialog() { ShowChatWindow(); } void OnOpenAnalyzerConsole() { ShowAnalyzerConsole(); } - void OnSortChannelsByName() { MainMixerBoard->ChangeFaderOrder ( true ); } + void OnSortChannelsByName() { MainMixerBoard->ChangeFaderOrder ( true, ST_BY_NAME ); } void OnSettingsStateChanged ( int value ); void OnChatStateChanged ( int value ); diff --git a/src/util.h b/src/util.h index 935ebd02..6e24312b 100755 --- a/src/util.h +++ b/src/util.h @@ -563,6 +563,14 @@ enum ELicenceType }; +// Channel sort type ----------------------------------------------------------- +enum EChSortType +{ + ST_BY_NAME = 0, + ST_BY_INSTRUMENT = 1 +}; + + // Central server address type ------------------------------------------------- enum ECSAddType { From 14cf23a1d7bbaf8da0f62378efda5669e6baa741 Mon Sep 17 00:00:00 2001 From: Volker Fischer Date: Sat, 13 Jun 2020 09:27:31 +0200 Subject: [PATCH 5/7] fix: Jamulus Server window too wide #357 --- src/serverdlgbase.ui | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/serverdlgbase.ui b/src/serverdlgbase.ui index e00bb4db..de77a8bd 100755 --- a/src/serverdlgbase.ui +++ b/src/serverdlgbase.ui @@ -69,9 +69,20 @@ + + + + + + + + STATUS + + + @@ -88,13 +99,6 @@ - - - - STATUS - - - From ff31b99dc35fb9065d3c8fdaeb6b3375cc608ba0 Mon Sep 17 00:00:00 2001 From: Volker Fischer Date: Sat, 13 Jun 2020 09:29:51 +0200 Subject: [PATCH 6/7] added Genre label --- src/serverdlgbase.ui | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/serverdlgbase.ui b/src/serverdlgbase.ui index de77a8bd..418a07c3 100755 --- a/src/serverdlgbase.ui +++ b/src/serverdlgbase.ui @@ -7,7 +7,7 @@ 0 0 588 - 415 + 419 @@ -73,6 +73,13 @@ + + + + Genre + + + From 16dc091b48323e95bbc1f911ebd3f83d9b0fcb9d Mon Sep 17 00:00:00 2001 From: Jonathan Date: Sat, 13 Jun 2020 08:58:20 +0100 Subject: [PATCH 7/7] Update for sort order Also a slight clarification --- src/res/homepage/manual.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/res/homepage/manual.md b/src/res/homepage/manual.md index 34dfe39d..c88aa61c 100644 --- a/src/res/homepage/manual.md +++ b/src/res/homepage/manual.md @@ -93,7 +93,7 @@ in a direction where the label above the fader shows L -x, where x is the curren In the audio mixer frame, a fader is shown for each connected client at the server (including yourself). The faders allow you to adjust the level of what you hear without affecting what others hear. -The VU meter shows the input level at the server - that is, the sound you are sending. +The VU meter shows the input level at the server - that is, the sound being sent. If you have set your Audio Channel to Stereo or Stereo Out in your Settings, you will also see a pan control. @@ -103,6 +103,7 @@ Using the **Mute button** prevents the indicated channel being heard in your loc The **Solo button** allows you to hear one or more musicians on their own. Those not soloed will be muted. Note also that those musicians who are not soloed will see a "muted" icon above your fader. +Channels are listed left to right in the order that clients connect until they leave, at which point their "slot" is filled by the next new arrival. You can change the sort order using the Edit option in the application menu.