diff options
author | wm4 <wm4@nowhere> | 2016-07-09 18:31:18 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-07-09 18:31:18 +0200 |
commit | 995c47da9afacfcc30d8a17d2f2a2268fbf4fdb9 (patch) | |
tree | 0442a9134e89408c2d8a791fefc1559d04d2b76f /options | |
parent | da9590d3681c8779ac50d7722f8b8ad09a47024a (diff) | |
download | mpv-995c47da9afacfcc30d8a17d2f2a2268fbf4fdb9.tar.bz2 mpv-995c47da9afacfcc30d8a17d2f2a2268fbf4fdb9.tar.xz |
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.
Diffstat (limited to 'options')
-rw-r--r-- | options/options.c | 13 | ||||
-rw-r--r-- | options/options.h | 5 |
2 files changed, 9 insertions, 9 deletions
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; |