Merge branch 'master' into master

This commit is contained in:
Alberstein8 2020-06-13 11:29:21 +02:00 committed by GitHub
commit 3dbddc5568
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 74 additions and 29 deletions

View File

@ -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,17 +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;
// store received instrument for sorting
iReceivedInstrument = cChanInfo.iInstrument;
// break text at predefined position
const int iBreakPos = MAX_LEN_FADER_TAG / 2;
@ -524,9 +522,9 @@ void CChannelFader::SetChannelInfos ( const CChannelInfo& cChanInfo )
QString strToolTip = "";
// alias/name
if ( !strReceivedName.isEmpty() )
if ( !cChanInfo.strName.isEmpty() )
{
strToolTip += "<h4>" + tr ( "Alias/Name" ) + "</h4>" + strReceivedName;
strToolTip += "<h4>" + tr ( "Alias/Name" ) + "</h4>" + cChanInfo.strName;
}
// instrument
@ -771,21 +769,33 @@ void CAudioMixerBoard::HideAll()
iMyChannelID = INVALID_INDEX;
// use original order of channel (by server ID)
ChangeFaderOrder ( false );
ChangeFaderOrderByInstrument ( 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<QPair<QString, int> > PairList;
for ( int i = 0; i < MAX_NUM_CHANNELS; i++ )
{
PairList << QPair<QString, int> ( vecpChanFader[i]->GetReceivedName().toLower(), i );
if ( eChSortType == ST_BY_NAME )
{
PairList << QPair<QString, int> ( vecpChanFader[i]->GetReceivedName().toLower(), i );
}
else // ST_BY_INSTRUMENT
{
// note that the sorting will not be the same as we would use QPair<int, int>
// but this is not a problem since the order of the instrument IDs are arbitrary
// anyway
PairList << QPair<QString, int> ( QString::number ( vecpChanFader[i]->GetReceivedInstrument() ), i );
}
}
// if requested, sort the channels

View File

@ -49,8 +49,9 @@ class CChannelFader : public QObject
public:
CChannelFader ( QWidget* pNW );
QString GetReceivedName() { return strReceivedName; }
int GetReceivedInstrument() { return iReceivedInstrument; }
QString GetReceivedName() { return cReceivedChanInfo.strName; }
int GetReceivedInstrument() { return cReceivedChanInfo.iInstrument; }
void SetChannelInfos ( const CChannelInfo& cChanInfo );
void Show() { pFrame->show(); }
void Hide() { pFrame->hide(); }
@ -102,7 +103,7 @@ protected:
QLabel* plblInstrument;
QLabel* plblCountryFlag;
QString strReceivedName;
CChannelInfo cReceivedChanInfo;
int iReceivedInstrument;
@ -150,8 +151,6 @@ public:
CAudioMixerBoard ( QWidget* parent = nullptr, Qt::WindowFlags f = nullptr );
void HideAll();
void ChangeFaderOrder ( const bool bDoSort );
void ChangeFaderOrderByInstrument (const bool bDoSort );
void ApplyNewConClientList ( CVector<CChannelInfo>& vecChanInfo );
void SetServerName ( const QString& strNewServerName );
void SetGUIDesign ( const EGUIDesign eNewDesign );
@ -164,6 +163,9 @@ public:
void SetFaderLevel ( const int iChannelIdx,
const int iValue );
void ChangeFaderOrder ( const bool bDoSort,
const EChSortType eChSortType );
void SetChannelLevels ( const CVector<uint16_t>& vecChannelLevel );
// settings

View File

@ -152,8 +152,8 @@ public slots:
void OnOpenGeneralSettings() { ShowGeneralSettings(); }
void OnOpenChatDialog() { ShowChatWindow(); }
void OnOpenAnalyzerConsole() { ShowAnalyzerConsole(); }
void OnSortChannelsByName() { MainMixerBoard->ChangeFaderOrder ( true ); }
void OnSortChannelsByInstrument() { MainMixerBoard->ChangeFaderOrderByInstrument ( true ); }
void OnSortChannelsByName() { MainMixerBoard->ChangeFaderOrder ( true, ST_BY_NAME ); }
void OnSettingsStateChanged ( int value );
void OnChatStateChanged ( int value );

View File

@ -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.

View File

@ -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,10 @@ void CServer::OnAboutToQuit()
void CServer::OnHandledSignal ( int 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();
@ -705,8 +710,16 @@ 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;
#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 )
{
emit StopRecorder();

View File

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>588</width>
<height>415</height>
<height>419</height>
</rect>
</property>
<property name="windowTitle">
@ -69,9 +69,27 @@
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout">
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>Genre</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="cbxCentServAddrType"/>
</item>
<item>
<widget class="QLabel" name="lblRegSvrStatus">
<property name="text">
<string>STATUS</string>
</property>
</widget>
</item>
<item>
<spacer>
<property name="orientation">
@ -88,13 +106,6 @@
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="lblRegSvrStatus">
<property name="text">
<string>STATUS</string>
</property>
</widget>
</item>
</layout>
</item>
<item>

View File

@ -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
{