完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
RK3288[android 7.1]调试笔记默认音乐、视频、游戏和其他媒体音乐,游戏,铃声和通知等修改视频设置为70%
路径为/frameworks/base/media/java/android/media /AudioSystem.java文件 wangxd@build-server-100:~/work/dsy/rk3288-Android-7.0/frameworks/base(m_android_7_0)$ git diff media/java/android/media/AudioSystem.java diff --git a /media/java/android/media/AudioSystem.java b/media/java/android/media/AudioSystem.java 旧模式 100644 新模式 100755 索引 f597440..219089c --- a/media/java/android/media/AudioSystem .java +++ b/media/java/android/media/AudioSystem.java @@ -762,16 +762,16 @@ public class AudioSystem } public static int[] DEFAULT_STREAM_VOLUME = new int[] {//这里修改默认的音量值 11/15=0.73 平方70% - 4, // STREAM_VOICE_CALL - 7, // STREAM_SYSTEM - 5, // STREAM_RING + 11, / / STREAM_VOICE_CALL + 11, // STREAM_SYSTEM + 11, // STREAM_RING 11, // STREAM_MUSIC - 6, // STREAM_ALARM - 5, // STREAM_NOTIFICATION - 7, // STREAM_BLUETOOTH_SCO - 7, // STREAM_SYSTEM_ENFORCED - 11, // STREAM_DTMF - 11 // STREAM_TTS + 11, // STREAM_ALARM + 11, // STREAM_NOTIFICATION + 11, // STREAM_BLUETOOTH_SCO + 11, // STREAM_SYSTEM_ENFORCED + 11, // STREAM_DTMF + 11 // STREAM_TTS }; public static String streamToString(int stream) { 路径修改为/frameworks/base/services/core/java/com/android/server/audio/AudioService.java文件 wangxd@build-server-100:~/work/dsy/rk3288 -Android-7.0/frameworks/base(m_android_7_0)$ git diff services/core/java/com/android/server/audio/AudioService.java diff --git a/services/core/java/com/android/server/audio /AudioService.java b/services/core/java/com/android/serve 旧模式 100644 新模式 100755 索引 40ae864..3fd67a3 --- a/services/core/java/com/android/server/audio/AudioService.java +++ b/services/core/java/com/android/server/audio/AudioService.java @@ -261,14 +261,14 @@ public class AudioService extends IAudioService.Stub { /** 最大音量索引值音频流 */ private static int[] MAX_STREAM_VOLUME = new int[] {//这里重量的属性都设为 15 - 5, // STREAM_VOICE_CALL - 7, // STREAM_VOICE_SYSTEM - 7 , // STREAM_RING + 15, / / STREAM_VOICE_CALL + 15, // STREAM_SYSTEM + 15, // STREAM_RING 15, // STREAM_MUSIC - 7, // STREAM_ALARM - 7, // STREAM_NOTIFICATION + 15, // STREAM_ALARM + 15, // STREAM_NOTIFICATION 15, // STREAM_BLUETOOTH_SCO - 7, // STREAM_SYSTEM_ENFORCED + 15, // STREAM_SYSTEM_ENFORCED 15, // STREAM_DTMF 15 // STREAM_TTS }; /** 音频流的最小音量 */ private static int] MIN_STR_VOLUME t[] {// STREAM_C = 新的 EAM_1 中的最小音量索引值, // STREAM_C = STREAM_RING 0 , // STRSYSTEM 0, // STREAM_RING 0 , // STREAM_MUSIC 0, // STREAM_ALARM 0, // STREAM_NOTIFICATION 0, // STREAM_BLUETOOTH_SCO 0, // STREAM_SYSTEM_ENFORCED 0, // STREAM_DTMF 0 // STREAM_TTS }; @@ -614,19 +614,19 @@ public class AudioService extends IAudioService.Stub { Vibrator vibrator = (Vibrator) context.getSystemService(Context.VIBRATOR_SERVICE); mHasVibrator = 振动器 == 空?false : vibrator.hasVibrator(); - // 初始化音量 - int maxVolume = SystemProperties.getInt(“ro.config.vc_call_vol_steps”, - MAX_STREAM_VOLUME[AudioSystem.STREAM_VOICE_CALL]); - 如果(最大音量!= MAX_STREAM_VOLUME[AudioSystem.STREAM_VOICE_CALL]){ - MAX_STREAM_VOLUME[AudioSystem.STREAM_VOICE_CALL] = maxVolume; - AudioSystem.DEFAULT_STREAM_VOLUME[AudioSystem.STREAM_VOICE_CALL] = (maxVolume * 3) / 4; - } - maxVolume = SystemProperties.getInt(“ro.config.media_vol_steps”, - MAX_STREAM_VOLUME[AudioSystem.STREAM_MUSIC]); - if (maxVolume != MAX_STREAM_VOLUME[AudioSystem.STREAM_MUSIC]) { - MAX_STREAM_VOLUME[AudioSystem.STREAM_MUSIC] = maxVolume; - AudioSystem.DEFAULT_STREAM_VOLUME[AudioSystem.STREAM_MUSIC] = (maxVolume * 3) / 4; - } //这里把在system.prop获取的比重设置给屏蔽掉上面使用的默认值,为什么要屏蔽掉,原因是如果在system.prop获取的比重设置与我们修改容量类型,默认容量改变的结构体中的值/ 4 系统类型的设置值 = 系统的设置值 + // 初始容量 + // int maxVol 属性。 getInt(“ro.config.vc_call_vol_steps”, + // MAX_STREAM_VOLUME[AudioSystem.STREAM_VOICE_CALL]); + // if (maxVolume != MAX_STREAM_VOLUME[AudioSystem.STREAM_VOICE_CALL]) { + // MAX_STREAM_VOLUME[AudioSystem.STREAM_VOICE_CALL] = maxVolume; + // AudioSystem.DEFAULT_STREAM_VOLUME[AudioSystem.STREAM_VOICE_CALL] = (maxVolume * 3) / 4; + // } + // maxVolume = SystemProperties.getInt(“ro.config.media_vol_steps”, + // MAX_STREAM_VOLUME[AudioSystem.STREAM_MUSIC]); + // if (maxVolume != MAX_STREAM_VOLUME[AudioSystem.STREAM_MUSIC]) { + // MAX_STREAM_VOLUME[AudioSystem.STREAM_MUSIC] = maxVolume; + // AudioSystem.DEFAULT_STREAM_VOLUME[AudioSystem.STREAM_MUSIC] = (maxVolume * 3) / 4; + // } sSoundEffectVolumeDb = context.getResources().getInteger( com.android.internal.R.integer.config_soundEffectVolumeDb); |
|
|
|
你正在撰写答案
如果你是对答案或其他答案精选点评或询问,请使用“评论”功能。
基于米尔瑞芯微RK3576核心板/开发板的人脸疲劳检测应用方案
808 浏览 0 评论
1024 浏览 1 评论
887 浏览 1 评论
2113 浏览 1 评论
3373 浏览 1 评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-26 05:42 , Processed in 0.589768 second(s), Total 73, Slave 56 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号