+/**
+ * Allow to control microphone level: gain in db
+ *
+ * @ingroup media_parameters
+**/
+void linphone_core_set_mic_gain_db (LinphoneCore *lc, float gaindb){
+ float gain=gaindb;
+ LinphoneCall *call=linphone_core_get_current_call (lc);
+ AudioStream *st;
+
+ lc->sound_conf.soft_mic_lev=gaindb;
+
+ if (call==NULL || (st=call->audiostream)==NULL){
+ ms_message("linphone_core_set_mic_gain_db(): no active call.");
+ return;
+ }
+ if (st->volrecv){
+ ms_filter_call_method(st->volsend,MS_VOLUME_SET_DB_GAIN,&gain);
+ }else ms_warning("Could not apply gain: gain control wasn't activated.");
+}
+
+/**
+ * Get microphone gain in db.
+ *
+ * @ingroup media_parameters
+**/
+float linphone_core_get_mic_gain_db(LinphoneCore *lc) {
+ return lc->sound_conf.soft_mic_lev;
+}
+