--- a/coreapi/linphonecall.c 2014-01-07 03:00:34.000000000 +0100 +++ b/coreapi/linphonecall.c 2014-01-07 03:05:49.329881606 +0100 @@ -1359,6 +1359,8 @@ 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); + float agc_thres=lp_config_get_float(lc->config,"sound","agc_thres",-1); + MSFilter *f=NULL; f=st->volsend; if (speed==-1) speed=0.03; @@ -1371,6 +1373,8 @@ 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); + if (agc_thres!=-1) + ms_filter_call_method(f,MS_VOLUME_SET_AGC_THRESHOLD,&agc_thres); ms_filter_call_method(st->volsend,MS_VOLUME_SET_NOISE_GATE_THRESHOLD,&ng_thres); ms_filter_call_method(st->volsend,MS_VOLUME_SET_NOISE_GATE_FLOORGAIN,&ng_floorgain); @@ -1379,9 +1383,13 @@ /* parameters for a limited noise-gate effect, using echo limiter threshold */ float floorgain = 1/pow(10,(mic_gain)/10); int spk_agc=lp_config_get_int(lc->config,"sound","speaker_agc_enabled",0); + float spk_agc_thres=lp_config_get_float(lc->config,"sound","speaker_agc_thres",-1); ms_filter_call_method(st->volrecv, MS_VOLUME_ENABLE_AGC, &spk_agc); ms_filter_call_method(st->volrecv,MS_VOLUME_SET_NOISE_GATE_THRESHOLD,&ng_thres); ms_filter_call_method(st->volrecv,MS_VOLUME_SET_NOISE_GATE_FLOORGAIN,&floorgain); + + if (spk_agc_thres!=-1) + ms_filter_call_method(st->volrecv,MS_VOLUME_SET_AGC_THRESHOLD,&spk_agc_thres); } parametrize_equalizer(lc,st); }