disable EC while in speaker mode
This commit is contained in:
parent
259fc8f5e1
commit
3b4e75c5b0
5 changed files with 33 additions and 5 deletions
|
@ -555,6 +555,12 @@ public class DialerActivity extends Activity implements LinphoneCoreListener {
|
||||||
} else {
|
} else {
|
||||||
mAudioManager.setSpeakerphoneOn(true);
|
mAudioManager.setSpeakerphoneOn(true);
|
||||||
}
|
}
|
||||||
|
LinphoneCore lLinphoneCore = LinphoneService.instance().getLinphoneCore();
|
||||||
|
if (lLinphoneCore.isIncall()) {
|
||||||
|
/*disable EC*/
|
||||||
|
lLinphoneCore.getCurrentCall().enableEchoCancellation(false);
|
||||||
|
lLinphoneCore.getCurrentCall().enableEchoLimiter(true);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
private void routeAudioToReceiver() {
|
private void routeAudioToReceiver() {
|
||||||
|
@ -564,6 +570,12 @@ public class DialerActivity extends Activity implements LinphoneCoreListener {
|
||||||
} else {
|
} else {
|
||||||
mAudioManager.setSpeakerphoneOn(false);
|
mAudioManager.setSpeakerphoneOn(false);
|
||||||
}
|
}
|
||||||
|
LinphoneCore lLinphoneCore = LinphoneService.instance().getLinphoneCore();
|
||||||
|
if (lLinphoneCore.isIncall()) {
|
||||||
|
//Restore default value
|
||||||
|
lLinphoneCore.getCurrentCall().enableEchoCancellation(lLinphoneCore.isEchoCancellationEnabled());
|
||||||
|
lLinphoneCore.getCurrentCall().enableEchoLimiter(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
private void callPending(LinphoneCall call) {
|
private void callPending(LinphoneCall call) {
|
||||||
mDecline.setEnabled(true);
|
mDecline.setEnabled(true);
|
||||||
|
|
|
@ -31,7 +31,10 @@ class LinphoneCallImpl implements LinphoneCall {
|
||||||
native private int getState(long nativePtr);
|
native private int getState(long nativePtr);
|
||||||
private native long getCurrentParamsCopy(long nativePtr);
|
private native long getCurrentParamsCopy(long nativePtr);
|
||||||
private native void enableCamera(long nativePtr, boolean enabled);
|
private native void enableCamera(long nativePtr, boolean enabled);
|
||||||
|
private native void enableEchoCancellation(long nativePtr,boolean enable);
|
||||||
|
private native boolean isEchoCancellationEnabled(long nativePtr) ;
|
||||||
|
private native void enableEchoLimiter(long nativePtr,boolean enable);
|
||||||
|
private native boolean isEchoLimiterEnabled(long nativePtr) ;
|
||||||
|
|
||||||
protected LinphoneCallImpl(long aNativePtr) {
|
protected LinphoneCallImpl(long aNativePtr) {
|
||||||
nativePtr = aNativePtr;
|
nativePtr = aNativePtr;
|
||||||
|
@ -72,4 +75,17 @@ class LinphoneCallImpl implements LinphoneCall {
|
||||||
public boolean equals(Object call) {
|
public boolean equals(Object call) {
|
||||||
return nativePtr == ((LinphoneCallImpl)call).nativePtr;
|
return nativePtr == ((LinphoneCallImpl)call).nativePtr;
|
||||||
}
|
}
|
||||||
|
public void enableEchoCancellation(boolean enable) {
|
||||||
|
enableEchoCancellation(nativePtr,enable);
|
||||||
|
|
||||||
|
}
|
||||||
|
public boolean isEchoCancellationEnabled() {
|
||||||
|
return isEchoCancellationEnabled(nativePtr);
|
||||||
|
}
|
||||||
|
public void enableEchoLimiter(boolean enable) {
|
||||||
|
enableEchoLimiter(nativePtr,enable);
|
||||||
|
}
|
||||||
|
public boolean isEchoLimiterEnabled() {
|
||||||
|
return isEchoLimiterEnabled(nativePtr);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit fa1e4658bde1b9b3f7abc8745db71d15287694e3
|
Subproject commit 744739d6f69f170f7ef19d8d589c06f1adb37eea
|
Loading…
Reference in a new issue