]> sjero.net Git - linphone/commitdiff
echo cancellation improvements
authorSimon Morlat <simon.morlat@linphone.org>
Mon, 5 Sep 2011 14:29:28 +0000 (16:29 +0200)
committerSimon Morlat <simon.morlat@linphone.org>
Mon, 5 Sep 2011 14:29:28 +0000 (16:29 +0200)
coreapi/ec-calibrator.c
coreapi/linphonecore.c
coreapi/linphonecore_jni.cc
java/common/org/linphone/core/LinphoneCore.java
mediastreamer2

index 38b83f0d6065abd1c3257599df7594d438d27a71..2f4fa65009fa6376de46de262c4231426948055b 100644 (file)
@@ -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;
 }
+
index aa33e668fbb7c4483cef62d88e1859581bf5e281..6abe85101f78764649486fa5f69d8ab4d16d7aa8 100644 (file)
@@ -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;
index 349efb02cda00481556003dbd2e8409321bf72c4..7ce1959ffd915d1d9fc5c14585355181fab01153 100644 (file)
@@ -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
index 91f056c23999b2d6e64be318791bbac4a24c04ec..346fdfa7299500cb4d762ce57061a3e4912d069e 100644 (file)
@@ -591,5 +591,6 @@ public interface LinphoneCore {
        boolean pauseAllCalls();
        
        void setZrtpSecretsCache(String file);
+       public void enableEchoLimiter(boolean val);
 
 }
index 7c091db48e2ac5b785ced3964a386ec51f695a60..bddf312c1b7852d1b29c6b476d207133c5f31ff2 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 7c091db48e2ac5b785ced3964a386ec51f695a60
+Subproject commit bddf312c1b7852d1b29c6b476d207133c5f31ff2