Commit f2c5d3a1 authored by smorlat's avatar smorlat

fix crash when echo limiter is disabled.

git-svn-id: svn+ssh://svn.savannah.nongnu.org/linphone/trunk@663 3f6dc0c8-ddfe-455d-9043-3cd528dc4637
parent 75d5ae34
......@@ -1561,12 +1561,14 @@ static void parametrize_equalizer(LinphoneCore *lc, AudioStream *st){
static void post_configure_audio_streams(LinphoneCore *lc){
AudioStream *st=lc->audiostream;
if (st->volrecv && st->volsend){
float gain=lp_config_get_float(lc->config,"sound","mic_gain",-1);
if (gain!=-1)
audio_stream_set_mic_gain(st,gain);
if (linphone_core_echo_limiter_enabled(lc)){
float speed=lp_config_get_float(lc->config,"sound","el_speed",-1);
float 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 gain=lp_config_get_float(lc->config,"sound","mic_gain",-1);
MSFilter *f=NULL;
if (st->el_type==ELControlMic){
f=st->volsend;
......@@ -1586,8 +1588,7 @@ static void post_configure_audio_streams(LinphoneCore *lc){
ms_filter_call_method(f,MS_VOLUME_SET_EA_FORCE,&force);
if (sustain!=-1)
ms_filter_call_method(f,MS_VOLUME_SET_EA_SUSTAIN,&sustain);
if (gain!=-1)
audio_stream_set_mic_gain(st,gain);
}
parametrize_equalizer(lc,st);
if (lc->vtable.dtmf_received!=NULL){
......
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