]> sjero.net Git - linphone/commitdiff
Save in config the values when set playback/mic gains
authorYann Diorcet <yann.diorcet@belledonne-communications.com>
Tue, 6 Nov 2012 14:09:47 +0000 (15:09 +0100)
committerYann Diorcet <yann.diorcet@belledonne-communications.com>
Tue, 6 Nov 2012 14:09:47 +0000 (15:09 +0100)
coreapi/linphonecore.c

index 1af9b08ca3d20307c5e49dd1c2ab7e5e81aa0ff7..0f5f7a7dbe18bdefa225d4f2789a79af3c7bc18a 100644 (file)
@@ -3319,6 +3319,10 @@ void linphone_core_set_mic_gain_db (LinphoneCore *lc, float gaindb){
 
        lc->sound_conf.soft_mic_lev=gaindb;
 
+       if (linphone_core_ready(lc)){
+               lp_config_set_int(lc->config,"sound","mic_gain_db",lc->sound_conf.soft_mic_lev);
+       }
+
        if (call==NULL || (st=call->audiostream)==NULL){
                ms_message("linphone_core_set_mic_gain_db(): no active call.");
                return;
@@ -3348,6 +3352,9 @@ void linphone_core_set_playback_gain_db (LinphoneCore *lc, float gaindb){
        AudioStream *st;
 
        lc->sound_conf.soft_play_lev=gaindb;
+       if (linphone_core_ready(lc)){
+               lp_config_set_int(lc->config,"sound","playback_gain_db",lc->sound_conf.soft_play_lev);
+       }
 
        if (call==NULL || (st=call->audiostream)==NULL){
                ms_message("linphone_core_set_playback_gain_db(): no active call.");