From 68bbab0e42e141896545f1f6e9699bcad2d685f8 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 22 May 2015 18:35:03 +0200 Subject: 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. --- player/command.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'player') 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; -- cgit v1.2.3