Commit b10a9e49 authored by Clément Stenac's avatar Clément Stenac

Cosmetics.

Add toggle_mute
parent 4d264e84
......@@ -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 *);
/** @} */
......
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment