Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
f1330ca6
Commit
f1330ca6
authored
Jul 09, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DBus: set volume on playlist
parent
e70c42ef
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
modules/control/dbus.c
modules/control/dbus.c
+8
-3
No files found.
modules/control/dbus.c
View file @
f1330ca6
...
@@ -236,8 +236,12 @@ DBUS_METHOD( VolumeGet )
...
@@ -236,8 +236,12 @@ DBUS_METHOD( VolumeGet )
OUT_ARGUMENTS
;
OUT_ARGUMENTS
;
dbus_int32_t
i_dbus_vol
;
dbus_int32_t
i_dbus_vol
;
audio_volume_t
i_vol
;
audio_volume_t
i_vol
;
/* 2nd argument of aout_VolumeGet is int32 */
/* 2nd argument of aout_VolumeGet is int32 */
aout_VolumeGet
(
(
vlc_object_t
*
)
p_this
,
&
i_vol
);
playlist_t
*
p_playlist
=
pl_Hold
(
((
vlc_object_t
*
)
p_this
)
);
aout_VolumeGet
(
p_playlist
,
&
i_vol
);
pl_Release
(
((
vlc_object_t
*
)
p_this
)
);
double
f_vol
=
100
.
*
i_vol
/
AOUT_VOLUME_MAX
;
double
f_vol
=
100
.
*
i_vol
/
AOUT_VOLUME_MAX
;
i_dbus_vol
=
round
(
f_vol
);
i_dbus_vol
=
round
(
f_vol
);
ADD_INT32
(
&
i_dbus_vol
);
ADD_INT32
(
&
i_dbus_vol
);
...
@@ -268,8 +272,9 @@ DBUS_METHOD( VolumeSet )
...
@@ -268,8 +272,9 @@ DBUS_METHOD( VolumeSet )
double
f_vol
=
AOUT_VOLUME_MAX
*
i_dbus_vol
/
100
.;
double
f_vol
=
AOUT_VOLUME_MAX
*
i_dbus_vol
/
100
.;
i_vol
=
round
(
f_vol
);
i_vol
=
round
(
f_vol
);
aout_VolumeSet
(
(
vlc_object_t
*
)
p_this
,
i_vol
);
playlist_t
*
p_playlist
=
pl_Hold
(
((
vlc_object_t
*
)
p_this
)
);
aout_VolumeSet
(
p_playlist
,
i_vol
);
pl_Release
(
((
vlc_object_t
*
)
p_this
)
);
REPLY_SEND
;
REPLY_SEND
;
}
}
...
...
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