]> git.sesse.net Git - vlc/commitdiff
Make saved-volume variable a per-libvlc instance rather than per-system process variable.
authorRémi Denis-Courmont <rem@videolan.org>
Sat, 19 May 2007 20:31:02 +0000 (20:31 +0000)
committerRémi Denis-Courmont <rem@videolan.org>
Sat, 19 May 2007 20:31:02 +0000 (20:31 +0000)
I find the original semantic a bit suspicious, but someone should really double check this commit and revert if needed.

src/audio_output/intf.c

index a081ca421cc71ec7ce355865010269bdc25179c3..9591de2c263a7e449ac79793a384c4320d14ac3f 100644 (file)
@@ -165,8 +165,8 @@ int __aout_VolumeUp( vlc_object_t * p_object, int i_nb_steps,
         i_volume = AOUT_VOLUME_MAX;
     }
     config_PutInt( p_object, "volume", i_volume );
-    var_Create( p_object->p_libvlc_global, "saved-volume", VLC_VAR_INTEGER );
-    var_SetInteger( p_object->p_libvlc_global, "saved-volume" ,
+    var_Create( p_object->p_libvlc, "saved-volume", VLC_VAR_INTEGER );
+    var_SetInteger( p_object->p_libvlc, "saved-volume" ,
                     (audio_volume_t) i_volume );
     if ( pi_volume != NULL ) *pi_volume = (audio_volume_t) i_volume;
 
@@ -205,8 +205,8 @@ int __aout_VolumeDown( vlc_object_t * p_object, int i_nb_steps,
         i_volume = AOUT_VOLUME_MIN;
     }
     config_PutInt( p_object, "volume", i_volume );
-    var_Create( p_object->p_libvlc_global, "saved-volume", VLC_VAR_INTEGER );
-    var_SetInteger( p_object->p_libvlc_global, "saved-volume", (audio_volume_t) i_volume );
+    var_Create( p_object->p_libvlc, "saved-volume", VLC_VAR_INTEGER );
+    var_SetInteger( p_object->p_libvlc, "saved-volume", (audio_volume_t) i_volume );
     if ( pi_volume != NULL ) *pi_volume = (audio_volume_t) i_volume;
 
     if ( p_aout == NULL ) return 0;
@@ -238,15 +238,15 @@ int __aout_VolumeMute( vlc_object_t * p_object, audio_volume_t * pi_volume )
     {
         /* Mute */
         i_result = aout_VolumeSet( p_object, AOUT_VOLUME_MIN );
-        var_Create( p_object->p_libvlc_global, "saved-volume", VLC_VAR_INTEGER );
-        var_SetInteger( p_object->p_libvlc_global, "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 */
-        var_Create( p_object->p_libvlc_global, "saved-volume", VLC_VAR_INTEGER );
-        i_volume = (audio_volume_t)var_GetInteger( p_object->p_libvlc_global,
+        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;