From e4dd74e0eb8bee8662a0cdb0dfacae2980041fe4 Mon Sep 17 00:00:00 2001 From: fuleyi Date: Thu, 5 Mar 2026 13:17:16 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A7=A3=E5=86=B3=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E9=9F=B3=E9=87=8F=E5=BF=AB=E6=8D=B7=E9=94=AE=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E6=97=B6=E9=9D=99=E9=9F=B3=E7=8A=B6=E6=80=81=E5=BC=82=E5=B8=B8?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit SetMute中判断了音量是否为0,但是Volume是根据事件刷新的,此时还不是设置后的音量,因此会影响判断 Log: PMS: BUG-351645 Influence: audio mute settings --- audio1/sink.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/audio1/sink.go b/audio1/sink.go index 07ef10a2e..7ed730154 100644 --- a/audio1/sink.go +++ b/audio1/sink.go @@ -111,7 +111,15 @@ func (s *Sink) SetVolume(value float64, isPlay bool) *dbus.Error { value = 0.001 s.setMute(true) } else { - s.SetMute(false) + // SetMute中判断了音量是否为0,但是Volume是根据事件刷新的,此时还不是设置后的音量,因此会影响判断 + if err := s.setMute(false); err == nil { + if GetConfigKeeper().Mute.MuteOutput { + GetConfigKeeper().SetMuteOutput(false) + } + } else { + logger.Warning(err) + } + } s.PropsMu.Lock() cv := s.cVolume.SetAvg(value)