Ref T730, Ref T739, first implementation of "Mute" for CAfvClient

This commit is contained in:
Klaus Basan
2019-10-10 02:29:19 +02:00
committed by Mat Sutcliffe
parent b632232566
commit 11a3fa873d
2 changed files with 10 additions and 4 deletions

View File

@@ -229,8 +229,14 @@ namespace BlackCore
if (!m_voiceClient) { return; }
if (this->isMuted() == muted) { return; } // avoid roundtrips / unnecessary signals
if (m_voiceClient->isMuted() == muted) { return; }
if (muted)
{
const int nv = m_voiceClient->getNormalizedOutputVolume();
m_outVolumeBeforeMute = nv;
}
m_voiceClient->setMuted(muted);
if (!muted) { m_voiceClient->setNormalizedOutputVolume(m_outVolumeBeforeMute); }
// signal
emit this->changedMute(muted);