]> git.sesse.net Git - vlc/blobdiff - src/audio_output/intf.c
More prefs fixes
[vlc] / src / audio_output / intf.c
index 3edbc35fdbdf4a964451b8a9432823f510f8acfb..5aeccfef6bab0f6329860484815002f382034277 100644 (file)
@@ -144,7 +144,8 @@ int __aout_VolumeUp( vlc_object_t * p_object, int i_nb_steps,
         i = AOUT_VOLUME_MAX;
     }
     config_PutInt( p_object, "volume", i );
-    config_PutInt( p_object, "saved-volume", i );
+    var_Create( p_object->p_libvlc, "saved-volume", VLC_VAR_INTEGER );
+    var_SetInteger( p_object->p_libvlc, "saved-volume" , i );
     if ( pi_volume != NULL ) *pi_volume = (audio_volume_t)i;
 
     if ( p_aout == NULL ) return 0;
@@ -180,7 +181,8 @@ int __aout_VolumeDown( vlc_object_t * p_object, int i_nb_steps,
         i = AOUT_VOLUME_MIN;
     }
     config_PutInt( p_object, "volume", i );
-    config_PutInt( p_object, "saved-volume", i );
+    var_Create( p_object->p_libvlc, "saved-volume", VLC_VAR_INTEGER );
+    var_SetInteger( p_object->p_libvlc, "saved-volume", i );
     if ( pi_volume != NULL ) *pi_volume = (audio_volume_t)i;
 
     if ( p_aout == NULL ) return 0;
@@ -212,13 +214,16 @@ int __aout_VolumeMute( vlc_object_t * p_object, audio_volume_t * pi_volume )
     {
         /* Mute */
         i_result = aout_VolumeSet( p_object, AOUT_VOLUME_MIN );
-        config_PutInt( p_object, "saved-volume", (int)i_volume );
+        var_Create( p_object->p_libvlc, "saved-volume", VLC_VAR_INTEGER );
+        var_SetInteger( p_object->p_libvlc, "saved-volume", (int)i_volume );
         if ( pi_volume != NULL ) *pi_volume = AOUT_VOLUME_MIN;
     }
     else
     {
         /* Un-mute */
-        i_volume = (audio_volume_t)config_GetInt( p_object, "saved-volume" );
+        var_Create( p_object->p_libvlc, "saved-volume", VLC_VAR_INTEGER );
+        i_volume = (audio_volume_t)var_GetInteger( p_object->p_libvlc,
+                                                   "saved-volume" );
         i_result = aout_VolumeSet( p_object, i_volume );
         if ( pi_volume != NULL ) *pi_volume = i_volume;
     }