diff --git a/LinphoneCore.java b/LinphoneCore.java index 1f8e73449..915062118 100644 --- a/LinphoneCore.java +++ b/LinphoneCore.java @@ -136,5 +136,15 @@ public interface LinphoneCore { * destroy linphone core and free all underlying resources */ public void destroy(); + /** + * Allow to control play level before entering sound card: + * @param level in db + */ + public void setSoftPlayLevel(float gain); + /** + * get play level before entering sound card: + * @return level in db + */ + public float getSoftPlayLevel(); } diff --git a/LinphoneCoreImpl.java b/LinphoneCoreImpl.java index b1dedfeb4..81685e886 100644 --- a/LinphoneCoreImpl.java +++ b/LinphoneCoreImpl.java @@ -51,7 +51,9 @@ class LinphoneCoreImpl implements LinphoneCore { private native long getCallLog(long nativePtr,int position); private native int getNumberOfCallLogs(long nativePtr); private native void delete(long nativePtr); - private native void setNetworkStateReachable(long nativePtr,boolean isReachable); + private native void setNetworkStateReachable(long nativePtr,boolean isReachable); + private native void setSoftPlayLevel(long nativeptr, float gain); + private native float getSoftPlayLevel(long nativeptr); LinphoneCoreImpl(LinphoneCoreListener listener, File userConfig,File factoryConfig,Object userdata) throws IOException { @@ -159,4 +161,11 @@ class LinphoneCoreImpl implements LinphoneCore { public void setNetworkStateReachable(boolean isReachable) { setNetworkStateReachable(nativePtr,isReachable); } + public void setSoftPlayLevel(float gain) { + setSoftPlayLevel(nativePtr,gain); + + } + public float getSoftPlayLevel() { + return getSoftPlayLevel(nativePtr); + } }