mirror of https://github.com/mpv-player/mpv
options: remove deprecated auto choice for --mute
Since995c47da9a
, setting --mute=auto has been equivalent to --mute=no. It was formally documented later in79e20ff485
. This is an old legacy relic and the auto choice popping up during auto completion could be confusing to users who aren't aware of the history. Remove it for good and convert the option to a proper boolean.
This commit is contained in:
parent
bab9b2cf4e
commit
23ecfa9845
|
@ -2052,11 +2052,9 @@ Audio
|
||||||
Audio delay in seconds (positive or negative float value). Positive values
|
Audio delay in seconds (positive or negative float value). Positive values
|
||||||
delay the audio, and negative values delay the video.
|
delay the audio, and negative values delay the video.
|
||||||
|
|
||||||
``--mute=<yes|no|auto>``
|
``--mute=<yes|no>``
|
||||||
Set startup audio mute status (default: no).
|
Set startup audio mute status (default: no).
|
||||||
|
|
||||||
``auto`` is a deprecated possible value that is equivalent to ``no``.
|
|
||||||
|
|
||||||
See also: ``--volume``.
|
See also: ``--volume``.
|
||||||
|
|
||||||
``--audio-demuxer=<[+]name>``
|
``--audio-demuxer=<[+]name>``
|
||||||
|
|
|
@ -737,11 +737,7 @@ static const m_option_t mp_opts[] = {
|
||||||
{"volume-gain-min", OPT_FLOAT(softvol_gain_min), M_RANGE(-150, 0)},
|
{"volume-gain-min", OPT_FLOAT(softvol_gain_min), M_RANGE(-150, 0)},
|
||||||
{"volume-gain", OPT_FLOAT(softvol_gain), .flags = UPDATE_VOL,
|
{"volume-gain", OPT_FLOAT(softvol_gain), .flags = UPDATE_VOL,
|
||||||
M_RANGE(-150, 150)},
|
M_RANGE(-150, 150)},
|
||||||
{"mute", OPT_CHOICE(softvol_mute,
|
{"mute", OPT_BOOL(softvol_mute), .flags = UPDATE_VOL},
|
||||||
{"no", 0},
|
|
||||||
{"auto", 0},
|
|
||||||
{"yes", 1}),
|
|
||||||
.flags = UPDATE_VOL},
|
|
||||||
{"replaygain", OPT_CHOICE(rgain_mode,
|
{"replaygain", OPT_CHOICE(rgain_mode,
|
||||||
{"no", 0},
|
{"no", 0},
|
||||||
{"track", 1},
|
{"track", 1},
|
||||||
|
|
|
@ -189,7 +189,7 @@ typedef struct MPOpts {
|
||||||
float rgain_preamp; // Set replaygain pre-amplification
|
float rgain_preamp; // Set replaygain pre-amplification
|
||||||
bool rgain_clip; // Enable/disable clipping prevention
|
bool rgain_clip; // Enable/disable clipping prevention
|
||||||
float rgain_fallback;
|
float rgain_fallback;
|
||||||
int softvol_mute;
|
bool softvol_mute;
|
||||||
float softvol_max;
|
float softvol_max;
|
||||||
float softvol_gain;
|
float softvol_gain;
|
||||||
float softvol_gain_min;
|
float softvol_gain_min;
|
||||||
|
|
|
@ -176,7 +176,7 @@ void audio_update_volume(struct MPContext *mpctx)
|
||||||
gain = pow(gain, 3);
|
gain = pow(gain, 3);
|
||||||
gain *= compute_replaygain(mpctx);
|
gain *= compute_replaygain(mpctx);
|
||||||
gain *= db_gain(opts->softvol_gain);
|
gain *= db_gain(opts->softvol_gain);
|
||||||
if (opts->softvol_mute == 1)
|
if (opts->softvol_mute)
|
||||||
gain = 0.0;
|
gain = 0.0;
|
||||||
|
|
||||||
ao_set_gain(ao_c->ao, gain);
|
ao_set_gain(ao_c->ao, gain);
|
||||||
|
|
Loading…
Reference in New Issue