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
b10a9e49
Commit
b10a9e49
authored
Feb 26, 2006
by
Clément Stenac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cosmetics.
Add toggle_mute
parent
4d264e84
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
16 deletions
+23
-16
include/vlc/libvlc.h
include/vlc/libvlc.h
+3
-3
src/control/libvlc_audio.c
src/control/libvlc_audio.c
+20
-13
No files found.
include/vlc/libvlc.h
View file @
b10a9e49
...
...
@@ -338,7 +338,7 @@ void libvlc_audio_set_mute( libvlc_instance_t *, vlc_bool_t , libvlc_exception_t
* \param p_exception an initialized exception
* \return the audio level (int)
*/
int
libvlc_audio_
volume_get
(
libvlc_instance_t
*
,
libvlc_exception_t
*
);
int
libvlc_audio_
get_volume
(
libvlc_instance_t
*
,
libvlc_exception_t
*
);
/**
...
...
@@ -348,7 +348,7 @@ int libvlc_audio_volume_get( libvlc_instance_t *, libvlc_exception_t * );
* \param p_exception an initialized exception
* \return void
*/
void
libvlc_audio_
volume_set
(
libvlc_instance_t
*
,
int
,
libvlc_exception_t
*
);
void
libvlc_audio_
set_volume
(
libvlc_instance_t
*
,
int
,
libvlc_exception_t
*
);
/** @} */
...
...
src/control/libvlc_audio.c
View file @
b10a9e49
...
...
@@ -30,7 +30,14 @@
/*****************************************************************************
* libvlc_audio_get_mute : Get the volume state, true if muted
*****************************************************************************/
vlc_bool_t
libvlc_audio_get_mute
(
libvlc_instance_t
*
p_instance
,
libvlc_exception_t
*
p_exception
)
void
libvlc_audio_toggle_mute
(
libvlc_instance_t
*
p_instance
,
libvlc_exception_t
*
p_exception
)
{
aout_VolumeMute
(
p_instance
->
p_vlc
,
NULL
);
}
vlc_bool_t
libvlc_audio_get_mute
(
libvlc_instance_t
*
p_instance
,
libvlc_exception_t
*
p_exception
)
{
/*
* If the volume level is 0, then the channel is muted
...
...
@@ -44,12 +51,12 @@ vlc_bool_t libvlc_audio_get_mute( libvlc_instance_t *p_instance, libvlc_exceptio
return
VLC_FALSE
;
}
void
libvlc_audio_set_mute
(
libvlc_instance_t
*
p_instance
,
vlc_bool_t
status
,
libvlc_exception_t
*
p_exception
)
void
libvlc_audio_set_mute
(
libvlc_instance_t
*
p_instance
,
vlc_bool_t
status
,
libvlc_exception_t
*
p_exception
)
{
if
(
status
)
{
aout_VolumeMute
(
p_instance
->
p_vlc
,
NULL
);
/// \todo
}
else
{
...
...
@@ -62,7 +69,8 @@ void libvlc_audio_set_mute( libvlc_instance_t *p_instance, vlc_bool_t status, li
/*****************************************************************************
* libvlc_audio_volume_get : Get the current volume (range 0-200 %)
*****************************************************************************/
int
libvlc_audio_volume_get
(
libvlc_instance_t
*
p_instance
,
libvlc_exception_t
*
p_exception
)
int
libvlc_audio_get_volume
(
libvlc_instance_t
*
p_instance
,
libvlc_exception_t
*
p_exception
)
{
audio_volume_t
i_volume
;
...
...
@@ -75,10 +83,9 @@ int libvlc_audio_volume_get( libvlc_instance_t *p_instance, libvlc_exception_t *
/*****************************************************************************
* libvlc_audio_volume_set : Set the current volume
*****************************************************************************/
void
libvlc_audio_volume_set
(
libvlc_instance_t
*
p_instance
,
int
i_volume
,
libvlc_exception_t
*
p_exception
)
void
libvlc_audio_set_volume
(
libvlc_instance_t
*
p_instance
,
int
i_volume
,
libvlc_exception_t
*
p_exception
)
{
/** \todo raise exception when volume is not within range */
if
(
i_volume
>=
0
&&
i_volume
<=
200
)
{
i_volume
=
i_volume
*
AOUT_VOLUME_MAX
/
200
;
...
...
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