diff --git a/coreapi/ec-calibrator.c b/coreapi/ec-calibrator.c index 38b83f0d6..2f4fa6500 100644 --- a/coreapi/ec-calibrator.c +++ b/coreapi/ec-calibrator.c @@ -185,3 +185,4 @@ int linphone_core_start_echo_calibration(LinphoneCore *lc, LinphoneEcCalibration lc->ecc=ec_calibrator_new(lc->sound_conf.play_sndcard,lc->sound_conf.capt_sndcard,rate,cb,cb_data); return 0; } + diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index aa33e668f..6abe85101 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -1689,7 +1689,8 @@ void linphone_core_iterate(LinphoneCore *lc){ if (lc->ecc->cb) lc->ecc->cb(lc,ecs,lc->ecc->delay,lc->ecc->cb_data); if (ecs==LinphoneEcCalibratorDone){ - lp_config_set_int(lc->config, "sound", "ec_delay",MAX(lc->ecc->delay-10,0)); + int len=lp_config_get_int(lc->config,"sound","ec_tail_len",0); + lp_config_set_int(lc->config, "sound", "ec_delay",MAX(lc->ecc->delay-(len/2),0)); } ec_calibrator_destroy(lc->ecc); lc->ecc=NULL; diff --git a/coreapi/linphonecore_jni.cc b/coreapi/linphonecore_jni.cc index 349efb02c..7ce1959ff 100644 --- a/coreapi/linphonecore_jni.cc +++ b/coreapi/linphonecore_jni.cc @@ -624,6 +624,12 @@ extern "C" void Java_org_linphone_core_LinphoneCoreImpl_enableEchoCancellation(J ,jboolean enable) { linphone_core_enable_echo_cancellation((LinphoneCore*)lc,enable); } +extern "C" void Java_org_linphone_core_LinphoneCoreImpl_enableEchoLimiter(JNIEnv* env + ,jobject thiz + ,jlong lc + ,jboolean enable) { + linphone_core_enable_echo_limiter((LinphoneCore*)lc,enable); +} extern "C" jboolean Java_org_linphone_core_LinphoneCoreImpl_isEchoCancellationEnabled(JNIEnv* env ,jobject thiz ,jlong lc diff --git a/java/common/org/linphone/core/LinphoneCore.java b/java/common/org/linphone/core/LinphoneCore.java index 91f056c23..346fdfa72 100644 --- a/java/common/org/linphone/core/LinphoneCore.java +++ b/java/common/org/linphone/core/LinphoneCore.java @@ -591,5 +591,6 @@ public interface LinphoneCore { boolean pauseAllCalls(); void setZrtpSecretsCache(String file); + public void enableEchoLimiter(boolean val); } diff --git a/mediastreamer2 b/mediastreamer2 index 7c091db48..bddf312c1 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit 7c091db48e2ac5b785ced3964a386ec51f695a60 +Subproject commit bddf312c1b7852d1b29c6b476d207133c5f31ff2