summaryrefslogtreecommitdiffstats
path: root/player
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-05-22 18:35:03 +0200
committerwm4 <wm4@nowhere>2015-05-22 18:35:03 +0200
commit68bbab0e42e141896545f1f6e9699bcad2d685f8 (patch)
tree902133bbc58bf9b8ce91c537d5290dc301dcc91d /player
parenteb296d4fde98966854e239eb1ac0eed0c57f696f (diff)
downloadmpv-68bbab0e42e141896545f1f6e9699bcad2d685f8.tar.bz2
mpv-68bbab0e42e141896545f1f6e9699bcad2d685f8.tar.xz
audio: change range of volume option/property
Now --volume takes an absolute volume, meaning it doesn't depend on --softvol-max. 0 is still silence, and 100 now always means unchanged volume. The OSD and the "volume" property are changed accordingly. Also raise the minimum value of --softvol-max. A value below 100 makes no sense and breaks the OSD.
Diffstat (limited to 'player')
-rw-r--r--player/command.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/player/command.c b/player/command.c
index ee025f354a..e044e3320a 100644
--- a/player/command.c
+++ b/player/command.c
@@ -1480,11 +1480,11 @@ static int mp_property_volume(void *ctx, struct m_property *prop,
.type = CONF_TYPE_FLOAT,
.flags = M_OPT_RANGE,
.min = 0,
- .max = 100,
+ .max = mixer_getmaxvolume(mpctx->mixer),
};
return M_PROPERTY_OK;
case M_PROPERTY_GET_NEUTRAL:
- *(float *)arg = mixer_getneutralvolume(mpctx->mixer);
+ *(float *)arg = 100;
return M_PROPERTY_OK;
case M_PROPERTY_PRINT: {
float val;