summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-09-07 08:53:04 +0200
committerwm4 <wm4@nowhere>2013-09-07 08:54:12 +0200
commitae64f29930e1fc86b8abd3b71a1335912511e751 (patch)
tree45d610da716b0d82354962576674c6be4232da78
parentc8f49be919ffaf983bde77b63d75f96a593ec7a8 (diff)
downloadmpv-ae64f29930e1fc86b8abd3b71a1335912511e751.tar.bz2
mpv-ae64f29930e1fc86b8abd3b71a1335912511e751.tar.xz
options: fix --volume option range, add some explanations to manpage
The --volume option accepted values up to 10000, but internally, the value is always clipped to 0-100 range. What makes this even worse is that --softvol-max suggests that it extends the range of --volume, which is not the case. (And passing a volume larger than 100 to --volume didn't even print a warning.)
-rw-r--r--DOCS/man/en/options.rst6
-rw-r--r--mpvcore/options.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/DOCS/man/en/options.rst b/DOCS/man/en/options.rst
index 45842ec7b4..15fea36bd6 100644
--- a/DOCS/man/en/options.rst
+++ b/DOCS/man/en/options.rst
@@ -1952,6 +1952,12 @@
current level. With values below 100 the initial volume (which is 100%)
will be above the maximum, which e.g. the OSD cannot display correctly.
+ Note: the maximum value of ``--volume`` as well as the ``volume`` property
+ is always 100. Likewise, the volume OSD bar always goes from 0 to 100.
+ This means that with ``--softvol-max=200``, ``--volume=100`` means
+ maximum amplification, i.e. amplify by 200%. The default volume will be
+ ``50`` in this case (meaning no amplification).
+
``--speed=<0.01-100>``
Slow down or speed up playback by the factor given as parameter.
diff --git a/mpvcore/options.c b/mpvcore/options.c
index 62bbfc0101..c63aa7342a 100644
--- a/mpvcore/options.c
+++ b/mpvcore/options.c
@@ -555,7 +555,7 @@ const m_option_t mp_opts[] = {
{"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, 10000),
+ OPT_FLOATRANGE("volume", mixer_init_volume, 0, -1, 100),
OPT_CHOICE("mute", mixer_init_mute, M_OPT_OPTIONAL_PARAM,
({"auto", -1},
{"no", 0},