加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0011-fix-audio-Fix-audio-stream-volume-retain-while-set-m.patch 1.37 KB
一键复制 编辑 原始数据 按行查看 历史
meizhigang 提交于 2024-04-01 11:03 . fix(*):Fix some bugs with patch
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
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化