mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-06 18:25:37 +08:00
Ref T730, Ref T739, first implementation of "Mute" for CAfvClient
This commit is contained in:
committed by
Mat Sutcliffe
parent
b632232566
commit
11a3fa873d
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user