Ref T730, function to check range for input/output volume

This commit is contained in:
Klaus Basan
2019-09-29 18:43:24 +02:00
committed by Mat Sutcliffe
parent 905c487451
commit 09b38b4e6d
3 changed files with 25 additions and 11 deletions

View File

@@ -135,11 +135,10 @@ namespace BlackCore
if (m_debugEnabled) { CLogMessage(this, CLogCategory::contextSlot()).debug() << Q_FUNC_INFO << volume; }
const bool wasMuted = this->isMuted();
if (volume > CSettings::OutMax) { volume = CSettings::OutMax; }
else if (volume < CSettings::OutMax) { volume = CSettings::OutMax; }
volume = CSettings::fixOutVolume(volume);
const int currentVolume = m_voiceClient.getNormalizedOutputVolume();
bool changedVoiceOutput = (currentVolume != volume);
const bool changedVoiceOutput = (currentVolume != volume);
if (changedVoiceOutput)
{
m_voiceClient.setOutputVolumeDb(volume);