From a8651df25ddfeaa73a5520cd4bdb124fa558c7b4 Mon Sep 17 00:00:00 2001 From: Volker Fischer Date: Tue, 7 Jul 2020 16:24:35 +0200 Subject: [PATCH 1/7] updates --- ChangeLog | 7 +++++-- src/res/translation/translation_de_DE.qm | Bin 104292 -> 104357 bytes src/res/translation/translation_de_DE.ts | 6 +++--- src/res/translation/translation_es_ES.qm | Bin 104235 -> 104733 bytes src/res/translation/translation_es_ES.ts | 6 +++--- src/res/translation/translation_fr_FR.ts | 6 +++--- src/res/translation/translation_it_IT.ts | 6 +++--- src/res/translation/translation_nl_NL.ts | 6 +++--- src/res/translation/translation_pl_PL.ts | 6 +++--- src/res/translation/translation_pt_BR.ts | 6 +++--- src/res/translation/translation_pt_PT.ts | 6 +++--- src/res/translation/translation_sv_SE.ts | 6 +++--- 12 files changed, 32 insertions(+), 29 deletions(-) diff --git a/ChangeLog b/ChangeLog index f12a6da4..5d649cde 100644 --- a/ChangeLog +++ b/ChangeLog @@ -25,11 +25,14 @@ TODO add new register message which contains version and, e.g., max number of clients -TODO Inconsistency between Input meter and Audio mixer meter #423 - TODO improve settings management -> move settings class in client/server classes, move actual settings variables TODO store recorder settings (#313) +TODO Inconsistency between Input meter and Audio mixer meter #423 + + + + diff --git a/src/res/translation/translation_de_DE.qm b/src/res/translation/translation_de_DE.qm index ece9d794e45e1be0faeb5f2c06d704ec80b7ee07..4a23706ccd83475b1426d4beb0719e338d2046fc 100644 GIT binary patch delta 475 zcmXAkO-Pdg9EbnE_ubxi@8>qzcrjR0v1|vGT`~h(LAgHIcF;5r1JMmh*eq(%p=FYG ztE4|Mqc4&qDr#7SUW{lAk3zVEgbvamNXkP-7=s3#9)9o~e$U2hX(lgCdN4Wbm4RjU zAu62pa|$_kgiaJ%2{pZRa{pbz)ko|VehcU7*bvjg<-MF0!sF4_FG zTcT9_S+zfkzQ4PP`Yo}3ewZ*i%!a*1O&Q{BrkybHfREV^si!@*_|qSR{z1NJU&0{A zB@21ZNS#8Wju)!q7MG+Z3~)sX;W>B6X`#>JSMnm(IO7;qzR14gF+$IIt~f$C!yQVS zJ1S3=-xKZV@;yCD=qvDq5<@4Kly*7#W}DFcnGH3ME?!WV+~3v2&<4?!H8rtaeUdHk zLoI|AUe$&IZ#CNsi>T|M<`7R2*#yni*g}ZswYJCwqRoI7K5~ta32;ikB%}}USG`<2 zuHRWF!kDG=K9fj!so$^vKo}45s&N}JPMP6q=sVMoG?&aKjBv$l#V2ld`m0e9XHP@6 z+01Uv5Cs=a_6`ts-7ug0c}6(g@SnXR7o9omaNKnizphWa=B8aJcXQ*`o?J~5p1H9k H)`R~5ScI3q delta 415 zcmV;Q0bu^6uLk6<29Oj1h_Mw10Rfwn9RW@PXy%h`0hbXJ07=6y009zL07^EM00Dkw zlNAE?0&nM&4FhfhckPpX14jX0lf?s{0k4x~1aAR5lhp(t8Mgxl#qR(Ceu)De`yK!Q zU>5@+xM~0ae=(B{1uhC~)B~|~IRF8LW0OS%J_=OZ1YM-=00CeslZ^$>0VOi03pY)3008VM3r9hK00DIHlXVPs z0&V}3?F`=;OAM0Z0004i-VBo{4gdfNs|=eVzyJY*_><)gj{z2wbq+@XDwDkq9|1L! z-3})KHj@PpF9Dg8H4h&FrIS?;RswwVldTUP0#?eC%@3CW!INbWL;<^lst~uT5CPv* Jx58xs<1rP=h}{4H diff --git a/src/res/translation/translation_de_DE.ts b/src/res/translation/translation_de_DE.ts index 42c9a5f6..bac96ff9 100644 --- a/src/res/translation/translation_de_DE.ts +++ b/src/res/translation/translation_de_DE.ts @@ -3220,17 +3220,17 @@ QCoreApplication - + , Version , Version - + Internet Jam Session Software Internet Jam Session Software - + Released under the GNU General Public License (GPL) Unter der GNU General Public License (GPL) diff --git a/src/res/translation/translation_es_ES.qm b/src/res/translation/translation_es_ES.qm index 22b9bdf0e09f532574dd22ad7a2dde204ab2a802..a8eebce72d463e8311d89f93f2cf626a93112bd9 100644 GIT binary patch delta 3807 zcmai0X;>83wq2*XtGlbZx*9YHc%?zqh(-Yw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vULCY1-}Dvh-n zK*bHk(PRR0x+{)lNr3%f#l^-57IIhV79Rj>*5f})5BU$^(>KMvoNVHI*|OK*WPW>9 znU?;YrZ``TR%MfDhbaq|(R*?E%7U^~pyO*Leg<7xTC7tnHb1quKuP{YKQH;*SpI2$}JzNcu3H4K?Y3UL}}m~fM*To`4TxSTNkx*_7f=SasULtIgJ zI$qxyR&3!Y5{DXAYNi3|6Nb$V#?xS`45ulr(RaGxw3+7Hqu6jgF`X2dYq(+afRb>t z;nhb!;7^^Q%1VJPYdyzM-E|Bp?uwy0a~fFNr)0k+Zil2gK{pO QCoreApplication - + , Version , Versión - + Internet Jam Session Software Internet Jam Session Software - + Released under the GNU General Public License (GPL) Publicado bajo la GNU General Public License (GPL) diff --git a/src/res/translation/translation_fr_FR.ts b/src/res/translation/translation_fr_FR.ts index a15c8831..052542ef 100644 --- a/src/res/translation/translation_fr_FR.ts +++ b/src/res/translation/translation_fr_FR.ts @@ -3232,17 +3232,17 @@ QCoreApplication - + , Version , version - + Internet Jam Session Software Logiciel de bœuf sur Internet - + Released under the GNU General Public License (GPL) Publié sous la licence publique générale GNU (GPL) diff --git a/src/res/translation/translation_it_IT.ts b/src/res/translation/translation_it_IT.ts index d9c55016..1f8f6cf6 100644 --- a/src/res/translation/translation_it_IT.ts +++ b/src/res/translation/translation_it_IT.ts @@ -3180,17 +3180,17 @@ QCoreApplication - + , Version Versione, Versione - + Internet Jam Session Software Programma per Jam Session su Internet - + Released under the GNU General Public License (GPL) Rilasciato sotto licensa GNU General Public License (GPL) diff --git a/src/res/translation/translation_nl_NL.ts b/src/res/translation/translation_nl_NL.ts index 67a78624..dbf39e47 100644 --- a/src/res/translation/translation_nl_NL.ts +++ b/src/res/translation/translation_nl_NL.ts @@ -3180,17 +3180,17 @@ QCoreApplication - + , Version , Versie - + Internet Jam Session Software Internet Jamsessie Software - + Released under the GNU General Public License (GPL) Gereleased onder de GNU General Public License (GPL) diff --git a/src/res/translation/translation_pl_PL.ts b/src/res/translation/translation_pl_PL.ts index 9b337657..1cbd7c50 100644 --- a/src/res/translation/translation_pl_PL.ts +++ b/src/res/translation/translation_pl_PL.ts @@ -2823,17 +2823,17 @@ nie jestem pewna QCoreApplication - + , Version - + Internet Jam Session Software - + Released under the GNU General Public License (GPL) diff --git a/src/res/translation/translation_pt_BR.ts b/src/res/translation/translation_pt_BR.ts index 86cc972f..2e820f15 100644 --- a/src/res/translation/translation_pt_BR.ts +++ b/src/res/translation/translation_pt_BR.ts @@ -3218,17 +3218,17 @@ QCoreApplication - + , Version , Versão - + Internet Jam Session Software Programa de Jam Sessions pela Internet - + Released under the GNU General Public License (GPL) Lançado sob a Licença Pública Geral GNU (GPL) diff --git a/src/res/translation/translation_pt_PT.ts b/src/res/translation/translation_pt_PT.ts index 41529c17..1fb8ccf3 100644 --- a/src/res/translation/translation_pt_PT.ts +++ b/src/res/translation/translation_pt_PT.ts @@ -3216,17 +3216,17 @@ QCoreApplication - + , Version , Versão - + Internet Jam Session Software Programa de Jam Sessions pela Internet - + Released under the GNU General Public License (GPL) Lançado sob a Licença Pública Geral GNU (GPL) diff --git a/src/res/translation/translation_sv_SE.ts b/src/res/translation/translation_sv_SE.ts index d991efb5..029d9bc8 100644 --- a/src/res/translation/translation_sv_SE.ts +++ b/src/res/translation/translation_sv_SE.ts @@ -2792,17 +2792,17 @@ QCoreApplication - + , Version - + Internet Jam Session Software - + Released under the GNU General Public License (GPL) From e0750d8b1a47750c7944f0efd46083ff76e1f9f0 Mon Sep 17 00:00:00 2001 From: Volker Fischer Date: Tue, 7 Jul 2020 16:35:00 +0200 Subject: [PATCH 2/7] remove the version label at the bottom of the server GUI since we now have many settings and we want to clean up a bit -> the version can be seen in the About dialog anyway --- src/serverdlg.cpp | 4 ---- src/serverdlgbase.ui | 45 -------------------------------------------- 2 files changed, 49 deletions(-) diff --git a/src/serverdlg.cpp b/src/serverdlg.cpp index 788655c0..7936c333 100755 --- a/src/serverdlg.cpp +++ b/src/serverdlg.cpp @@ -218,10 +218,6 @@ CServerDlg::CServerDlg ( CServer* pNServP, showMinimized(); } - // set text for version and application name - lblNameVersion->setText ( QString ( APP_NAME ) + - tr ( " server " ) + QString ( VERSION ) ); - // set up list view for connected clients lvwClients->setColumnWidth ( 0, 170 ); lvwClients->setColumnWidth ( 1, 200 ); diff --git a/src/serverdlgbase.ui b/src/serverdlgbase.ui index 1754716d..6f3789f3 100755 --- a/src/serverdlgbase.ui +++ b/src/serverdlgbase.ui @@ -236,51 +236,6 @@ - - - - 6 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - TextLabelNameVersion - - - false - - - - - - - Qt::Horizontal - - - QSizePolicy::Expanding - - - - 20 - 20 - - - - - - From 6a7f0a6dc319e3192912119827a3a5162956683b Mon Sep 17 00:00:00 2001 From: Volker Fischer Date: Tue, 7 Jul 2020 18:31:26 +0200 Subject: [PATCH 3/7] add new register message which contains server version --- ChangeLog | 3 +- src/protocol.cpp | 172 ++++++++++++++++++++++++++++++++++++++++++++- src/protocol.h | 11 +++ src/server.cpp | 3 + src/server.h | 9 +++ src/serverlist.cpp | 10 +++ src/serverlist.h | 6 ++ 7 files changed, 210 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5d649cde..b1be0a45 100644 --- a/ChangeLog +++ b/ChangeLog @@ -23,7 +23,7 @@ -TODO add new register message which contains version and, e.g., max number of clients +TODO bug fix: if group is set to disabled, reset "previous level" TODO improve settings management -> move settings class in client/server classes, move actual settings variables TODO store recorder settings (#313) @@ -38,7 +38,6 @@ TODO Inconsistency between Input meter and Audio mixer meter #423 - 3.5.8 (2020-06-30) - bug fix: incorrect selection of UI language (#408) diff --git a/src/protocol.cpp b/src/protocol.cpp index 37a5355d..2480bd64 100755 --- a/src/protocol.cpp +++ b/src/protocol.cpp @@ -289,6 +289,14 @@ CONNECTION LESS MESSAGES necessary, that value will contain the server internal address. +- PROTMESSID_CLM_REGISTER_SERVER_EX: Register a server, providing extended server + information + + +--------------------------------+-------------------------------+ + | PROTMESSID_CLM_REGISTER_SERVER | PROTMESSID_CLM_VERSION_AND_OS | + +--------------------------------+-------------------------------+ + + - PROTMESSID_CLM_UNREGISTER_SERVER: Unregister a server note: does not have any data -> n = 0 @@ -738,6 +746,10 @@ if ( rand() < ( RAND_MAX / 2 ) ) return false; bRet = EvaluateCLRegisterServerMes ( InetAddr, vecbyMesBodyData ); break; + case PROTMESSID_CLM_REGISTER_SERVER_EX: + bRet = EvaluateCLRegisterServerExMes ( InetAddr, vecbyMesBodyData ); + break; + case PROTMESSID_CLM_UNREGISTER_SERVER: bRet = EvaluateCLUnregisterServerMes ( InetAddr ); break; @@ -1466,8 +1478,8 @@ void CProtocol::CreateReqChannelLevelListMes ( const bool bRCL ) { CVector vecData ( 1 ); // 1 byte of data int iPos = 0; // init position pointer - PutValOnStream ( vecData, iPos, - static_cast ( bRCL ), 1 ); + + PutValOnStream ( vecData, iPos, static_cast ( bRCL ), 1 ); CreateAndSendMessage ( PROTMESSID_REQ_CHANNEL_LEVEL_LIST, vecData ); } @@ -1820,6 +1832,162 @@ bool CProtocol::EvaluateCLRegisterServerMes ( const CHostAddress& InetAddr, return false; // no error } +void CProtocol::CreateCLRegisterServerExMes ( const CHostAddress& InetAddr, + const CHostAddress& LInetAddr, + const CServerCoreInfo& ServerInfo ) +{ + int iPos = 0; // init position pointer + + // convert server info strings to utf-8 + const QByteArray strUTF8LInetAddr = LInetAddr.InetAddr.toString().toUtf8(); + const QByteArray strUTF8Name = ServerInfo.strName.toUtf8(); + const QByteArray strUTF8City = ServerInfo.strCity.toUtf8(); + const QByteArray strUTF8Version = QString ( VERSION ).toUtf8(); + + // size of current message body + const int iEntrLen = + 2 /* server internal port number */ + + 2 /* country */ + + 1 /* maximum number of connected clients */ + + 1 /* is permanent flag */ + + 2 /* name utf-8 string size */ + strUTF8Name.size() + + 2 /* server internal address utf-8 string size */ + strUTF8LInetAddr.size() + + 2 /* city utf-8 string size */ + strUTF8City.size() + + 1 /* operating system */ + + 2 /* version utf-8 string size */ + strUTF8Version.size(); + + // build data vector + CVector vecData ( iEntrLen ); + + // port number (2 bytes) + PutValOnStream ( vecData, iPos, static_cast ( LInetAddr.iPort ), 2 ); + + // country (2 bytes) + PutValOnStream ( vecData, iPos, static_cast ( ServerInfo.eCountry ), 2 ); + + // maximum number of connected clients (1 byte) + PutValOnStream ( vecData, iPos, static_cast ( ServerInfo.iMaxNumClients ), 1 ); + + // "is permanent" flag (1 byte) + PutValOnStream ( vecData, iPos, static_cast ( ServerInfo.bPermanentOnline ), 1 ); + + // name + PutStringUTF8OnStream ( vecData, iPos, strUTF8Name ); + + // server internal address (formerly unused topic) + PutStringUTF8OnStream ( vecData, iPos, strUTF8LInetAddr ); + + // city + PutStringUTF8OnStream ( vecData, iPos, strUTF8City ); + + // operating system (1 byte) + PutValOnStream ( vecData, iPos, + static_cast ( COSUtil::GetOperatingSystem() ), 1 ); + + // version + PutStringUTF8OnStream ( vecData, iPos, strUTF8Version ); + + CreateAndImmSendConLessMessage ( PROTMESSID_CLM_REGISTER_SERVER, + vecData, + InetAddr ); +} + +bool CProtocol::EvaluateCLRegisterServerExMes ( const CHostAddress& InetAddr, + const CVector& vecData ) +{ + int iPos = 0; // init position pointer + const int iDataLen = vecData.Size(); + QString sLocHost; // temp string for server internal address + CHostAddress LInetAddr; + CServerCoreInfo RecServerInfo; + + // check size (the first 6 bytes) + if ( iDataLen < 6 ) + { + return true; // return error code + } + + // port number (2 bytes) + LInetAddr.iPort = static_cast ( GetValFromStream ( vecData, iPos, 2 ) ); + + // country (2 bytes) + RecServerInfo.eCountry = static_cast ( GetValFromStream ( vecData, iPos, 2 ) ); + + // maximum number of connected clients (1 byte) + RecServerInfo.iMaxNumClients = static_cast ( GetValFromStream ( vecData, iPos, 1 ) ); + + // "is permanent" flag (1 byte) + RecServerInfo.bPermanentOnline = static_cast ( GetValFromStream ( vecData, iPos, 1 ) ); + + // server name + if ( GetStringFromStream ( vecData, + iPos, + MAX_LEN_SERVER_NAME, + RecServerInfo.strName ) ) + { + return true; // return error code + } + + // server internal address + if ( GetStringFromStream ( vecData, + iPos, + MAX_LEN_IP_ADDRESS, + sLocHost ) ) + { + return true; // return error code + } + + if ( sLocHost.isEmpty() ) + { + // old server, empty "topic", register as local host + LInetAddr.InetAddr.setAddress ( QHostAddress::LocalHost ); + } + else if ( !LInetAddr.InetAddr.setAddress ( sLocHost ) ) + { + return true; // return error code + } + + // server city + if ( GetStringFromStream ( vecData, + iPos, + MAX_LEN_SERVER_CITY, + RecServerInfo.strCity ) ) + { + return true; // return error code + } + + // check size (the next 1 byte) + if ( iDataLen < iPos + 1 ) + { + return true; // return error code + } + + // operating system (1 byte) + const COSUtil::EOpSystemType eOSType = + static_cast ( GetValFromStream ( vecData, iPos, 1 ) ); + + // version text + QString strVersion; + if ( GetStringFromStream ( vecData, + iPos, + MAX_LEN_VERSION_TEXT, + strVersion ) ) + { + return true; // return error code + } + + // check size: all data is read, the position must now be at the end + if ( iPos != iDataLen ) + { + return true; // return error code + } + + // invoke message action + emit CLRegisterServerExReceived ( InetAddr, LInetAddr, RecServerInfo, eOSType, strVersion ); + + return false; // no error +} + void CProtocol::CreateCLUnregisterServerMes ( const CHostAddress& InetAddr ) { CreateAndImmSendConLessMessage ( PROTMESSID_CLM_UNREGISTER_SERVER, diff --git a/src/protocol.h b/src/protocol.h index 2c4a0760..f9ea11aa 100755 --- a/src/protocol.h +++ b/src/protocol.h @@ -79,6 +79,7 @@ #define PROTMESSID_CLM_REQ_CONN_CLIENTS_LIST 1014 // request the connected clients list #define PROTMESSID_CLM_CHANNEL_LEVEL_LIST 1015 // channel level list #define PROTMESSID_CLM_REGISTER_SERVER_RESP 1016 // status of server registration request +#define PROTMESSID_CLM_REGISTER_SERVER_EX 1017 // register server with extended information // lengths of message as defined in protocol.cpp file #define MESS_HEADER_LENGTH_BYTE 7 // TAG (2), ID (2), cnt (1), length (2) @@ -125,6 +126,9 @@ public: void CreateCLRegisterServerMes ( const CHostAddress& InetAddr, const CHostAddress& LInetAddr, const CServerCoreInfo& ServerInfo ); + void CreateCLRegisterServerExMes ( const CHostAddress& InetAddr, + const CHostAddress& LInetAddr, + const CServerCoreInfo& ServerInfo ); void CreateCLUnregisterServerMes ( const CHostAddress& InetAddr ); void CreateCLServerListMes ( const CHostAddress& InetAddr, const CVector vecServerInfo ); @@ -250,6 +254,8 @@ protected: bool EvaluateCLServerFullMes(); bool EvaluateCLRegisterServerMes ( const CHostAddress& InetAddr, const CVector& vecData ); + bool EvaluateCLRegisterServerExMes ( const CHostAddress& InetAddr, + const CVector& vecData ); bool EvaluateCLUnregisterServerMes ( const CHostAddress& InetAddr ); bool EvaluateCLServerListMes ( const CHostAddress& InetAddr, const CVector& vecData ); @@ -315,6 +321,11 @@ signals: void CLRegisterServerReceived ( CHostAddress InetAddr, CHostAddress LInetAddr, CServerCoreInfo ServerInfo ); + void CLRegisterServerExReceived ( CHostAddress InetAddr, + CHostAddress LInetAddr, + CServerCoreInfo ServerInfo, + COSUtil::EOpSystemType eOSType, + QString strVersion ); void CLUnregisterServerReceived ( CHostAddress InetAddr ); void CLServerListReceived ( CHostAddress InetAddr, CVector vecServerInfo ); diff --git a/src/server.cpp b/src/server.cpp index 56739a83..499c57cc 100755 --- a/src/server.cpp +++ b/src/server.cpp @@ -449,6 +449,9 @@ CServer::CServer ( const int iNewMaxNumChan, QObject::connect ( &ConnLessProtocol, &CProtocol::CLRegisterServerReceived, this, &CServer::OnCLRegisterServerReceived ); + QObject::connect ( &ConnLessProtocol, &CProtocol::CLRegisterServerExReceived, + this, &CServer::OnCLRegisterServerExReceived ); + QObject::connect ( &ConnLessProtocol, &CProtocol::CLUnregisterServerReceived, this, &CServer::OnCLUnregisterServerReceived ); diff --git a/src/server.h b/src/server.h index 8def4f9f..08766acb 100755 --- a/src/server.h +++ b/src/server.h @@ -462,6 +462,15 @@ public slots: ServerListManager.CentralServerRegisterServer ( InetAddr, LInetAddr, ServerInfo ); } + void OnCLRegisterServerExReceived ( CHostAddress InetAddr, + CHostAddress LInetAddr, + CServerCoreInfo ServerInfo, + COSUtil::EOpSystemType eOSType, + QString strVersion ) + { + ServerListManager.CentralServerRegisterServerEx ( InetAddr, LInetAddr, ServerInfo, eOSType, strVersion ); + } + void OnCLRegisterServerResp ( CHostAddress /* unused */, ESvrRegResult eResult ) { diff --git a/src/serverlist.cpp b/src/serverlist.cpp index 78074d87..e215835c 100755 --- a/src/serverlist.cpp +++ b/src/serverlist.cpp @@ -340,6 +340,16 @@ void CServerListManager::OnTimerPollList() } } +void CServerListManager::CentralServerRegisterServerEx ( const CHostAddress& InetAddr, + const CHostAddress& LInetAddr, + const CServerCoreInfo& ServerInfo, + const COSUtil::EOpSystemType , + const QString& ) +{ +// TODO right now we do not make use of the additional operating system and version number informations +CentralServerRegisterServer ( InetAddr, LInetAddr, ServerInfo ); +} + void CServerListManager::CentralServerRegisterServer ( const CHostAddress& InetAddr, const CHostAddress& LInetAddr, const CServerCoreInfo& ServerInfo ) diff --git a/src/serverlist.h b/src/serverlist.h index f26003bf..e2f0ff85 100755 --- a/src/serverlist.h +++ b/src/serverlist.h @@ -147,6 +147,12 @@ public: const CHostAddress& LInetAddr, const CServerCoreInfo& ServerInfo ); + void CentralServerRegisterServerEx ( const CHostAddress& InetAddr, + const CHostAddress& LInetAddr, + const CServerCoreInfo& ServerInfo, + const COSUtil::EOpSystemType , + const QString& ); + void CentralServerUnregisterServer ( const CHostAddress& InetAddr ); void CentralServerQueryServerList ( const CHostAddress& InetAddr ); From b15e61353b7bdc5e041bee699b29d784dd06c02e Mon Sep 17 00:00:00 2001 From: Volker Fischer Date: Tue, 7 Jul 2020 18:38:13 +0200 Subject: [PATCH 4/7] bug fix --- src/protocol.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/protocol.cpp b/src/protocol.cpp index 2480bd64..e54a4272 100755 --- a/src/protocol.cpp +++ b/src/protocol.cpp @@ -1887,7 +1887,7 @@ void CProtocol::CreateCLRegisterServerExMes ( const CHostAddress& InetAddr, // version PutStringUTF8OnStream ( vecData, iPos, strUTF8Version ); - CreateAndImmSendConLessMessage ( PROTMESSID_CLM_REGISTER_SERVER, + CreateAndImmSendConLessMessage ( PROTMESSID_CLM_REGISTER_SERVER_EX, vecData, InetAddr ); } From 38cdd659e1b702bc41e11ffa44ea22d199af1cc9 Mon Sep 17 00:00:00 2001 From: Volker Fischer Date: Tue, 7 Jul 2020 22:02:44 +0200 Subject: [PATCH 5/7] bug fix: if group is set to disabled, reset "previous level" --- ChangeLog | 7 ++++--- src/audiomixerboard.cpp | 17 ++++++++++++++++- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index b1be0a45..dc80c642 100644 --- a/ChangeLog +++ b/ChangeLog @@ -23,10 +23,11 @@ -TODO bug fix: if group is set to disabled, reset "previous level" - TODO improve settings management -> move settings class in client/server classes, move actual settings variables -TODO store recorder settings (#313) +TODO improve interaction between use of inifile and command line parameters (edited) #120 +(Save client settings on SIGUSR1 #294) +(Add a save action for client and server with a keyboard shortcut #347) +(Save and restore mixer state (fader / mute / solo...) #377) TODO Inconsistency between Input meter and Audio mixer meter #423 diff --git a/src/audiomixerboard.cpp b/src/audiomixerboard.cpp index 379c87eb..1dc2bf6b 100755 --- a/src/audiomixerboard.cpp +++ b/src/audiomixerboard.cpp @@ -503,7 +503,7 @@ void CChannelFader::SetGroupID ( const int iNGroupID ) void CChannelFader::UpdateGroupIDDependencies() { // update the group checkbox according the current group ID setting - pcbGroup->blockSignals ( true ); // make sure no signals as fired + pcbGroup->blockSignals ( true ); // make sure no signals are fired if ( iGroupID == INVALID_INDEX ) { pcbGroup->setCheckState ( Qt::Unchecked ); @@ -524,6 +524,21 @@ void CChannelFader::UpdateGroupIDDependencies() pcbGroup->setText ( strGroupBaseText ); } + // if the group is disable for this fader, reset the previous fader level + if ( iGroupID == INVALID_INDEX ) + { + // for the special case that the fader is all the way down, use a small + // value instead + if ( GetFaderLevel() > 0 ) + { + dPreviousFaderLevel = GetFaderLevel(); + } + else + { + dPreviousFaderLevel = 1; // small value + } + } + // the fader tag border color is set according to the selected group SetupFaderTag ( cReceivedChanInfo.eSkillLevel ); } From 46bb1435a04ec5c28e50890a8129550f90da86ec Mon Sep 17 00:00:00 2001 From: Volker Fischer Date: Tue, 7 Jul 2020 22:07:19 +0200 Subject: [PATCH 6/7] rename variable --- src/audiomixerboard.cpp | 14 +++++++------- src/audiomixerboard.h | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/audiomixerboard.cpp b/src/audiomixerboard.cpp index 1dc2bf6b..0092ca4b 100755 --- a/src/audiomixerboard.cpp +++ b/src/audiomixerboard.cpp @@ -128,8 +128,8 @@ CChannelFader::CChannelFader ( QWidget* pNW ) pMainGrid->addWidget ( pLabelInstBox ); // reset current fader - strGroupBaseText = "Grp"; // this will most probably overwritten by SetGUIDesign() - iInstrPicFixedWidth = INVALID_INDEX; // this will most probably overwritten by SetGUIDesign() + strGroupBaseText = "Grp"; // this will most probably overwritten by SetGUIDesign() + iInstrPicMaxWidth = INVALID_INDEX; // this will most probably overwritten by SetGUIDesign() Reset(); // add help text to controls @@ -228,7 +228,7 @@ void CChannelFader::SetGUIDesign ( const EGUIDesign eNewDesign ) pcbSolo->setText ( tr ( "SOLO" ) ); strGroupBaseText = tr ( "GRP" ); plbrChannelLevel->SetLevelMeterType ( CLevelMeter::MT_LED ); - iInstrPicFixedWidth = INVALID_INDEX; // no instrument picture scaling + iInstrPicMaxWidth = INVALID_INDEX; // no instrument picture scaling break; case GD_SLIMFADER: @@ -243,7 +243,7 @@ void CChannelFader::SetGUIDesign ( const EGUIDesign eNewDesign ) pcbSolo->setText ( tr ( "S" ) ); strGroupBaseText = tr ( "G" ); plbrChannelLevel->SetLevelMeterType ( CLevelMeter::MT_SLIM_BAR ); - iInstrPicFixedWidth = 18; // scale instrument picture to avoid enlarging the width by the picture + iInstrPicMaxWidth = 18; // scale instrument picture to avoid enlarging the width by the picture break; default: @@ -259,7 +259,7 @@ void CChannelFader::SetGUIDesign ( const EGUIDesign eNewDesign ) pcbSolo->setText ( tr ( "Solo" ) ); strGroupBaseText = tr ( "Grp" ); plbrChannelLevel->SetLevelMeterType ( CLevelMeter::MT_BAR ); - iInstrPicFixedWidth = INVALID_INDEX; // no instrument picture scaling + iInstrPicMaxWidth = INVALID_INDEX; // no instrument picture scaling break; } @@ -631,10 +631,10 @@ void CChannelFader::SetChannelInfos ( const CChannelInfo& cChanInfo ) // set correct picture QPixmap pixInstr ( strCurResourceRef ); - if ( ( iInstrPicFixedWidth != INVALID_INDEX ) && ( pixInstr.width() > iInstrPicFixedWidth ) ) + if ( ( iInstrPicMaxWidth != INVALID_INDEX ) && ( pixInstr.width() > iInstrPicMaxWidth ) ) { // scale instrument picture on request (scale to the width with correct aspect ratio) - plblInstrument->setPixmap ( pixInstr.scaledToWidth ( iInstrPicFixedWidth, Qt::SmoothTransformation ) ); + plblInstrument->setPixmap ( pixInstr.scaledToWidth ( iInstrPicMaxWidth, Qt::SmoothTransformation ) ); } else { diff --git a/src/audiomixerboard.h b/src/audiomixerboard.h index 95fd4d61..3ed2c6be 100755 --- a/src/audiomixerboard.h +++ b/src/audiomixerboard.h @@ -119,7 +119,7 @@ protected: double dPreviousFaderLevel; int iGroupID; QString strGroupBaseText; - int iInstrPicFixedWidth; + int iInstrPicMaxWidth; public slots: void OnLevelValueChanged ( int value ) { SendFaderLevelToServer ( value, false ); } From 91d5560f94785cf88ddd950f4a1b82ce8fcab9c5 Mon Sep 17 00:00:00 2001 From: Volker Fischer Date: Wed, 8 Jul 2020 19:17:58 +0200 Subject: [PATCH 7/7] update --- ChangeLog | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index dc80c642..8aea6349 100644 --- a/ChangeLog +++ b/ChangeLog @@ -25,12 +25,8 @@ TODO improve settings management -> move settings class in client/server classes, move actual settings variables TODO improve interaction between use of inifile and command line parameters (edited) #120 -(Save client settings on SIGUSR1 #294) -(Add a save action for client and server with a keyboard shortcut #347) -(Save and restore mixer state (fader / mute / solo...) #377) - -TODO Inconsistency between Input meter and Audio mixer meter #423 - +TODO Save and restore mixer state (fader / mute / solo...) #377 +(Add a save action for client and server with a keyboard shortcut #347) -> should be closed