43 lines
1.4 KiB
Diff
43 lines
1.4 KiB
Diff
From 16f0c4876beb217bdf904386e766f904ce10f8b2 Mon Sep 17 00:00:00 2001
|
||
From: meizhigang <meizhigang@kylinsec.com.cn>
|
||
Date: Fri, 29 Mar 2024 10:36:15 +0800
|
||
Subject: [PATCH 4/4] fix(audio):Fix audio stream volume retain while set mute
|
||
MIME-Version: 1.0
|
||
Content-Type: text/plain; charset=UTF-8
|
||
Content-Transfer-Encoding: 8bit
|
||
|
||
- 音频流设置静音保留音量大小
|
||
|
||
Related #33694
|
||
---
|
||
plugins/audio/audio-stream.cpp | 13 -------------
|
||
1 file changed, 13 deletions(-)
|
||
|
||
diff --git a/plugins/audio/audio-stream.cpp b/plugins/audio/audio-stream.cpp
|
||
index 263f2cc..2616a42 100644
|
||
--- a/plugins/audio/audio-stream.cpp
|
||
+++ b/plugins/audio/audio-stream.cpp
|
||
@@ -72,19 +72,6 @@ void AudioStream::SetMute(bool mute, MethodInvocation &invocation)
|
||
DBUS_ERROR_REPLY_AND_RET(CCErrorCode::ERROR_AUDIO_STREAM_SET_MUTE_FAILED);
|
||
}
|
||
|
||
- // 如果设置了静音,则将音量也设置为0
|
||
- if (mute)
|
||
- {
|
||
- auto volume_absolute = AudioUtils::volume_range2absolute(0,
|
||
- this->stream_->get_min_volume(),
|
||
- this->stream_->get_max_volume());
|
||
-
|
||
- if (!this->stream_->set_volume(volume_absolute))
|
||
- {
|
||
- DBUS_ERROR_REPLY_AND_RET(CCErrorCode::ERROR_AUDIO_STREAM_SET_VOLUME_FAILED);
|
||
- }
|
||
- }
|
||
-
|
||
invocation.ret();
|
||
}
|
||
|
||
--
|
||
2.27.0
|
||
|