From a097d8d8e73d5f39bebb82cb13238e5dfd572d79 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Thu, 7 May 2015 22:44:57 +0200 Subject: [PATCH] update ms_audio_diff() calls in test suite to accelerate processing --- mediastreamer2 | 2 +- tester/call_tester.c | 4 ++-- tester/liblinphone_tester.h | 3 +++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/mediastreamer2 b/mediastreamer2 index 9c57afef0..df8fdb8f4 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit 9c57afef0d3332715b701ec161b0598fe4246b53 +Subproject commit df8fdb8f4d4284b294fe5c0890ba89e2943050f5 diff --git a/tester/call_tester.c b/tester/call_tester.c index 6b9fd035b..8c8640ec3 100644 --- a/tester/call_tester.c +++ b/tester/call_tester.c @@ -2363,7 +2363,7 @@ static void call_with_file_player(void) { { double similar; const int threshold = 90; - BC_ASSERT_EQUAL_INT(ms_audio_diff(hellopath,recordpath,&similar,NULL,NULL), 0); + BC_ASSERT_EQUAL_INT(ms_audio_diff(hellopath,recordpath,&similar,audio_cmp_min_overlap,NULL,NULL), 0); BC_ASSERT_GREATER_INT(100*similar, threshold); BC_ASSERT_LOWER_INT(100*similar, 100); if (threshold < 100*similar && 100*similar < 100) { @@ -2441,7 +2441,7 @@ static void call_with_mkv_file_player(void) { CU_ASSERT_TRUE(wait_for(pauline->lc,marie->lc,&pauline->stat.number_of_LinphoneCallEnd,1)); CU_ASSERT_TRUE(wait_for(pauline->lc,marie->lc,&marie->stat.number_of_LinphoneCallEnd,1)); #ifdef DO_AUDIO_CMP - CU_ASSERT_TRUE(ms_audio_diff(hellowav,recordpath,&similar,NULL,NULL)==0); + CU_ASSERT_TRUE(ms_audio_diff(hellowav,recordpath,&similar,audio_cmp_min_overlap,NULL,NULL)==0); CU_ASSERT_TRUE(similar>threshold); CU_ASSERT_TRUE(similar<=1.0); if(similar>threshold && similar<=1.0) { diff --git a/tester/liblinphone_tester.h b/tester/liblinphone_tester.h index 2069b1d04..2b7f9a26c 100644 --- a/tester/liblinphone_tester.h +++ b/tester/liblinphone_tester.h @@ -308,5 +308,8 @@ void call_base(LinphoneMediaEncryption mode, bool_t enable_video,bool_t enable_r bool_t call_with_caller_params(LinphoneCoreManager* caller_mgr,LinphoneCoreManager* callee_mgr, const LinphoneCallParams *params); bool_t pause_call_1(LinphoneCoreManager* mgr_1,LinphoneCall* call_1,LinphoneCoreManager* mgr_2,LinphoneCall* call_2); bool_t compare_files(const char *path1, const char *path2); + +static const int audio_cmp_min_overlap=90; + #endif /* LIBLINPHONE_TESTER_H_ */