From 58db0a55f3011cf0dd7dbd5bd8ba105e8abf5c7b Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 21 Sep 2014 15:41:33 +0200 Subject: [PATCH] options: remove --volstep It's just confusing; users are encouraged to edit input.conf instead (changing the argument to the "add" command). Update input.conf to keep the old behavior. --- DOCS/man/options.rst | 4 ---- etc/input.conf | 24 ++++++++++++------------ options/m_config.c | 1 + options/options.c | 2 -- options/options.h | 1 - player/command.c | 2 +- 6 files changed, 14 insertions(+), 20 deletions(-) diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst index 44ed680d49..c6df057834 100644 --- a/DOCS/man/options.rst +++ b/DOCS/man/options.rst @@ -972,10 +972,6 @@ Audio maximum amplification, i.e. amplify by 200%. The default volume (no change in volume) will be ``50`` in this case. -``--volstep=<0-100>`` - Set the step size of mixer volume changes in percent of the full range - (default: 2). - ``--audiodrop`` If video is by more than 500 ms behind, insert 500 ms of silence, to make up for audio getting ahead. Might help if video decoding is too slow beyond diff --git a/etc/input.conf b/etc/input.conf index eac4d539c8..bdedcaeb3f 100644 --- a/etc/input.conf +++ b/etc/input.conf @@ -33,8 +33,8 @@ #MOUSE_BTN2 cycle pause # toggle pause on/off #MOUSE_BTN3 seek 10 #MOUSE_BTN4 seek -10 -#MOUSE_BTN5 add volume 1 -#MOUSE_BTN6 add volume -1 +#MOUSE_BTN5 add volume 2 +#MOUSE_BTN6 add volume -2 # Mouse wheels, touchpad or other input devices that have axes # if the input devices supports precise scrolling it will also scale the @@ -84,10 +84,10 @@ #x add sub-delay +0.1 # add #ctrl++ add audio-delay 0.100 # this changes audio/video sync #ctrl+- add audio-delay -0.100 -#9 add volume -1 -#/ add volume -1 -#0 add volume 1 -#* add volume 1 +#9 add volume -2 +#/ add volume -2 +#0 add volume 2 +#* add volume 2 #m cycle mute #1 add contrast -1 #2 add contrast 1 @@ -126,8 +126,8 @@ #REWIND seek -60 #NEXT playlist_next #PREV playlist_prev -#VOLUME_UP add volume 1 -#VOLUME_DOWN add volume -1 +#VOLUME_UP add volume 2 +#VOLUME_DOWN add volume -2 #MUTE cycle mute #CLOSE_WIN quit #CLOSE_WIN {encode} quit @@ -145,9 +145,9 @@ #AR_PREV_HOLD seek -120 #AR_MENU show_progress #AR_MENU_HOLD cycle mute -#AR_VUP add volume 1 +#AR_VUP add volume 2 #AR_VUP_HOLD add chapter 1 -#AR_VDOWN add volume -1 +#AR_VDOWN add volume -2 #AR_VDOWN_HOLD add chapter -1 # Joystick section @@ -161,8 +161,8 @@ #JOY_AXIS1_PLUS seek -60 #JOY_BTN0 cycle pause #JOY_BTN1 cycle osd -#JOY_BTN2 add volume 1 -#JOY_BTN3 add volume -1 +#JOY_BTN2 add volume 2 +#JOY_BTN3 add volume -2 # For dvdnav:// and bdnav:// diff --git a/options/m_config.c b/options/m_config.c index ad91f5ae3a..c0ebd3cf70 100644 --- a/options/m_config.c +++ b/options/m_config.c @@ -981,5 +981,6 @@ static const char *const replaced_opts = "|forceidx#--index" "|cache-pause-below#for 'no', use --no-cache-pause" "|no-cache-pause-below#--no-cache-pause" + "|volstep#edit input.conf directly instead" "|" ; diff --git a/options/options.c b/options/options.c index e245434052..5085366389 100644 --- a/options/options.c +++ b/options/options.c @@ -360,7 +360,6 @@ const m_option_t mp_opts[] = { {"yes", SOFTVOL_YES}, {"auto", SOFTVOL_AUTO})), OPT_FLOATRANGE("softvol-max", softvol_max, 0, 10, 10000), - OPT_INTRANGE("volstep", volstep, 0, 0, 100), OPT_FLOATRANGE("volume", mixer_init_volume, 0, -1, 100), OPT_CHOICE("mute", mixer_init_mute, M_OPT_OPTIONAL_PARAM, ({"auto", -1}, @@ -561,7 +560,6 @@ const struct MPOpts mp_default_opts = { .softvol_max = 200, .mixer_init_volume = -1, .mixer_init_mute = -1, - .volstep = 2, .gapless_audio = -1, .audio_buffer = 0.2, .vo = { diff --git a/options/options.h b/options/options.h index aeb404ecfe..ab92283766 100644 --- a/options/options.h +++ b/options/options.h @@ -71,7 +71,6 @@ typedef struct MPOpts { float mixer_init_volume; int mixer_init_mute; char *mixer_restore_volume_data; - int volstep; float softvol_max; int gapless_audio; double audio_buffer; diff --git a/player/command.c b/player/command.c index 5a523663e8..aa6c5f763c 100644 --- a/player/command.c +++ b/player/command.c @@ -1248,7 +1248,7 @@ static int mp_property_volume(void *ctx, struct m_property *prop, if (!mixer_audio_initialized(mpctx->mixer)) return M_PROPERTY_ERROR; struct m_property_switch_arg *sarg = arg; - mixer_addvolume(mpctx->mixer, mpctx->opts->volstep * sarg->inc); + mixer_addvolume(mpctx->mixer, sarg->inc); return M_PROPERTY_OK; } }