diff --git a/coreapi/linphonecore_jni.cc b/coreapi/linphonecore_jni.cc index 509712753..b1aba031b 100644 --- a/coreapi/linphonecore_jni.cc +++ b/coreapi/linphonecore_jni.cc @@ -136,12 +136,18 @@ static void linphone_android_ortp_log_handler(OrtpLogLevel lev, const char *fmt, int dumbMethodForAllowingUsageOfCpuFeaturesFromStaticLibMediastream() { return (android_getCpuFamily() == ANDROID_CPU_FAMILY_ARM && (android_getCpuFeatures() & ANDROID_CPU_ARM_FEATURE_NEON) != 0); } + +int dumbMethodForAllowingUsageOfMsAudioDiffFromStaticLibMediastream() { + return ms_audio_diff(NULL, NULL, NULL, 0, NULL, NULL); +} #endif /*ANDROID*/ + JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *ajvm, void *reserved) { #ifdef ANDROID ms_set_jvm(ajvm); + #endif /*ANDROID*/ jvm=ajvm; return JNI_VERSION_1_2; diff --git a/tester/call_tester.c b/tester/call_tester.c index 4866dda26..fbe81b2b6 100644 --- a/tester/call_tester.c +++ b/tester/call_tester.c @@ -2345,13 +2345,9 @@ static void call_with_file_player(void) { end_call(marie, pauline); /*cannot run on iphone simulator because locks main loop beyond permitted time (should run on another thread) */ -#if !defined(__arm__) && !defined(__arm64__) && !TARGET_IPHONE_SIMULATOR && !defined(ANDROID) BC_ASSERT_EQUAL(ms_audio_diff(hellopath,recordpath,&similar,audio_cmp_max_shift,NULL,NULL), 0, int, "%d"); if (similar>=threshold) break; -#else - remove(recordpath); -#endif } BC_ASSERT_GREATER(similar, threshold, double, "%g"); BC_ASSERT_LOWER(similar, 1.0, double, "%g"); @@ -4367,13 +4363,8 @@ static void call_with_rtp_io_mode(void) { wait_for_until(pauline->lc,marie->lc,NULL,0,1000); end_call(pauline,marie); - if (ms_tags_list_contains_tag(ms_factory_get_platform_tags(ms_factory_get_fallback()), "embedded")) { - ms_warning("Cannot run audio diff on embedded platform"); - remove(recordpath); - } else { - BC_ASSERT_EQUAL(ms_audio_diff(hellopath, recordpath, &similar, audio_cmp_max_shift, NULL, NULL), 0, int, "%d"); - if (similar>=threshold) break; - } + BC_ASSERT_EQUAL(ms_audio_diff(hellopath, recordpath, &similar, audio_cmp_max_shift, NULL, NULL), 0, int, "%d"); + if (similar>=threshold) break; } BC_ASSERT_GREATER(similar, threshold, double, "%g"); BC_ASSERT_LOWER(similar, 1.0, double, "%g"); diff --git a/tester/liblinphone_tester.h b/tester/liblinphone_tester.h index 340c0887b..f04380203 100644 --- a/tester/liblinphone_tester.h +++ b/tester/liblinphone_tester.h @@ -320,7 +320,7 @@ bool_t pause_call_1(LinphoneCoreManager* mgr_1,LinphoneCall* call_1,LinphoneCore bool_t compare_files(const char *path1, const char *path2); void check_media_direction(LinphoneCoreManager* mgr, LinphoneCall *call, MSList* lcs,LinphoneMediaDirection audio_dir, LinphoneMediaDirection video_dir); -static const int audio_cmp_max_shift=20; +static const int audio_cmp_max_shift=10; /* * this function return max value in the last 3 seconds*/