diff --git a/coreapi/callbacks.c b/coreapi/callbacks.c index e6fb233d0..d80ab4e81 100644 --- a/coreapi/callbacks.c +++ b/coreapi/callbacks.c @@ -122,7 +122,7 @@ void linphone_core_update_streams(LinphoneCore *lc, LinphoneCall *call, SalMedia bool_t all_muted=FALSE; bool_t send_ringbacktone=FALSE; int md_changed=0; - + if (!((call->state == LinphoneCallIncomingEarlyMedia) && (linphone_core_get_ring_during_incoming_early_media(lc)))) { linphone_core_stop_ringing(lc); @@ -362,7 +362,7 @@ static void call_received(SalOp *h){ linphone_call_ref(call); /*prevent the call from being destroyed while we are notifying, if the user declines within the state callback */ call->bg_task_id=sal_begin_background_task("liblinphone call notification", NULL, NULL); - + if ((linphone_core_get_firewall_policy(lc) == LinphonePolicyUseIce) && (call->ice_session != NULL)) { /* Defer ringing until the end of the ICE candidates gathering process. */ ms_message("Defer ringing to gather ICE candidates"); @@ -773,7 +773,7 @@ static void call_terminated(SalOp *op, const char *from){ switch(linphone_call_get_state(call)){ case LinphoneCallEnd: case LinphoneCallError: - ms_warning("call_terminated: ignoring."); + ms_warning("call_terminated: already terminated, ignoring."); return; break; case LinphoneCallIncomingReceived: diff --git a/tester/call_tester.c b/tester/call_tester.c index 4be940bc6..297df3266 100644 --- a/tester/call_tester.c +++ b/tester/call_tester.c @@ -4134,7 +4134,7 @@ static void simple_stereo_call(const char *codec_name, int clock_rate, int bitra LinphoneCoreManager* pauline; PayloadType *pt; char *stereo_file = bc_tester_res("sounds/vrroom.wav"); - char *recordpath = create_filepath(bc_tester_get_writable_dir_prefix(), "stereo-record", "wav"); + char *recordpath = bc_tester_file("stereo-record.wav"); int dummy=0; belle_sip_object_enable_leak_detector(TRUE); @@ -4167,30 +4167,23 @@ static void simple_stereo_call(const char *codec_name, int clock_rate, int bitra lp_config_set_string(marie->lc->config,"sound","features","NONE"); lp_config_set_string(pauline->lc->config,"sound","features","NONE"); - if (!BC_ASSERT_TRUE(call(marie,pauline))) goto end; - wait_for_until(marie->lc, pauline->lc, &dummy, 1,6000); - end_call(marie,pauline); + if (!BC_ASSERT_TRUE(call(pauline,marie))) goto end; + wait_for_until(marie->lc, pauline->lc, &dummy, 1,1000); + end_call(pauline, marie); - if (clock_rate!=48000) ms_warning("Similarity checking not implemented for files not having the same sampling rate"); - else{ -#if !defined(__arm__) && !defined(__arm64__) && !TARGET_IPHONE_SIMULATOR && !defined(ANDROID) - if (stereo){ - double similar; - const double threshold = .7f; - BC_ASSERT_EQUAL(ms_audio_diff(stereo_file,recordpath,&similar,audio_cmp_max_shift,NULL,NULL), 0, int, "%d"); - BC_ASSERT_GREATER(similar, threshold, float, "%f"); - BC_ASSERT_LOWER(similar, 1.f, float, "%f"); - }else{ - double similar; - const double threshold = .7f; - BC_ASSERT_EQUAL(ms_audio_diff(stereo_file,recordpath,&similar,audio_cmp_max_shift,NULL,NULL), 0, int, "%d"); - BC_ASSERT_LOWER(similar, threshold, float, "%f"); - BC_ASSERT_LOWER(similar, 1.f, float, "%f"); - } + + if (clock_rate!=48000) { + ms_warning("Similarity checking not implemented for files not having the same sampling rate"); + }else{ +#if !defined(__arm__) && !defined(__arm64__) && !defined(__ios__) && !defined(ANDROID) + double similar; + const double threshold = .7f; + BC_ASSERT_EQUAL(ms_audio_diff(stereo_file,recordpath,&similar,audio_cmp_max_shift,NULL,NULL), 0, int, "%d"); + BC_ASSERT_GREATER(similar, threshold, float, "%f"); + BC_ASSERT_LOWER(similar, 1.f, float, "%f"); #endif } - end: linphone_core_manager_destroy(marie); linphone_core_manager_destroy(pauline); diff --git a/tester/sounds/vrroom.wav b/tester/sounds/vrroom.wav index 673a3addc..92a73d289 100644 Binary files a/tester/sounds/vrroom.wav and b/tester/sounds/vrroom.wav differ diff --git a/tester/tester.c b/tester/tester.c index 106077a88..a42eabf76 100644 --- a/tester/tester.c +++ b/tester/tester.c @@ -231,7 +231,7 @@ LinphoneCoreManager *get_manager(LinphoneCore *lc){ bool_t transport_supported(LinphoneTransportType transport) { Sal *sal = sal_init(); bool_t supported = sal_transport_available(sal,(SalTransport)transport); - if (!supported) ms_warning("TLS transport not supported, falling back to TCP if possible otherwise skipping test."); + if (!supported) ms_message("TLS transport not supported, falling back to TCP if possible otherwise skipping test."); sal_uninit(sal); return supported; }