Commit 0ce2c2e5 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

aout_VolumeDown: convert to a macro

parent 355c893f
...@@ -35,8 +35,7 @@ VLC_API int aout_VolumeSet( vlc_object_t *, audio_volume_t ); ...@@ -35,8 +35,7 @@ VLC_API int aout_VolumeSet( vlc_object_t *, audio_volume_t );
#define aout_VolumeSet(a, b) aout_VolumeSet(VLC_OBJECT(a), b) #define aout_VolumeSet(a, b) aout_VolumeSet(VLC_OBJECT(a), b)
VLC_API int aout_VolumeUp( vlc_object_t *, int, audio_volume_t * ); VLC_API int aout_VolumeUp( vlc_object_t *, int, audio_volume_t * );
#define aout_VolumeUp(a, b, c) aout_VolumeUp(VLC_OBJECT(a), b, c) #define aout_VolumeUp(a, b, c) aout_VolumeUp(VLC_OBJECT(a), b, c)
VLC_API int aout_VolumeDown( 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_VolumeDown(VLC_OBJECT(a), b, c)
VLC_API int aout_ToggleMute( vlc_object_t *, audio_volume_t * ); VLC_API int aout_ToggleMute( vlc_object_t *, audio_volume_t * );
#define aout_ToggleMute(a, b) aout_ToggleMute(VLC_OBJECT(a), b) #define aout_ToggleMute(a, b) aout_ToggleMute(VLC_OBJECT(a), b)
VLC_API int aout_SetMute( vlc_object_t *, audio_volume_t *, bool ); VLC_API int aout_SetMute( vlc_object_t *, audio_volume_t *, bool );
......
...@@ -1551,16 +1551,10 @@ static int VolumeMove( vlc_object_t *p_this, char const *psz_cmd, ...@@ -1551,16 +1551,10 @@ static int VolumeMove( vlc_object_t *p_this, char const *psz_cmd,
i_nb_steps = 1; i_nb_steps = 1;
} }
if ( !strcmp(psz_cmd, "volup") ) if( !strcmp(psz_cmd, "voldown") )
{ i_nb_steps *= -1;
if ( aout_VolumeUp( p_intf->p_sys->p_playlist, i_nb_steps, &i_volume ) < 0 ) if( aout_VolumeUp( p_intf->p_sys->p_playlist, i_nb_steps, &i_volume ) < 0 )
i_error = VLC_EGENERIC;
}
else
{
if ( aout_VolumeDown( p_intf->p_sys->p_playlist, i_nb_steps, &i_volume ) < 0 )
i_error = VLC_EGENERIC; i_error = VLC_EGENERIC;
}
osd_Volume( p_this ); osd_Volume( p_this );
if ( !i_error ) msg_rc( STATUS_CHANGE "( audio volume: %d )", i_volume ); if ( !i_error ) msg_rc( STATUS_CHANGE "( audio volume: %d )", i_volume );
......
...@@ -177,15 +177,6 @@ int aout_VolumeUp (vlc_object_t *obj, int value, audio_volume_t *volp) ...@@ -177,15 +177,6 @@ int aout_VolumeUp (vlc_object_t *obj, int value, audio_volume_t *volp)
return ret; return ret;
} }
#undef aout_VolumeDown
/**
* Lowers the volume. See aout_VolumeUp().
*/
int aout_VolumeDown (vlc_object_t *obj, int steps, audio_volume_t *volp)
{
return aout_VolumeUp (obj, -steps, volp);
}
#undef aout_ToggleMute #undef aout_ToggleMute
/** /**
* Toggles the mute state. * Toggles the mute state.
......
...@@ -20,7 +20,6 @@ aout_FormatPrepare ...@@ -20,7 +20,6 @@ aout_FormatPrepare
aout_FormatPrint aout_FormatPrint
aout_FormatPrintChannels aout_FormatPrintChannels
aout_OutputNextBuffer aout_OutputNextBuffer
aout_VolumeDown
aout_VolumeGet aout_VolumeGet
aout_ToggleMute aout_ToggleMute
aout_IsMuted aout_IsMuted
......
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