mt6735 调整Ringtone音量时如何不影响DTMF音量
时间:10-02
整理:3721RD
点击:
[DESCRIPTION]
调整Ringtone音量时如何不影响DTMF音量.
[SOLUTION]
1.AudioService.java中updateStreamVolumeAlias()里
dtmfStreamAlias = AudioSystem.STREAM_DTMF;//添加此行code
mStreamVolumeAlias[AudioSystem.STREAM_DTMF] = dtmfStreamAlias;
2.AudioManager.java中
public static final int[] DEFAULT_STREAM_VOLUME = new int[] {
4, // STREAM_VOICE_CALL
15, // STREAM_SYSTEM
12, // STREAM_RING 8 to 12
8, // STREAM_MUSIC
8, // STREAM_ALARM
8, // STREAM_NOTIFICATION
7, // STREAM_bluetooth_SCO
15, // STREAM_SYSTEM_ENFORCED
value, // STREAM_DTMF//适当调整value,范围:0~15.之后DTMF的音量等级就始终为value,终端user不能动态调整!
11, // STREAM_TTS
8, // STREAM_FM
8 // STREAM_MATV
};
调整Ringtone音量时如何不影响DTMF音量.
[SOLUTION]
1.AudioService.java中updateStreamVolumeAlias()里
dtmfStreamAlias = AudioSystem.STREAM_DTMF;//添加此行code
mStreamVolumeAlias[AudioSystem.STREAM_DTMF] = dtmfStreamAlias;
2.AudioManager.java中
public static final int[] DEFAULT_STREAM_VOLUME = new int[] {
4, // STREAM_VOICE_CALL
15, // STREAM_SYSTEM
12, // STREAM_RING 8 to 12
8, // STREAM_MUSIC
8, // STREAM_ALARM
8, // STREAM_NOTIFICATION
7, // STREAM_bluetooth_SCO
15, // STREAM_SYSTEM_ENFORCED
value, // STREAM_DTMF//适当调整value,范围:0~15.之后DTMF的音量等级就始终为value,终端user不能动态调整!
11, // STREAM_TTS
8, // STREAM_FM
8 // STREAM_MATV
};
666666
顶顶顶