]> git.sesse.net Git - vlc/commitdiff
aout_VolumeDown: convert to a macro
authorRémi Denis-Courmont <remi@remlab.net>
Mon, 25 Jul 2011 18:13:55 +0000 (21:13 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Mon, 25 Jul 2011 18:17:13 +0000 (21:17 +0300)
include/vlc_aout_intf.h
modules/control/rc.c
src/audio_output/intf.c
src/libvlccore.sym

index b316fd476755d06669d926556503db265dcb976e..8b630a175a545ad1ec1abb5a1582fd2358a83bbf 100644 (file)
@@ -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)
 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)
-VLC_API int aout_VolumeDown( vlc_object_t *, int, audio_volume_t * ) ;
-#define aout_VolumeDown(a, b, c) aout_VolumeDown(VLC_OBJECT(a), b, c)
+#define aout_VolumeDown(a, b, c) aout_VolumeUp(a, -(b), c)
 VLC_API int aout_ToggleMute( vlc_object_t *, audio_volume_t * );
 #define aout_ToggleMute(a, b) aout_ToggleMute(VLC_OBJECT(a), b)
 VLC_API int aout_SetMute( vlc_object_t *, audio_volume_t *, bool );
index 3a61cbe1f408c673afbb9ad22abf58f30441f80a..5fca97458358c7ee2be2fd250001075b66dfd4a1 100644 (file)
@@ -1551,16 +1551,10 @@ static int VolumeMove( vlc_object_t *p_this, char const *psz_cmd,
         i_nb_steps = 1;
     }
 
-    if ( !strcmp(psz_cmd, "volup") )
-    {
-        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;
-    }
+    if( !strcmp(psz_cmd, "voldown") )
+        i_nb_steps *= -1;
+    if( aout_VolumeUp( p_intf->p_sys->p_playlist, i_nb_steps, &i_volume ) < 0 )
+        i_error = VLC_EGENERIC;
     osd_Volume( p_this );
 
     if ( !i_error ) msg_rc( STATUS_CHANGE "( audio volume: %d )", i_volume );
index 56a5e5f82a48db0c7aad7bebf04a956bf4ddbf01..bcb6f1e67e060a13d43f99950b62cf412844b964 100644 (file)
@@ -177,15 +177,6 @@ int aout_VolumeUp (vlc_object_t *obj, int value, audio_volume_t *volp)
     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
 /**
  * Toggles the mute state.
index aa89f2b75fb1554eb354b037209e41c777542d2f..a5a3a345cb565c99f71010e06a19f13a1643950e 100644 (file)
@@ -20,7 +20,6 @@ aout_FormatPrepare
 aout_FormatPrint
 aout_FormatPrintChannels
 aout_OutputNextBuffer
-aout_VolumeDown
 aout_VolumeGet
 aout_ToggleMute
 aout_IsMuted