]> git.sesse.net Git - vlc/commitdiff
Skins: control volume through playlist
authorRémi Denis-Courmont <remi@remlab.net>
Thu, 9 Jul 2009 19:14:35 +0000 (22:14 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Thu, 9 Jul 2009 19:14:35 +0000 (22:14 +0300)
modules/gui/skins2/commands/cmd_input.cpp
modules/gui/skins2/src/vlcproc.cpp
modules/gui/skins2/vars/volume.cpp

index c91b0aaca3f03a46b589e4b5497932fdd33c68b4..d44e33d02d7b70c3d45a50fbe4299e1ad3d3e402 100644 (file)
@@ -111,18 +111,24 @@ void CmdFaster::execute()
 
 void CmdMute::execute()
 {
-    aout_TogleMute( getIntf(), NULL );
+    playlist_t *pPlaylist = getIntf()->p_sys->p_playlist;
+
+    aout_TogleMute( pPlaylist, NULL );
 }
 
 
 void CmdVolumeUp::execute()
 {
-    aout_VolumeUp( getIntf(), 1, NULL );
+    playlist_t *pPlaylist = getIntf()->p_sys->p_playlist;
+
+    aout_VolumeUp( pPlaylist, 1, NULL );
 }
 
 
 void CmdVolumeDown::execute()
 {
-    aout_VolumeDown( getIntf(), 1, NULL );
+    playlist_t *pPlaylist = getIntf()->p_sys->p_playlist;
+
+    aout_VolumeDown( pPlaylist, 1, NULL );
 }
 
index f0bca587407c38b755c655d5baff82c339b1eb82..a9a8786cc6612b8b27ab2ed55006d168aef98fc4 100644 (file)
@@ -258,7 +258,7 @@ void VlcProc::refreshAudio()
 
     // Refresh sound volume
     audio_volume_t volume;
-    aout_VolumeGet( getIntf(), &volume );
+    aout_VolumeGet( getIntf()->p_sys->p_playlist, &volume );
     Volume *pVolume = (Volume*)m_cVarVolume.get();
     pVolume->set( (double)volume * 2.0 / AOUT_VOLUME_MAX );
 
index 9227a61abb9c8198d07df341e96268d4bdc540db..632c0029d6cd22967ba75e4205bb3f94f618c59d 100644 (file)
@@ -34,7 +34,8 @@ Volume::Volume( intf_thread_t *pIntf ): VarPercent( pIntf )
 {
     // Initial value
     audio_volume_t val;
-    aout_VolumeGet( getIntf(), &val );
+
+    aout_VolumeGet( getIntf()->p_sys->p_playlist, &val );
     VarPercent::set( val * 2.0 / AOUT_VOLUME_MAX );
 }
 
@@ -47,7 +48,8 @@ void Volume::set( float percentage )
     {
         VarPercent::set( percentage );
 
-        aout_VolumeSet( getIntf(), (int)(get() * AOUT_VOLUME_MAX / 2.0) );
+        aout_VolumeSet( getIntf()->p_sys->p_playlist(),
+                        (int)(get() * AOUT_VOLUME_MAX / 2.0) );
     }
 }