diff --git a/ChangeLog b/ChangeLog index 06b8482b..a3ba93e1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -11,6 +11,7 @@ - fixed low-res icon issue (Ticket #28) +TODO insert licence setting in server dialog -> on per default TODO support OPUS 64 in the server as a first step towards official 64 samples frame size support @@ -25,8 +26,6 @@ TODO client: larger sound card buffers are managed by conversion buffer, not in TODO #12 A server in the same NAT region as the client is not visible (https://sourceforge.net/p/llcon/bugs/12/) -TODO #71 Increase "stability" of Connection Setup server list - TODO update text in CAboutDlg TODO mixer faders linear -> log gain is better diff --git a/src/client.cpp b/src/client.cpp index 70b5dd40..05769f00 100755 --- a/src/client.cpp +++ b/src/client.cpp @@ -52,6 +52,7 @@ CClient::CClient ( const quint16 iPortNumber, eAudioQuality ( AQ_NORMAL ), eAudioChannelConf ( CC_MONO ), bIsInitializationPhase ( true ), + bMuteInputAndOutput ( false ), Socket ( &Channel, iPortNumber ), Sound ( AudioCallback, this, iCtrlMIDIChannel, bNoAutoJackConnect ), iAudioInFader ( AUD_FADER_IN_MIDDLE ), @@ -820,8 +821,9 @@ void CClient::Init() 2 ); } - // reset initialization phase flag + // reset initialization phase flag and mute flag bIsInitializationPhase = true; + bMuteInputAndOutput = false; } void CClient::AudioCallback ( CVector& psData, void* arg ) @@ -842,6 +844,12 @@ static CTimingMeas JitterMeas ( 1000, "test2.dat" ); JitterMeas.Measure(); */ + // mute input if requested + if ( bMuteInputAndOutput ) + { + vecsStereoSndCrd.Reset ( 0 ); + } + // check if a conversion buffer is required or not if ( bSndCrdConversionBufferRequired ) { @@ -869,6 +877,12 @@ JitterMeas.Measure(); // process audio data ProcessAudioDataIntern ( vecsStereoSndCrd ); } + + // mute output if requested + if ( bMuteInputAndOutput ) + { + vecsStereoSndCrd.Reset ( 0 ); + } } void CClient::ProcessAudioDataIntern ( CVector& vecsStereoSndCrd ) diff --git a/src/client.h b/src/client.h index f32ad5c0..9daf466c 100755 --- a/src/client.h +++ b/src/client.h @@ -247,6 +247,8 @@ public: bool GetFraSiFactDefSupported() { return bFraSiFactDefSupported; } bool GetFraSiFactSafeSupported() { return bFraSiFactSafeSupported; } + void SetMuteInputAndOutputState ( const bool bDoMute ) { bMuteInputAndOutput = bDoMute; } + void SetRemoteChanGain ( const int iId, const double dGain ) { Channel.SetRemoteChanGain ( iId, dGain ); } @@ -331,6 +333,7 @@ protected: EAudioQuality eAudioQuality; EAudChanConf eAudioChannelConf; bool bIsInitializationPhase; + bool bMuteInputAndOutput; CVector vecCeltData; CHighPrioSocket Socket; diff --git a/src/clientdlg.cpp b/src/clientdlg.cpp index 6606baf8..802484bd 100755 --- a/src/clientdlg.cpp +++ b/src/clientdlg.cpp @@ -743,7 +743,8 @@ void CClientDlg::OnLicenceRequired ( ELicenceType eLicenceType ) { CLicenceDlg LicenceDlg; -// TODO mute the client + // mute the client + pClient->SetMuteInputAndOutputState ( true ); // Open the licence dialog and check if the licence was accepted. In // case the dialog is just closed or the decline button was pressed, @@ -752,6 +753,9 @@ void CClientDlg::OnLicenceRequired ( ELicenceType eLicenceType ) { Disconnect(); } + + // unmute the client + pClient->SetMuteInputAndOutputState ( false ); } }