mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-29 17:29:20 +00:00
Fix "Call/Call with file player" tester
This commit is contained in:
parent
8ace78e2f8
commit
15dcfa4071
1 changed files with 7 additions and 4 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue