mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-20 20:48:07 +00:00
Initial support for softvolume in Android.
This commit is contained in:
parent
f8713446f5
commit
e12a24b585
2 changed files with 19 additions and 0 deletions
|
|
@ -1208,3 +1208,21 @@ extern "C" void Java_org_linphone_core_LinphoneCoreImpl_enableIpv6(JNIEnv* env,j
|
|||
,jlong lc, jboolean enable) {
|
||||
linphone_core_enable_ipv6((LinphoneCore*)lc,enable);
|
||||
}
|
||||
|
||||
extern "C" void Java_org_linphone_core_LinphoneCoreImpl_adjustSoftwareVolume(JNIEnv* env,jobject thiz
|
||||
,jlong ptr, jint db) {
|
||||
LinphoneCore *lc = (LinphoneCore *) ptr;
|
||||
|
||||
if (db == 0) {
|
||||
linphone_core_set_playback_gain_db(lc, 0);
|
||||
return;
|
||||
}
|
||||
|
||||
float gain = linphone_core_get_playback_gain_db(lc) + db;
|
||||
if (gain > 0) gain = 0;
|
||||
|
||||
linphone_core_set_playback_gain_db(lc, gain);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -555,4 +555,5 @@ public interface LinphoneCore {
|
|||
void startEchoCalibration(Object data) throws LinphoneCoreException;
|
||||
|
||||
void enableIpv6(boolean enable);
|
||||
void adjustSoftwareVolume(int i);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue