From: Simon Morlat Date: Mon, 17 Sep 2012 11:28:58 +0000 (+0200) Subject: add documentation regarding android echo problems in javadoc X-Git-Url: http://sjero.net/git/?p=linphone;a=commitdiff_plain;h=249217a856fffe5c17f046bff6a6021f13d84590 add documentation regarding android echo problems in javadoc --- diff --git a/java/common/org/linphone/core/package.html b/java/common/org/linphone/core/package.html index 65e82ddf..d499e5d6 100644 --- a/java/common/org/linphone/core/package.html +++ b/java/common/org/linphone/core/package.html @@ -41,14 +41,18 @@ Liblinphone is a high level library for bringing SIP video call functionnality i LibLinphone package is organized in submodules. + +

Related Documentation

@@ -189,6 +193,80 @@ from a peer sip uri. System.out.println("Message ["+message+"] received from ["+from+"] "); } + + +

+Sound and echo cancellation settings +

+Sound levels +
+It is possible to tune the microphone input gain and speaker/receiver output gain by setting parameters into the linphonerc factory config file loaded when instanciating the {@link org.linphone.core.LinphoneCore LinphoneCore}. These gains are liblinphone's internal software gains and are unrelated to volume levels managed by the operating system. For example:
+
+[sound]
+#set the speaker or receiver playback gain in dbm0 (0 db = no change). 
+playback_gain_db=-3
+#set the microphone gain in linear scale:
+mic_gain=0.1
+
+
+ +
+ +Echo cancellation +
+On Android devices, echo is a problem, especially with low-end devices. The root cause is the unpredictable latency of Android's sound system. The liblinphone software {@link org.linphone.core.LinphoneCore#enableEchoCancellation echo canceller} that is operating well on desktop platforms (Mac, Linux, Windows) is unable to operate under Android platform. The situation is very heterogenous:
+ + +
+In order to benefit from the best echo cancellation solution, we recommend applications to run the following algorithm, when it is run for the first time:
+First of {@link org.linphone.core.LinphoneCore#enableEchoCancellation echo canceller} should not be used, in any case. + + +
+Echo calibration procedure +
+The echo calibration procedure is a five second test which consists in playing small beeps to the speaker while the microphone input is recorded. +If the device is subject to echo (or doesn't have hardware echo cancellation), then beeps recorded by the microphone will be detected and a measurement of echo delay can be computed. +Echo calibration procedure can be started by calling {@link org.linphone.core.LinphoneCore#startEchoCalibration LinphoneCore.startEchoCalibration}. + +

+Echo limiter settings
+Echo limiter requires settings to be defined in linphonerc factory config file for correction operation. +Typical settings are: +
+
+[sound]
+el_type=mic
+#speaker energy threshold (linear scale) above which echo limiter decreases mic gain.
+el_thres=0.03
+#attenuation applied to mic gain (linear scale)
+el_force=100000
+#minimum time in milliseconds during which attenuation is applied
+el_sustain=600
+#double talk detection: threshold of ratio mic-energy/speaker-energy above which mic input is sent anyway.
+el_transmit_thres=1.7
+#noise gate floorgain (gain applied when no voice is detected).
+ng_floorgain=0.01
+
+
+ +Up to date settings must be found from linphone-android/res/raw/linphonerc file. + +
+ \ No newline at end of file