]> git.sesse.net Git - vlc/commitdiff
OSX: set volume on playlist
authorRémi Denis-Courmont <remi@remlab.net>
Thu, 9 Jul 2009 19:13:40 +0000 (22:13 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Thu, 9 Jul 2009 19:13:40 +0000 (22:13 +0300)
modules/gui/macosx/controls.m
modules/gui/macosx/intf.m

index 9166fbf570661bbcf793530929305015c9409962..d07ea81c83ed4d376f8cf1a3d030f43ae466e6c7 100644 (file)
 - (IBAction)volumeSliderUpdated:(id)sender
 {
     intf_thread_t * p_intf = VLCIntf;
+    playlist_t * p_playlist = pl_Hold( p_intf );
     audio_volume_t i_volume = (audio_volume_t)[sender intValue];
-    int i_volume_step = 0;
+    int i_volume_step;
+
     i_volume_step = config_GetInt( p_intf->p_libvlc, "volume-step" );
-    aout_VolumeSet( p_intf, i_volume * i_volume_step );
+    aout_VolumeSet( p_playlist, i_volume * i_volume_step );
+    pl_Release( p_playlist );
     /* Manage volume status */
     [o_main manageVolumeSlider];
 }
index de53ee1f66fc8b5f12446b4bef0e5332ce16b96c..6f489ea5273a9461df666fb179e712526dc6d217 100644 (file)
@@ -1612,7 +1612,10 @@ static void manage_cleanup( void * args )
 - (void)manageVolumeSlider
 {
     audio_volume_t i_volume;
-    aout_VolumeGet( p_intf, &i_volume );
+    playlist_t * p_playlist = pl_Hold( p_intf );
+
+    aout_VolumeGet( p_playlist, &i_volume );
+    pl_Release( p_intf );
 
     if( i_volume != i_lastShownVolume )
     {