[vlc-devel] commit: OSX: set volume on playlist ( Rémi Denis-Courmont )
git version control
git at videolan.org
Thu Jul 9 21:15:12 CEST 2009
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Jul 9 22:13:40 2009 +0300| [a528e8a9f76f178702411a146bb89ee806e45943] | committer: Rémi Denis-Courmont
OSX: set volume on playlist
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a528e8a9f76f178702411a146bb89ee806e45943
---
modules/gui/macosx/controls.m | 7 +++++--
modules/gui/macosx/intf.m | 5 ++++-
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/modules/gui/macosx/controls.m b/modules/gui/macosx/controls.m
index 9166fbf..d07ea81 100644
--- a/modules/gui/macosx/controls.m
+++ b/modules/gui/macosx/controls.m
@@ -420,10 +420,13 @@
- (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];
}
diff --git a/modules/gui/macosx/intf.m b/modules/gui/macosx/intf.m
index de53ee1..6f489ea 100644
--- a/modules/gui/macosx/intf.m
+++ b/modules/gui/macosx/intf.m
@@ -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 )
{
More information about the vlc-devel
mailing list