From 134ce4d454509187098e669a14055104f5077701 Mon Sep 17 00:00:00 2001 From: penglei <1624952103@qq.com> Date: Tue, 29 Oct 2024 16:28:12 +0800 Subject: [PATCH] =?utf8?q?=E4=BC=98=E5=8C=96=E9=9F=B3=E4=B9=90=E4=B8=8E?= =?utf8?q?=E9=80=9A=E8=AF=9D=E9=9F=B3=E9=87=8F=E6=98=A0=E5=B0=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../frameworks/audiomanager/cpp/audio_manager.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/code/sdk/middleware/services/media/foundation/audiomanager/frameworks/audiomanager/cpp/audio_manager.cpp b/code/sdk/middleware/services/media/foundation/audiomanager/frameworks/audiomanager/cpp/audio_manager.cpp index f28878272..39978a0df 100755 --- a/code/sdk/middleware/services/media/foundation/audiomanager/frameworks/audiomanager/cpp/audio_manager.cpp +++ b/code/sdk/middleware/services/media/foundation/audiomanager/frameworks/audiomanager/cpp/audio_manager.cpp @@ -59,11 +59,11 @@ bool AudioManager::SetVolume(AudioStreamType streamType, int32_t volume) else if(streamType == AUDIO_STREAM_VOICE_CALL_BT_SCO || streamType == AUDIO_STREAM_VOICE_CALL_VOLTE) { if(volume < 1) - volume = 40; + volume = 30; else if(volume > 100) volume = 100; else - volume = 40 + (volume - 1) * 60 / 99; + volume = 30 + (volume - 1) * 70 / 99; } return impl_->SetVolume(streamType, volume); } @@ -77,20 +77,20 @@ int32_t AudioManager::GetVolume(AudioStreamType streamType) { if(volume == 0) return 0; - if(volume < 30) + if(volume < 20) return 1; - if (volume > 70) + if (volume > 100) return 100; - return ((volume - 30) * 99 / 40) + 1; + return ((volume - 20) * 99 / 80) + 1; } else if(streamType == AUDIO_STREAM_VOICE_CALL_BT_SCO || streamType == AUDIO_STREAM_VOICE_CALL_VOLTE) { - if(volume < 40) + if(volume < 30) return 1; else if(volume > 100) return 100; else - return ((volume - 40) * 99 / 60) + 1; + return ((volume - 30) * 99 / 70) + 1; } else -- 2.17.1