]> sjero.net Git - linphone/commitdiff
Set a default echo canceller delay if echo canceller calibration fails.
authorGhislain MARY <ghislain.mary@belledonne-communications.com>
Mon, 15 Oct 2012 14:00:17 +0000 (16:00 +0200)
committerGhislain MARY <ghislain.mary@belledonne-communications.com>
Tue, 16 Oct 2012 13:03:03 +0000 (15:03 +0200)
coreapi/linphonecore.c

index 6ae5563aefd6143cb7c0f97eea633e94e2f686c4..7159edd6f1c6dd6ba687b23a5309fc231c0e86ea 100644 (file)
@@ -1935,6 +1935,10 @@ void linphone_core_iterate(LinphoneCore *lc){
                        if (ecs==LinphoneEcCalibratorDone){
                                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));
+                       } else if (ecs == LinphoneEcCalibratorFailed) {
+                               lp_config_set_int(lc->config, "sound", "ec_delay", LP_CONFIG_DEFAULT_INT(lc->config, "ec_delay", 250));
+                       } else if (ecs == LinphoneEcCalibratorDoneNoEcho) {
+                               linphone_core_enable_echo_cancellation(lc, FALSE);
                        }
                        ec_calibrator_destroy(lc->ecc);
                        lc->ecc=NULL;