Correct the Echo Canceller Calibrator to get a better estimate of the delay on mac and some linux.
Update the framesize of the samples analyzed by the tone detector, depending on the chosen sampling rate. The sample duration is then always 20 ms.
In the ECC, a detected tone is validated only if the given tone has been played, based on its start time. This prevent from validating a frequency that is played later, leading to a a negative local delay that biaises the global delay computation. Note: this problem of false positive seems to be fixed since the correction of the frame size of the tone detector.
The deprecated function linphone_core_start_echo_calibration
in test_ecc.c has been replaced by linphone_core_start_echo_canceller_calibration
.
Remove 20% to the delay estimated by ECC, to get margin for echo detection during AEC. The margin cannot exceed 40 ms, that is the half of the window used for echo detection in AEC.
Ticket Jira https://linphone.atlassian.net/browse/SDK-116