优化音乐音量映射
authorpenglei <1624952103@qq.com>
Mon, 28 Oct 2024 09:55:40 +0000 (17:55 +0800)
committeraliyun:aliyun0384013184_1JeGs <3449750381@qq.com>
Mon, 28 Oct 2024 10:38:50 +0000 (10:38 +0000)
code/sdk/middleware/services/media/foundation/audiomanager/frameworks/audiomanager/cpp/audio_manager.cpp

index 89c1679..f288782 100755 (executable)
@@ -50,11 +50,11 @@ bool AudioManager::SetVolume(AudioStreamType streamType, int32_t volume)
         if(volume == 0) 
             volume = 0;
         else if(volume <= 1) 
-            volume = 30;
+            volume = 20;
         else if(volume > 100) 
-            volume = 70;
+            volume = 100;
         else 
-            volume = 30 + (volume - 1) * 40 / 99;
+            volume = 20 + (volume - 1) * 80 / 99;
     }
     else if(streamType == AUDIO_STREAM_VOICE_CALL_BT_SCO || streamType == AUDIO_STREAM_VOICE_CALL_VOLTE)
     {