diff options
author | wm4 <wm4@nowhere> | 2014-06-08 23:52:58 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-06-08 23:52:58 +0200 |
commit | da89af10768f75ceec9b9c0256649da6f4d843a2 (patch) | |
tree | a8f593ba7df6da4e6d70d10039ff55d475d48662 /audio | |
parent | cc74bc3fecd9d44d62ff162394cff02ad436a9cc (diff) | |
download | mpv-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')
-rw-r--r-- | audio/mixer.c | 6 | ||||
-rw-r--r-- | audio/mixer.h | 1 |
2 files changed, 7 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) diff --git a/audio/mixer.h b/audio/mixer.h index d5ec07e9ba..1716401dd5 100644 --- a/audio/mixer.h +++ b/audio/mixer.h @@ -45,6 +45,7 @@ void mixer_setmute(struct mixer *mixer, bool mute); bool mixer_getmute(struct mixer *mixer); void mixer_getbalance(struct mixer *mixer, float *bal); void mixer_setbalance(struct mixer *mixer, float bal); +float mixer_getneutralvolume(struct mixer *mixer); char *mixer_get_volume_restore_data(struct mixer *mixer); #endif /* MPLAYER_MIXER_H */ |