|
发表于 2019-1-8 16:46:50
只看该作者
沙发
问题现在是这样子解决,可以利用 tinymix修改录音大小,只有8级调节,可以跟谁系统声音大小调节了!静音还没修改!修改好可以@我
Firefly-rk3399-7.1.2/frameworks/base/services/core/java/com/android/server/audio/AudioService.java
---------------------3980行--------------------------
public void applyDeviceVolume_syncVSS(int device) {
int index;
if (mIsMuted) {
index = 0;
} else if ((device & AudioSystem.DEVICE_OUT_ALL_A2DP) != 0 && mAvrcpAbsVolSupported) {
index = getAbsoluteVolumeIndex((getIndex(device) + 5)/10);
} else if ((device & mFullVolumeDevices) != 0) {
index = (mIndexMax + 5)/10;
} else {
index = (getIndex(device) + 5)/10;
}
try{
Runtime runtime = Runtime.getRuntime();
runtime.exec("tinymix -D 1 11 " + (index/2));
}catch(Exception e){
// Log.e("yufei",e.getMessge());
}
//Log.d("yufei", " setDeviceVolume-->applyDeviceVolume_syncVSS mStreamType:"+mStreamType+", index:"+index+", mRingerModeMutedStreams:"+mRingerModeMutedStreams);
AudioSystem.setStreamVolumeIndex(mStreamType, index, device);
} |
|