re-introduce PROTMESSID_OPUS_SUPPORTED message to support older client versions

This commit is contained in:
Volker Fischer 2020-04-06 17:17:49 +02:00
parent d12877dc8c
commit 321f286a6d
3 changed files with 15 additions and 1 deletions

View file

@ -350,6 +350,7 @@ void CChannel::OnNetTranspPropsReceived ( CNetworkTransportProps NetworkTranspor
if ( ( NetworkTransportProps.eAudioCodingType != CT_OPUS ) &&
( NetworkTransportProps.eAudioCodingType != CT_OPUS64 ) )
{
Protocol.CreateOpusSupportedMes();
return;
}

View file

@ -154,6 +154,12 @@ MESSAGES (with connection)
+---------------------+
// #### COMPATIBILITY OLD VERSION, TO BE REMOVED ####
- PROTMESSID_OPUS_SUPPORTED: Informs that OPUS codec is supported
note: does not have any data -> n = 0
CONNECTION LESS MESSAGES
------------------------
@ -1222,6 +1228,12 @@ bool CProtocol::EvaluateLicenceRequiredMes ( const CVector<uint8_t>& vecData )
return false; // no error
}
void CProtocol::CreateOpusSupportedMes()
{
CreateAndSendMessage ( PROTMESSID_OPUS_SUPPORTED,
CVector<uint8_t> ( 0 ) );
}
// Connection less messages ----------------------------------------------------
void CProtocol::CreateCLPingMes ( const CHostAddress& InetAddr, const int iMs )

View file

@ -52,7 +52,7 @@
#define PROTMESSID_REQ_CHANNEL_INFOS 23 // request channel infos for fader tag
#define PROTMESSID_CONN_CLIENTS_LIST 24 // channel infos for connected clients
#define PROTMESSID_CHANNEL_INFOS 25 // set channel infos
#define PROTMESSID_OPUS_SUPPORTED 26 // OLD (not used anymore)
#define PROTMESSID_OPUS_SUPPORTED 26 // tells that OPUS codec is supported
#define PROTMESSID_LICENCE_REQUIRED 27 // licence required
// message IDs of connection less messages (CLM)
@ -101,6 +101,7 @@ public:
void CreateNetwTranspPropsMes ( const CNetworkTransportProps& NetTrProps );
void CreateReqNetwTranspPropsMes();
void CreateLicenceRequiredMes ( const ELicenceType eLicenceType );
void CreateOpusSupportedMes();
void CreateCLPingMes ( const CHostAddress& InetAddr, const int iMs );
void CreateCLPingWithNumClientsMes ( const CHostAddress& InetAddr,