Change VQE settings

Change some VQE settings and make iSAC (item 0 in the list) to be the
default

BUG=None
TEST=local
Review URL: https://webrtc-codereview.appspot.com/790005

git-svn-id: http://webrtc.googlecode.com/svn/trunk@2754 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
leozwang@webrtc.org
2012-09-12 03:47:08 +00:00
parent 587073cbb2
commit 430e31c2c0
2 changed files with 33 additions and 6 deletions

View File

@ -1594,8 +1594,16 @@ JNIEXPORT jint JNICALL Java_org_webrtc_videoengineapp_ViEAndroidJavaAPI_VoE_1Set
jobject,
jboolean enable) {
VALIDATE_APM_POINTER;
if (voeData.apm->SetEcStatus(enable, kEcAecm) < 0)
if (voeData.apm->SetEcStatus(enable, kEcAecm) < 0) {
__android_log_print(ANDROID_LOG_ERROR, WEBRTC_LOG_TAG,
"Failed SetECStatus(%d,%d)", enable, kEcAecm);
return -1;
}
if (voeData.apm->SetAecmMode(kAecmSpeakerphone, false) != 0) {
__android_log_print(ANDROID_LOG_ERROR, WEBRTC_LOG_TAG,
"Failed SetAecmMode(%d,%d)", kAecmSpeakerphone, 0);
return -1;
}
return 0;
}
@ -1609,8 +1617,24 @@ JNIEXPORT jint JNICALL Java_org_webrtc_videoengineapp_ViEAndroidJavaAPI_VoE_1Set
jobject,
jboolean enable) {
VALIDATE_APM_POINTER;
if (voeData.apm->SetAgcStatus(enable, kAgcFixedDigital) < 0)
if (voeData.apm->SetAgcStatus(enable, kAgcFixedDigital) < 0) {
__android_log_print(ANDROID_LOG_ERROR, WEBRTC_LOG_TAG,
"Failed SetAgcStatus(%d,%d)", enable, kAgcFixedDigital);
return -1;
}
webrtc::AgcConfig config;
// The following settings are by default, explicitly set here.
config.targetLeveldBOv = 3;
config.digitalCompressionGaindB = 9;
config.limiterEnable = true;
if (voeData.apm->SetAgcConfig(config) != 0) {
__android_log_print(ANDROID_LOG_ERROR, WEBRTC_LOG_TAG,
"Failed SetAgcConfig(%d,%d,%d)",
config.targetLeveldBOv,
config.digitalCompressionGaindB,
config.limiterEnable);
return -1;
}
return 0;
}
@ -1624,7 +1648,10 @@ JNIEXPORT jint JNICALL Java_org_webrtc_videoengineapp_ViEAndroidJavaAPI_VoE_1Set
jobject,
jboolean enable) {
VALIDATE_APM_POINTER;
if (voeData.apm->SetNsStatus(enable) < 0) {
if (voeData.apm->SetNsStatus(enable, kNsModerateSuppression) < 0) {
__android_log_print(ANDROID_LOG_ERROR, WEBRTC_LOG_TAG,
"Failed SetNsStatus(%d,%d)",
enable, kNsModerateSuppression);
return -1;
}
return 0;

View File

@ -457,9 +457,9 @@ public class WebRTCDemo extends TabActivity implements IViEAndroidCallback,
R.layout.row,
mVoiceCodecsStrings));
spVoiceCodecType.setSelection(0);
// Find PCMU and use it
// Find ISAC and use it
for (int i = 0; i < mVoiceCodecsStrings.length; ++i) {
if (mVoiceCodecsStrings[i].contains("PCMU")) {
if (mVoiceCodecsStrings[i].contains("ISAC")) {
spVoiceCodecType.setSelection(i);
break;
}