[vlc-devel] commit: Skins: control volume through playlist ( Rémi Denis-Courmont )
git version control
git at videolan.org
Thu Jul 9 21:15:13 CEST 2009
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Jul 9 22:14:35 2009 +0300| [8c1d79e1b446f8b80cdd023f2aca8e3a141ab91d] | committer: Rémi Denis-Courmont
Skins: control volume through playlist
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8c1d79e1b446f8b80cdd023f2aca8e3a141ab91d
---
modules/gui/skins2/commands/cmd_input.cpp | 12 +++++++++---
modules/gui/skins2/src/vlcproc.cpp | 2 +-
modules/gui/skins2/vars/volume.cpp | 6 ++++--
3 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/modules/gui/skins2/commands/cmd_input.cpp b/modules/gui/skins2/commands/cmd_input.cpp
index c91b0aa..d44e33d 100644
--- a/modules/gui/skins2/commands/cmd_input.cpp
+++ b/modules/gui/skins2/commands/cmd_input.cpp
@@ -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 );
}
diff --git a/modules/gui/skins2/src/vlcproc.cpp b/modules/gui/skins2/src/vlcproc.cpp
index f0bca58..a9a8786 100644
--- a/modules/gui/skins2/src/vlcproc.cpp
+++ b/modules/gui/skins2/src/vlcproc.cpp
@@ -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 );
diff --git a/modules/gui/skins2/vars/volume.cpp b/modules/gui/skins2/vars/volume.cpp
index 9227a61..632c002 100644
--- a/modules/gui/skins2/vars/volume.cpp
+++ b/modules/gui/skins2/vars/volume.cpp
@@ -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) );
}
}
More information about the vlc-devel
mailing list