Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
8c1d79e1
Commit
8c1d79e1
authored
Jul 09, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Skins: control volume through playlist
parent
76099331
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
6 deletions
+14
-6
modules/gui/skins2/commands/cmd_input.cpp
modules/gui/skins2/commands/cmd_input.cpp
+9
-3
modules/gui/skins2/src/vlcproc.cpp
modules/gui/skins2/src/vlcproc.cpp
+1
-1
modules/gui/skins2/vars/volume.cpp
modules/gui/skins2/vars/volume.cpp
+4
-2
No files found.
modules/gui/skins2/commands/cmd_input.cpp
View file @
8c1d79e1
...
...
@@ -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
);
}
modules/gui/skins2/src/vlcproc.cpp
View file @
8c1d79e1
...
...
@@ -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
);
...
...
modules/gui/skins2/vars/volume.cpp
View file @
8c1d79e1
...
...
@@ -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
)
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment