Commit a097d8d8 authored by Simon Morlat's avatar Simon Morlat
Browse files

update ms_audio_diff() calls in test suite to accelerate processing

parent 699f088a
mediastreamer2 @ df8fdb8f
Subproject commit 9c57afef0d3332715b701ec161b0598fe4246b53 Subproject commit df8fdb8f4d4284b294fe5c0890ba89e2943050f5
...@@ -2363,7 +2363,7 @@ static void call_with_file_player(void) { ...@@ -2363,7 +2363,7 @@ static void call_with_file_player(void) {
{ {
double similar; double similar;
const int threshold = 90; 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_GREATER_INT(100*similar, threshold);
BC_ASSERT_LOWER_INT(100*similar, 100); BC_ASSERT_LOWER_INT(100*similar, 100);
if (threshold < 100*similar && 100*similar < 100) { if (threshold < 100*similar && 100*similar < 100) {
...@@ -2441,7 +2441,7 @@ static void call_with_mkv_file_player(void) { ...@@ -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,&pauline->stat.number_of_LinphoneCallEnd,1));
CU_ASSERT_TRUE(wait_for(pauline->lc,marie->lc,&marie->stat.number_of_LinphoneCallEnd,1)); CU_ASSERT_TRUE(wait_for(pauline->lc,marie->lc,&marie->stat.number_of_LinphoneCallEnd,1));
#ifdef DO_AUDIO_CMP #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>threshold);
CU_ASSERT_TRUE(similar<=1.0); CU_ASSERT_TRUE(similar<=1.0);
if(similar>threshold && similar<=1.0) { if(similar>threshold && similar<=1.0) {
......
...@@ -308,5 +308,8 @@ void call_base(LinphoneMediaEncryption mode, bool_t enable_video,bool_t enable_r ...@@ -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 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 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); bool_t compare_files(const char *path1, const char *path2);
static const int audio_cmp_min_overlap=90;
#endif /* LIBLINPHONE_TESTER_H_ */ #endif /* LIBLINPHONE_TESTER_H_ */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment