Merge branch 'master' of git.linphone.org:linphone-private

This commit is contained in:
Jehan Monnier 2010-06-25 11:23:15 +02:00
commit d1f0a3cebe
4 changed files with 25 additions and 22 deletions

2
NEWS
View file

@ -1,4 +1,4 @@
linphone-3.3.2 -- June 23, 2010 linphone-3.3.2 -- June 25, 2010
* fix crash when setting firewall address in gtk interface * fix crash when setting firewall address in gtk interface
* fix crash while closing video window on windows * fix crash while closing video window on windows
* fix un-sent BYE message in some rare cases. * fix un-sent BYE message in some rare cases.

View file

@ -142,7 +142,11 @@ static void spawn_linphonec(int argc, char *argv[]){
} }
args[j++]=NULL; args[j++]=NULL;
#ifdef __uClinux__
pid = vfork(); pid = vfork();
#else
pid = fork();
#endif
if (pid < 0){ if (pid < 0){
fprintf(stderr,"Could not fork\n"); fprintf(stderr,"Could not fork\n");
exit(-1); exit(-1);

View file

@ -2174,8 +2174,8 @@ void linphone_core_init_media_streams(LinphoneCore *lc, LinphoneCall *call){
const char *type=lp_config_get_string(lc->config,"sound","el_type","mic"); const char *type=lp_config_get_string(lc->config,"sound","el_type","mic");
if (strcasecmp(type,"mic")==0) if (strcasecmp(type,"mic")==0)
audio_stream_enable_echo_limiter(lc->audiostream,ELControlMic); audio_stream_enable_echo_limiter(lc->audiostream,ELControlMic);
else if (strcasecmp(type,"speaker")==0) else if (strcasecmp(type,"full")==0)
audio_stream_enable_echo_limiter(lc->audiostream,ELControlSpeaker); audio_stream_enable_echo_limiter(lc->audiostream,ELControlFull);
} }
audio_stream_enable_gain_control(lc->audiostream,TRUE); audio_stream_enable_gain_control(lc->audiostream,TRUE);
if (linphone_core_echo_cancellation_enabled(lc)){ if (linphone_core_echo_cancellation_enabled(lc)){
@ -2241,9 +2241,10 @@ static void parametrize_equalizer(LinphoneCore *lc, AudioStream *st){
static void post_configure_audio_streams(LinphoneCore *lc){ static void post_configure_audio_streams(LinphoneCore *lc){
AudioStream *st=lc->audiostream; AudioStream *st=lc->audiostream;
float gain=lp_config_get_float(lc->config,"sound","mic_gain",-1); float mic_gain=lp_config_get_float(lc->config,"sound","mic_gain",-1);
if (gain!=-1) float thres = 0;
audio_stream_set_mic_gain(st,gain); if (mic_gain!=-1)
audio_stream_set_mic_gain(st,mic_gain);
lc->audio_muted=FALSE; lc->audio_muted=FALSE;
float recv_gain = lc->sound_conf.soft_play_lev; float recv_gain = lc->sound_conf.soft_play_lev;
if (recv_gain != 0) { if (recv_gain != 0) {
@ -2251,36 +2252,34 @@ static void post_configure_audio_streams(LinphoneCore *lc){
} }
if (linphone_core_echo_limiter_enabled(lc)){ if (linphone_core_echo_limiter_enabled(lc)){
float speed=lp_config_get_float(lc->config,"sound","el_speed",-1); float speed=lp_config_get_float(lc->config,"sound","el_speed",-1);
float thres=lp_config_get_float(lc->config,"sound","el_thres",-1); thres=lp_config_get_float(lc->config,"sound","el_thres",-1);
float force=lp_config_get_float(lc->config,"sound","el_force",-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); int sustain=lp_config_get_int(lc->config,"sound","el_sustain",-1);
MSFilter *f=NULL; MSFilter *f=NULL;
if (st->el_type==ELControlMic){ if (st->el_type!=ELInactive){
f=st->volsend; f=st->volsend;
if (speed==-1) speed=0.03; if (speed==-1) speed=0.03;
if (force==-1) force=10; if (force==-1) force=25;
}
else if (st->el_type==ELControlSpeaker){
f=st->volrecv;
if (speed==-1) speed=0.02;
if (force==-1) force=5;
}
if (speed!=-1)
ms_filter_call_method(f,MS_VOLUME_SET_EA_SPEED,&speed); ms_filter_call_method(f,MS_VOLUME_SET_EA_SPEED,&speed);
ms_filter_call_method(f,MS_VOLUME_SET_EA_FORCE,&force);
if (thres!=-1) if (thres!=-1)
ms_filter_call_method(f,MS_VOLUME_SET_EA_THRESHOLD,&thres); ms_filter_call_method(f,MS_VOLUME_SET_EA_THRESHOLD,&thres);
if (force!=-1)
ms_filter_call_method(f,MS_VOLUME_SET_EA_FORCE,&force);
if (sustain!=-1) if (sustain!=-1)
ms_filter_call_method(f,MS_VOLUME_SET_EA_SUSTAIN,&sustain); ms_filter_call_method(f,MS_VOLUME_SET_EA_SUSTAIN,&sustain);
} }
if (st->volsend){ }
float ng_thres=lp_config_get_float(lc->config,"sound","ng_thres",0.05); float ng_thres=lp_config_get_float(lc->config,"sound","ng_thres",0.05);
float ng_floorgain=lp_config_get_float(lc->config,"sound","ng_floorgain",0); float ng_floorgain=lp_config_get_float(lc->config,"sound","ng_floorgain",0);
if (st->volsend){
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_THRESHOLD,&ng_thres);
ms_filter_call_method(st->volsend,MS_VOLUME_SET_NOISE_GATE_FLOORGAIN,&ng_floorgain); ms_filter_call_method(st->volsend,MS_VOLUME_SET_NOISE_GATE_FLOORGAIN,&ng_floorgain);
} }
if (st->volrecv){
/* parameters for a limited noise-gate effect, using echo limiter threshold */
float floorgain = 1/mic_gain;
ms_filter_call_method(st->volrecv,MS_VOLUME_SET_NOISE_GATE_THRESHOLD,&thres);
ms_filter_call_method(st->volrecv,MS_VOLUME_SET_NOISE_GATE_FLOORGAIN,&floorgain);
}
parametrize_equalizer(lc,st); parametrize_equalizer(lc,st);
if (lc->vtable.dtmf_received!=NULL){ if (lc->vtable.dtmf_received!=NULL){
/* replace by our default action*/ /* replace by our default action*/
@ -3007,7 +3006,7 @@ bool_t linphone_core_echo_limiter_enabled(const LinphoneCore *lc){
void linphone_core_mute_mic(LinphoneCore *lc, bool_t val){ void linphone_core_mute_mic(LinphoneCore *lc, bool_t val){
if (lc->audiostream!=NULL){ if (lc->audiostream!=NULL){
audio_stream_set_mic_gain(lc->audiostream, audio_stream_set_mic_gain(lc->audiostream,
(val==TRUE) ? 0 : 1.0); (val==TRUE) ? 0 : 1.0); // REVISIT: take mic_gain value
if ( linphone_core_get_rtp_no_xmit_on_audio_mute(lc) ){ if ( linphone_core_get_rtp_no_xmit_on_audio_mute(lc) ){
audio_stream_mute_rtp(lc->audiostream,val); audio_stream_mute_rtp(lc->audiostream,val);
} }

@ -1 +1 @@
Subproject commit 0401519a5946e9216c836ef6271bb2b3bf688179 Subproject commit 5427df9376b8390a9c2c08d482c5324264a6a65e