Add client-side handling for channel levels

This commit is contained in:
Peter L Jones 2020-03-29 22:42:04 +01:00
parent 36e54f4da7
commit 30c4e006b6
4 changed files with 24 additions and 0 deletions

View File

@ -192,6 +192,10 @@ CClient::CClient ( const quint16 iPortNumber,
SIGNAL ( CLVersionAndOSReceived ( CHostAddress, COSUtil::EOpSystemType, QString ) ) );
#endif
QObject::connect ( &ConnLessProtocol,
SIGNAL ( CLChannelLevelListReceived ( CHostAddress, CVector<uint16_t> ) ),
this, SLOT ( OnCLChannelLevelListReceived ( CHostAddress, CVector<uint16_t> ) ) );
// other
QObject::connect ( &Sound, SIGNAL ( ReinitRequest ( int ) ),
this, SLOT ( OnSndCrdReinitRequest ( int ) ) );
@ -610,6 +614,12 @@ void CClient::OnSndCrdReinitRequest ( int iSndCrdResetType )
}
}
void CClient::OnCLChannelLevelListReceived ( CHostAddress InetAddr,
CVector<uint16_t> vecLevelList )
{
emit CLChannelLevelListReceived ( InetAddr, vecLevelList );
}
void CClient::Start()
{
// always use the OPUS codec

View File

@ -402,6 +402,9 @@ public slots:
void OnSndCrdReinitRequest ( int iSndCrdResetType );
void OnCLChannelLevelListReceived ( CHostAddress InetAddr,
CVector<uint16_t> vecLevelList );
signals:
void ConClientListMesReceived ( CVector<CChannelInfo> vecChanInfo );
void ChatTextReceived ( QString strChatText );
@ -424,6 +427,9 @@ signals:
QString strVersion );
#endif
void CLChannelLevelListReceived ( CHostAddress InetAddr,
CVector<uint16_t> vecLevelList );
void Disconnected();
void ControllerInFaderLevel ( int iChannelIdx, int iValue );
};

View File

@ -486,6 +486,10 @@ CClientDlg::CClientDlg ( CClient* pNCliP,
SIGNAL ( ControllerInFaderLevel ( int, int ) ),
this, SLOT ( OnControllerInFaderLevel ( int, int ) ) );
QObject::connect ( pClient,
SIGNAL ( CLChannelLevelListReceived ( CHostAddress, CVector<uint16_t> ) ),
this, SLOT ( OnCLChannelLevelListReceived ( CHostAddress, CVector<uint16_t> ) ) );
#ifdef ENABLE_CLIENT_VERSION_AND_OS_DEBUGGING
QObject::connect ( pClient,
SIGNAL ( CLVersionAndOSReceived ( CHostAddress, COSUtil::EOpSystemType, QString ) ),

View File

@ -192,6 +192,10 @@ public slots:
CVector<CChannelInfo> vecChanInfo )
{ ConnectDlg.SetConnClientsList ( InetAddr, vecChanInfo ); }
void OnCLChannelLevelListReceived ( CHostAddress /* unused */,
CVector<uint16_t> vecLevelList )
{ MainMixerBoard->SetChannelLevels ( vecLevelList ); }
void OnConnectDlgAccepted();
void OnDisconnected();