Skip to content

Commit e24192d

Browse files
add-uosdeepin-bot[bot]
authored andcommitted
fix(sound): sync source mute state with volume
This ensures the source is muted when volume is set to 0 and unmuted when volume is set to a non-zero value, rather than always unmuting when the volume changes. log: sync source mute state with volume pms: BUG-347211
1 parent 5f73fb5 commit e24192d

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

src/plugin-sound/operation/soundworker.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,9 +195,7 @@ void SoundWorker::setSourceVolume(double volume)
195195
if (qFuzzyCompare(m_soundDBusInter->volumeSource(), volume)) {
196196
return;
197197
}
198-
if (m_soundDBusInter->muteSource()) {
199-
m_soundDBusInter->SetSourceMute(false);
200-
}
198+
m_soundDBusInter->SetSourceMute(qFuzzyCompare(0, volume));
201199
m_soundDBusInter->SetSourceVolume(volume, !m_soundDBusInter->muteSource());
202200
qCDebug(DdcSoundWorker) << "set source volume to " << volume;
203201
}

0 commit comments

Comments
 (0)