]> sjero.net Git - linphone/commitdiff
fix get_soft_playback_level(): was returning the measured volume !
authorSimon Morlat <simon.morlat@linphone.org>
Thu, 17 Jun 2010 10:17:42 +0000 (12:17 +0200)
committerSimon Morlat <simon.morlat@linphone.org>
Thu, 17 Jun 2010 10:17:42 +0000 (12:17 +0200)
coreapi/linphonecore.c
mediastreamer2

index ce57abed81670ab57531322f53dbfec4ffc349b1..8f86188ba5915c03bf9247a13600d8601f56676e 100644 (file)
@@ -2655,7 +2655,11 @@ void linphone_core_set_ring_level(LinphoneCore *lc, int level){
        if (sndcard) ms_snd_card_set_level(sndcard,MS_SND_CARD_PLAYBACK,level);
 }
 
-
+/**
+ * Sets call playback gain in db
+ *
+ * @ingroup media_parameters
+**/
 void linphone_core_set_soft_play_level(LinphoneCore *lc, float level){
        float gain=level;
        lc->sound_conf.soft_play_lev=level;
@@ -2666,11 +2670,17 @@ void linphone_core_set_soft_play_level(LinphoneCore *lc, float level){
                ms_filter_call_method(st->volrecv,MS_VOLUME_SET_DB_GAIN,&gain);
        }else ms_warning("Could not apply gain: gain control wasn't activated.");
 }
+
+/**
+ * Returns call playback gain in db
+ *
+ * @ingroup media_parameters
+**/
 float linphone_core_get_soft_play_level(LinphoneCore *lc) {
        float gain=0;
        AudioStream *st=lc->audiostream;
        if (st->volrecv){
-               ms_filter_call_method(st->volrecv,MS_VOLUME_GET,&gain);
+               ms_filter_call_method(st->volrecv,MS_VOLUME_GET_GAIN_DB,&gain);
        }else ms_warning("Could not get gain: gain control wasn't activated.");
 
        return gain;
index f05af00e9c6d04920ad352633413f4065d00744f..17e879de84d894df6a1875665594567c1cf43617 160000 (submodule)
@@ -1 +1 @@
-Subproject commit f05af00e9c6d04920ad352633413f4065d00744f
+Subproject commit 17e879de84d894df6a1875665594567c1cf43617