From 995c47da9afacfcc30d8a17d2f2a2268fbf4fdb9 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 9 Jul 2016 18:31:18 +0200 Subject: audio: drop --softvol=no and --softvol=auto Drop the code for switching the volume options and properties between af_volume and AO volume controls. interface-changes.rst mentions the changes in detail. Do this because this was exceedingly complex and had other problems as well. It was also very hard to test. It's just not worth the trouble. Some leftovers like AOCONTROL_HAS_PER_APP_VOLUME will be removed at a later point. Fixes #3322. --- options/options.c | 13 +++++++------ options/options.h | 5 ++--- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'options') diff --git a/options/options.c b/options/options.c index 0304d4e0c7..e58eea1bc9 100644 --- a/options/options.c +++ b/options/options.c @@ -410,13 +410,13 @@ const m_option_t mp_opts[] = { ({"no", SOFTVOL_NO}, {"yes", SOFTVOL_YES}, {"auto", SOFTVOL_AUTO})), - OPT_FLOATRANGE("softvol-max", softvol_max, 0, 100, 1000), - OPT_FLOATRANGE("volume", mixer_init_volume, 0, -1, 1000), - OPT_CHOICE("mute", mixer_init_mute, 0, + OPT_FLOATRANGE("volume-max", softvol_max, 0, 100, 1000), + // values <0 for volume and mute are legacy and ignored + OPT_FLOATRANGE("volume", softvol_volume, 0, -1, 1000), + OPT_CHOICE("mute", softvol_mute, 0, ({"auto", -1}, {"no", 0}, {"yes", 1})), - OPT_STRING("volume-restore-data", mixer_restore_volume_data, 0), OPT_CHOICE("gapless-audio", gapless_audio, 0, ({"no", 0}, {"yes", 1}, @@ -685,6 +685,7 @@ const m_option_t mp_opts[] = { OPT_REPLACED("ass-use-margins", "sub-use-margins"), OPT_REPLACED("media-title", "force-media-title"), OPT_REPLACED("input-unix-socket", "input-ipc-server"), + OPT_REPLACED("softvol-max", "volume-max"), {0} }; @@ -698,8 +699,8 @@ const struct MPOpts mp_default_opts = { .deinterlace = -1, .softvol = SOFTVOL_AUTO, .softvol_max = 130, - .mixer_init_volume = -1, - .mixer_init_mute = -1, + .softvol_volume = 100, + .softvol_mute = 0, .gapless_audio = -1, .audio_buffer = 0.2, .audio_device = "auto", diff --git a/options/options.h b/options/options.h index 5dcc642222..3e8474fd75 100644 --- a/options/options.h +++ b/options/options.h @@ -89,9 +89,8 @@ typedef struct MPOpts { int ao_null_fallback; int force_vo; int softvol; - float mixer_init_volume; - int mixer_init_mute; - char *mixer_restore_volume_data; + float softvol_volume; + int softvol_mute; float softvol_max; int gapless_audio; double audio_buffer; -- cgit v1.2.3