Commit 297280a2 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

aout_MuteSet: fix name and remove unused parameter

parent 9b965746
...@@ -38,7 +38,8 @@ VLC_API int aout_VolumeUp( vlc_object_t *, int, audio_volume_t * ); ...@@ -38,7 +38,8 @@ VLC_API int aout_VolumeUp( vlc_object_t *, int, audio_volume_t * );
#define aout_VolumeDown(a, b, c) aout_VolumeUp(a, -(b), c) #define aout_VolumeDown(a, b, c) aout_VolumeUp(a, -(b), c)
VLC_API int aout_MuteToggle( vlc_object_t * ); VLC_API int aout_MuteToggle( vlc_object_t * );
#define aout_MuteToggle(a) aout_MuteToggle(VLC_OBJECT(a)) #define aout_MuteToggle(a) aout_MuteToggle(VLC_OBJECT(a))
VLC_API int aout_SetMute( vlc_object_t *, audio_volume_t *, bool ); VLC_API int aout_MuteSet( vlc_object_t *, bool );
#define aout_MuteSet(a, b) aout_MuteSet(VLC_OBJECT(a), b)
VLC_API bool aout_IsMuted( vlc_object_t * ); VLC_API bool aout_IsMuted( vlc_object_t * );
VLC_API void aout_EnableFilter( vlc_object_t *, const char *, bool ); VLC_API void aout_EnableFilter( vlc_object_t *, const char *, bool );
......
...@@ -323,7 +323,7 @@ int libvlc_audio_get_mute( libvlc_media_player_t *mp ) ...@@ -323,7 +323,7 @@ int libvlc_audio_get_mute( libvlc_media_player_t *mp )
void libvlc_audio_set_mute( libvlc_media_player_t *mp, int mute ) void libvlc_audio_set_mute( libvlc_media_player_t *mp, int mute )
{ {
aout_SetMute( VLC_OBJECT(mp), NULL, !!mute ); aout_MuteSet( VLC_OBJECT(mp), mute != 0 );
} }
/***************************************************************************** /*****************************************************************************
......
...@@ -204,7 +204,7 @@ void SoundWidget::setMuted( bool mute ) ...@@ -204,7 +204,7 @@ void SoundWidget::setMuted( bool mute )
{ {
b_is_muted = mute; b_is_muted = mute;
playlist_t *p_playlist = pl_Get( p_intf ); playlist_t *p_playlist = pl_Get( p_intf );
aout_SetMute( VLC_OBJECT(p_playlist), NULL, mute ); aout_MuteSet( VLC_OBJECT(p_playlist), mute );
} }
bool SoundWidget::eventFilter( QObject *obj, QEvent *e ) bool SoundWidget::eventFilter( QObject *obj, QEvent *e )
......
...@@ -187,6 +187,7 @@ int aout_VolumeUp (vlc_object_t *obj, int value, audio_volume_t *volp) ...@@ -187,6 +187,7 @@ int aout_VolumeUp (vlc_object_t *obj, int value, audio_volume_t *volp)
int aout_MuteToggle (vlc_object_t *obj) int aout_MuteToggle (vlc_object_t *obj)
{ {
audio_output_t *aout; audio_output_t *aout;
float vol;
bool mute; bool mute;
prepareVolume (obj, &aout, &vol, &mute); prepareVolume (obj, &aout, &vol, &mute);
...@@ -207,20 +208,17 @@ bool aout_IsMuted (vlc_object_t *obj) ...@@ -207,20 +208,17 @@ bool aout_IsMuted (vlc_object_t *obj)
return mute; return mute;
} }
#undef aout_MuteSet
/** /**
* Sets mute status. * Sets mute status.
*/ */
int aout_SetMute (vlc_object_t *obj, audio_volume_t *volp, bool mute) int aout_MuteSet (vlc_object_t *obj, bool mute)
{ {
audio_output_t *aout; audio_output_t *aout;
int ret;
float vol; float vol;
prepareVolume (obj, &aout, &vol, NULL); prepareVolume (obj, &aout, &vol, NULL);
ret = commitVolume (obj, aout, vol, mute); return commitVolume (obj, aout, vol, mute);
if (volp != NULL)
*volp = mute ? 0 : lroundf (vol * AOUT_VOLUME_DEFAULT);
return ret;
} }
......
...@@ -18,8 +18,8 @@ aout_VolumeGet ...@@ -18,8 +18,8 @@ aout_VolumeGet
aout_VolumeSet aout_VolumeSet
aout_VolumeUp aout_VolumeUp
aout_MuteToggle aout_MuteToggle
aout_MuteSet
aout_IsMuted aout_IsMuted
aout_SetMute
aout_VolumeSoftInit aout_VolumeSoftInit
aout_VolumeHardInit aout_VolumeHardInit
block_Alloc block_Alloc
......
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