summaryrefslogtreecommitdiffstats
path: root/audio/mixer.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-06-08 23:52:58 +0200
committerwm4 <wm4@nowhere>2014-06-08 23:52:58 +0200
commitda89af10768f75ceec9b9c0256649da6f4d843a2 (patch)
treea8f593ba7df6da4e6d70d10039ff55d475d48662 /audio/mixer.c
parentcc74bc3fecd9d44d62ff162394cff02ad436a9cc (diff)
downloadmpv-da89af10768f75ceec9b9c0256649da6f4d843a2.tar.bz2
mpv-da89af10768f75ceec9b9c0256649da6f4d843a2.tar.xz
player: show "neutral" position markers for OSD bars
This commit implements them for volume and some video properties.
Diffstat (limited to 'audio/mixer.c')
-rw-r--r--audio/mixer.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/audio/mixer.c b/audio/mixer.c
index 7a26b83e5e..b19a2c6438 100644
--- a/audio/mixer.c
+++ b/audio/mixer.c
@@ -68,6 +68,12 @@ bool mixer_audio_initialized(struct mixer *mixer)
return !!mixer->ao;
}
+float mixer_getneutralvolume(struct mixer *mixer)
+{
+ // gain == 1
+ return 1.0 / mixer->opts->softvol_max * 100.0 * 100.0;
+}
+
static void checkvolume(struct mixer *mixer)
{
if (!mixer->ao)