Commit 15dcfa40 authored by François Grisez's avatar François Grisez

Fix "Call/Call with file player" tester

parent 8ace78e2
......@@ -2028,12 +2028,12 @@ static void call_with_file_player(void) {
snprintf(hellopath,sizeof(hellopath), "%s/sounds/hello8000.wav", liblinphone_tester_file_prefix);
/*caller uses files instead of soundcard in order to avoid mixing soundcard input with file played using call's player*/
linphone_core_use_files(pauline->lc,TRUE);
linphone_core_set_play_file(pauline->lc,NULL);
linphone_core_use_files(marie->lc,TRUE);
linphone_core_set_play_file(marie->lc,NULL);
/*callee is recording and plays file*/
linphone_core_use_files(pauline->lc,TRUE);
linphone_core_set_play_file(pauline->lc,hellopath);
linphone_core_set_play_file(pauline->lc,NULL);
linphone_core_set_record_file(pauline->lc,recordpath);
CU_ASSERT_TRUE(call(marie,pauline));
......@@ -2051,8 +2051,11 @@ static void call_with_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));
CU_ASSERT_TRUE(ms_audio_diff(hellopath,recordpath,&similar,NULL,NULL)==0);
CU_ASSERT_TRUE(similar>0.9);
CU_ASSERT_TRUE(similar>0.4);
CU_ASSERT_TRUE(similar<=1.0);
if(similar > 0.4 && similar <=1.0) {
remove(recordpath);
}
linphone_core_manager_destroy(marie);
linphone_core_manager_destroy(pauline);
ms_free(recordpath);
......
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