disable EC while in speaker mode
This commit is contained in:
parent
259fc8f5e1
commit
3b4e75c5b0
5 changed files with 33 additions and 5 deletions
|
@ -37,6 +37,6 @@ public class AboutActivity extends Activity {
|
|||
} catch (NameNotFoundException e) {
|
||||
Log.e(LinphoneService.TAG, "cannot get version name", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -555,6 +555,12 @@ public class DialerActivity extends Activity implements LinphoneCoreListener {
|
|||
} else {
|
||||
mAudioManager.setSpeakerphoneOn(true);
|
||||
}
|
||||
LinphoneCore lLinphoneCore = LinphoneService.instance().getLinphoneCore();
|
||||
if (lLinphoneCore.isIncall()) {
|
||||
/*disable EC*/
|
||||
lLinphoneCore.getCurrentCall().enableEchoCancellation(false);
|
||||
lLinphoneCore.getCurrentCall().enableEchoLimiter(true);
|
||||
}
|
||||
|
||||
}
|
||||
private void routeAudioToReceiver() {
|
||||
|
@ -563,7 +569,13 @@ public class DialerActivity extends Activity implements LinphoneCoreListener {
|
|||
AudioManager.ROUTE_EARPIECE, AudioManager.ROUTE_ALL);
|
||||
} else {
|
||||
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) {
|
||||
mDecline.setEnabled(true);
|
||||
|
|
|
@ -160,7 +160,7 @@ public class LinphoneActivity extends TabActivity {
|
|||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
|
||||
|
||||
|
||||
}
|
||||
@Override
|
||||
|
|
|
@ -31,7 +31,10 @@ class LinphoneCallImpl implements LinphoneCall {
|
|||
native private int getState(long nativePtr);
|
||||
private native long getCurrentParamsCopy(long nativePtr);
|
||||
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) {
|
||||
nativePtr = aNativePtr;
|
||||
|
@ -72,4 +75,17 @@ class LinphoneCallImpl implements LinphoneCall {
|
|||
public boolean equals(Object call) {
|
||||
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