update ms2 for new echo limiter features

This commit is contained in:
Simon Morlat 2011-01-14 12:53:12 +01:00
parent 3ae774c753
commit 7fc7f0e0e2
3 changed files with 21 additions and 1 deletions

View file

@ -83,6 +83,7 @@ static int lpc_cmd_acodec(LinphoneCore *lc, char *args);
static int lpc_cmd_vcodec(LinphoneCore *lc, char *args);
static int lpc_cmd_codec(int type, LinphoneCore *lc, char *args);
static int lpc_cmd_echocancellation(LinphoneCore *lc, char *args);
static int lpc_cmd_echolimiter(LinphoneCore *lc, char *args);
static int lpc_cmd_pause(LinphoneCore *lc, char *args);
static int lpc_cmd_resume(LinphoneCore *lc, char *args);
static int lpc_cmd_mute_mic(LinphoneCore *lc, char *args);
@ -269,6 +270,10 @@ static LPC_COMMAND advanced_commands[] = {
"'ec on [<delay>] [<tail>] [<framesize>]' : turn EC on with given delay, tail length and framesize\n"
"'ec off' : turn echo cancellation (EC) off\n"
"'ec show' : show EC status" },
{ "el", lpc_cmd_echolimiter, "Echo limiter",
"'el on turns on echo limiter (automatic half duplex, for cases where echo canceller cannot work)\n"
"'el off' : turn echo limiter off\n"
"'el show' : show echo limiter status" },
{ "nortp-on-audio-mute", lpc_cmd_rtp_no_xmit_on_audio_mute,
"Set the rtp_no_xmit_on_audio_mute configuration parameter",
" If set to 1 then rtp transmission will be muted when\n"
@ -2210,6 +2215,18 @@ static int lpc_cmd_echocancellation(LinphoneCore *lc, char *args){
return 1;
}
static int lpc_cmd_echolimiter(LinphoneCore *lc, char *args){
if (args){
if (strcmp(args,"on")==0){
linphone_core_enable_echo_limiter (lc,TRUE);
}else if (strcmp(args,"off")==0){
linphone_core_enable_echo_limiter (lc,FALSE);
}
}
linphonec_out("Echo limiter is now %s.\n",linphone_core_echo_limiter_enabled (lc) ? "on":"off");
return 1;
}
static int lpc_cmd_mute_mic(LinphoneCore *lc, char *args)
{
linphone_core_mute_mic(lc, 1);

View file

@ -678,6 +678,7 @@ static void post_configure_audio_streams(LinphoneCall*call){
thres=lp_config_get_float(lc->config,"sound","el_thres",-1);
float force=lp_config_get_float(lc->config,"sound","el_force",-1);
int sustain=lp_config_get_int(lc->config,"sound","el_sustain",-1);
float transmit_thres=lp_config_get_float(lc->config,"sound","el_transmit_thres",-1);
MSFilter *f=NULL;
if (st->el_type!=ELInactive){
f=st->volsend;
@ -689,6 +690,8 @@ static void post_configure_audio_streams(LinphoneCall*call){
ms_filter_call_method(f,MS_VOLUME_SET_EA_THRESHOLD,&thres);
if (sustain!=-1)
ms_filter_call_method(f,MS_VOLUME_SET_EA_SUSTAIN,&sustain);
if (transmit_thres!=-1)
ms_filter_call_method(f,MS_VOLUME_SET_EA_TRANSMIT_THRESHOLD,&transmit_thres);
}
}

@ -1 +1 @@
Subproject commit 82220afa1b04a9ba380c720d5e2bf83347d7404b
Subproject commit 3bdc6245ee1577ae4b123e1a2ab0f56388f34b13