[vlc-commits] aout_VolumeDown: convert to a macro
Rémi Denis-Courmont
git at videolan.org
Mon Jul 25 20:17:22 CEST 2011
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Jul 25 21:13:55 2011 +0300| [0ce2c2e56faf6a00f1094e52a99a23545db29071] | committer: Rémi Denis-Courmont
aout_VolumeDown: convert to a macro
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0ce2c2e56faf6a00f1094e52a99a23545db29071
---
include/vlc_aout_intf.h | 3 +--
modules/control/rc.c | 14 ++++----------
src/audio_output/intf.c | 9 ---------
src/libvlccore.sym | 1 -
4 files changed, 5 insertions(+), 22 deletions(-)
diff --git a/include/vlc_aout_intf.h b/include/vlc_aout_intf.h
index b316fd4..8b630a1 100644
--- a/include/vlc_aout_intf.h
+++ b/include/vlc_aout_intf.h
@@ -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 );
diff --git a/modules/control/rc.c b/modules/control/rc.c
index 3a61cbe..5fca974 100644
--- a/modules/control/rc.c
+++ b/modules/control/rc.c
@@ -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 );
diff --git a/src/audio_output/intf.c b/src/audio_output/intf.c
index 56a5e5f..bcb6f1e 100644
--- a/src/audio_output/intf.c
+++ b/src/audio_output/intf.c
@@ -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.
diff --git a/src/libvlccore.sym b/src/libvlccore.sym
index aa89f2b..a5a3a34 100644
--- a/src/libvlccore.sym
+++ b/src/libvlccore.sym
@@ -20,7 +20,6 @@ aout_FormatPrepare
aout_FormatPrint
aout_FormatPrintChannels
aout_OutputNextBuffer
-aout_VolumeDown
aout_VolumeGet
aout_ToggleMute
aout_IsMuted
More information about the vlc-commits
mailing list