kiran-cc-daemon/0011-fix-audio-Fix-audio-stream-volume-retain-while-set-m.patch
meizhigang 7eacc95f90 fix(*):Fix some bugs with patch
- 同步修复的补丁
2024-04-01 11:03:25 +08:00

43 lines
1.4 KiB
Diff
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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