mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-02-01 10:49:26 +00:00
adapt to new MSAudioDiff api
This commit is contained in:
parent
14f40b463d
commit
1f887db632
4 changed files with 10 additions and 7 deletions
|
|
@ -1 +1 @@
|
|||
Subproject commit e9b2d8d4e1ce790f72b1c02c3d3242651f22672d
|
||||
Subproject commit f867353887f9091d6b16958c3a859be5523ba9f7
|
||||
|
|
@ -2415,7 +2415,7 @@ static void call_with_file_player(void) {
|
|||
end_call(marie, pauline);
|
||||
/*cannot run on iphone simulator because locks main loop beyond permitted time (should run
|
||||
on another thread) */
|
||||
BC_ASSERT_EQUAL(ms_audio_diff(hellopath,recordpath,&similar,audio_cmp_max_shift,NULL,NULL), 0, int, "%d");
|
||||
BC_ASSERT_EQUAL(ms_audio_diff(hellopath,recordpath,&similar,&audio_cmp_params,NULL,NULL), 0, int, "%d");
|
||||
if (similar>=threshold)
|
||||
break;
|
||||
}
|
||||
|
|
@ -2492,7 +2492,7 @@ static void call_with_mkv_file_player(void) {
|
|||
}
|
||||
end_call(marie, pauline);
|
||||
#ifdef DO_AUDIO_CMP
|
||||
BC_ASSERT_EQUAL(ms_audio_diff(hellowav,recordpath,&similar,audio_cmp_max_shift,NULL,NULL),0,int,"%d");
|
||||
BC_ASSERT_EQUAL(ms_audio_diff(hellowav,recordpath,&similar,&audio_cmp_params,NULL,NULL),0,int,"%d");
|
||||
BC_ASSERT_GREATER(similar,threshold,double,"%f");
|
||||
BC_ASSERT_LOWER(similar,1.0,double,"%f");
|
||||
if(similar>threshold && similar<=1.0) {
|
||||
|
|
@ -4326,7 +4326,7 @@ static void simple_stereo_call(const char *codec_name, int clock_rate, int bitra
|
|||
min_threshold = .4f;
|
||||
max_threshold = .6f;
|
||||
}
|
||||
BC_ASSERT_EQUAL(ms_audio_diff(recordpath, stereo_file,&similar,audio_cmp_max_shift,completion_cb,NULL), 0, int, "%d");
|
||||
BC_ASSERT_EQUAL(ms_audio_diff(stereo_file, recordpath,&similar,&audio_cmp_params,completion_cb,NULL), 0, int, "%d");
|
||||
BC_ASSERT_GREATER(similar, min_threshold, double, "%g");
|
||||
BC_ASSERT_LOWER(similar, max_threshold, double, "%g");
|
||||
if (similar<min_threshold || similar>max_threshold){
|
||||
|
|
@ -4544,7 +4544,7 @@ static void call_with_rtp_io_mode(void) {
|
|||
wait_for_until(pauline->lc,marie->lc,NULL,0,1000);
|
||||
end_call(pauline,marie);
|
||||
|
||||
BC_ASSERT_EQUAL(ms_audio_diff(hellopath, recordpath, &similar, audio_cmp_max_shift, NULL, NULL), 0, int, "%d");
|
||||
BC_ASSERT_EQUAL(ms_audio_diff(hellopath, recordpath, &similar, &audio_cmp_params, NULL, NULL), 0, int, "%d");
|
||||
if (similar>=threshold) break;
|
||||
}
|
||||
BC_ASSERT_GREATER(similar, threshold, double, "%g");
|
||||
|
|
@ -4819,7 +4819,7 @@ static void custom_rtp_modifier(bool_t pauseResumeTest, bool_t recordTest) {
|
|||
end_call(pauline, marie);
|
||||
|
||||
// Now we compute a similarity factor between the original file and the one we recorded on the callee side
|
||||
BC_ASSERT_EQUAL(ms_audio_diff(hellopath, recordpath, &similar, audio_cmp_max_shift, NULL, NULL), 0, int, "%d");
|
||||
BC_ASSERT_EQUAL(ms_audio_diff(hellopath, recordpath, &similar, &audio_cmp_params, NULL, NULL), 0, int, "%d");
|
||||
|
||||
BC_ASSERT_GREATER(similar, threshold, double, "%g");
|
||||
BC_ASSERT_LOWER(similar, 1.0, double, "%g");
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@
|
|||
|
||||
#include "bc_tester_utils.h"
|
||||
#include "linphonecore.h"
|
||||
#include <mediastreamer2/msutils.h>
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
|
@ -320,7 +321,7 @@ bool_t pause_call_1(LinphoneCoreManager* mgr_1,LinphoneCall* call_1,LinphoneCore
|
|||
bool_t compare_files(const char *path1, const char *path2);
|
||||
void check_media_direction(LinphoneCoreManager* mgr, LinphoneCall *call, MSList* lcs,LinphoneMediaDirection audio_dir, LinphoneMediaDirection video_dir);
|
||||
|
||||
static const int audio_cmp_max_shift=10;
|
||||
extern const MSAudioDiffParams audio_cmp_params;
|
||||
|
||||
/*
|
||||
* this function return max value in the last 3 seconds*/
|
||||
|
|
|
|||
|
|
@ -37,6 +37,8 @@ static int liblinphone_tester_keep_accounts_flag = 0;
|
|||
static int liblinphone_tester_keep_record_files = FALSE;
|
||||
int manager_count = 0;
|
||||
|
||||
const MSAudioDiffParams audio_cmp_params = {10,2000};
|
||||
|
||||
const char* test_domain="sipopen.example.org";
|
||||
const char* auth_domain="sip.example.org";
|
||||
const char* test_username="liblinphone_tester";
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue