Changeset 358:31895a961d7c in mediastreamer2
- Timestamp:
- Mar 24, 2009 9:36:22 PM (4 years ago)
- Branch:
- default
- Location:
- linphone
- Files:
-
- 3 edited
-
coreapi/linphonecore.c (modified) (2 diffs)
-
mediastreamer2/include/mediastreamer2/msvolume.h (modified) (1 diff)
-
mediastreamer2/src/msvolume.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
linphone/coreapi/linphonecore.c
r357 r358 1440 1440 float speed=lp_config_get_float(lc->config,"sound","el_speed",-1); 1441 1441 float thres=lp_config_get_float(lc->config,"sound","el_thres",-1); 1442 float force=lp_config_get_float(lc->config,"sound","el_force",-1); 1442 1443 MSFilter *f; 1443 1444 if (st->el_type==ELControlMic) … … 1448 1449 if (thres!=-1) 1449 1450 ms_filter_call_method(f,MS_VOLUME_SET_EA_THRESHOLD,&thres); 1451 if (force!=-1) 1452 ms_filter_call_method(f,MS_VOLUME_SET_EA_FORCE,&force); 1450 1453 } 1451 1454 if (lc->vtable.dtmf_received!=NULL){ -
linphone/mediastreamer2/include/mediastreamer2/msvolume.h
r354 r358 47 47 #define MS_VOLUME_SET_EA_SPEED MS_FILTER_METHOD(MS_VOLUME_ID,6,float) 48 48 49 #define MS_VOLUME_SET_EA_FORCE MS_FILTER_METHOD(MS_VOLUME_ID,7,float) 50 49 51 extern MSFilterDesc ms_volume_desc; 50 52 -
linphone/mediastreamer2/src/msvolume.c
r356 r358 35 35 float gain_k; 36 36 float thres; 37 float force; 37 38 MSFilter *peer; 38 39 bool_t ea_active; … … 47 48 v->gain_k=gain_k; 48 49 v->thres=noise_thres; 50 v->force=en_weight; 49 51 v->peer=NULL; 50 52 f->data=v; … … 84 86 if (peer_e>v->thres){ 85 87 /*lower our output*/ 86 gain=compute_gain(v->static_gain,peer_e, en_weight);88 gain=compute_gain(v->static_gain,peer_e,v->force); 87 89 }else { 88 90 gain=v->static_gain; … … 94 96 if (peer_e>v->thres && ! peer_active){ 95 97 /*lower our output*/ 96 gain=compute_gain(v->static_gain,peer_e, en_weight);98 gain=compute_gain(v->static_gain,peer_e,v->force); 97 99 v->ea_active=TRUE; 98 100 }else gain=v->static_gain; … … 146 148 } 147 149 v->gain_k=val; 150 return 0; 151 } 152 153 static int volume_set_ea_force(MSFilter *f, void*arg){ 154 Volume *v=(Volume*)f->data; 155 float val=*(float*)arg; 156 v->force=val; 148 157 return 0; 149 158 } … … 189 198 { MS_VOLUME_SET_EA_THRESHOLD , volume_set_ea_threshold }, 190 199 { MS_VOLUME_SET_EA_SPEED , volume_set_ea_speed }, 200 { MS_VOLUME_SET_EA_FORCE , volume_set_ea_force }, 191 201 { 0 , NULL } 192 202 };
Note: See TracChangeset
for help on using the changeset viewer.
