Initial support for softvolume in Android.

This commit is contained in:
Guillaume Beraudo 2011-04-11 12:16:25 +02:00
parent f8713446f5
commit e12a24b585
2 changed files with 19 additions and 0 deletions

View file

@ -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);
}

View file

@ -555,4 +555,5 @@ public interface LinphoneCore {
void startEchoCalibration(Object data) throws LinphoneCoreException;
void enableIpv6(boolean enable);
void adjustSoftwareVolume(int i);
}