Since 995c47da9afacfcc30d8a17d2f2a2268fbf4fdb9, setting --mute=auto has been equivalent to --mute=no. It was formally documented later in 79e20ff485db4ee82e7b475a5329bf303570cde6. 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.
Unified · Split
| @@ -2052,11 +2052,9 @@ Audio · 2051 unmodified lines | ||
| 2052 | 2052 | Audio delay in seconds (positive or negative float value). Positive values |
| 2053 | 2053 | delay the audio, and negative values delay the video. |
| 2054 | 2054 | |
| 2055 | −``--mute=<yes|no|auto>`` | |
| 2055 | +``--mute=<yes|no>`` | |
| 2056 | 2056 | Set startup audio mute status (default: no). |
| 2057 | 2057 | |
| 2058 | − ``auto`` is a deprecated possible value that is equivalent to ``no``. | |
| 2059 | − | |
| 2060 | 2058 | See also: ``--volume``. |
| 2061 | 2059 | |
| 2062 | 2060 | ``--audio-demuxer=<[+]name>`` |
| @@ -737,11 +737,7 @@ static const m_option_t mp_opts[] = { · 736 unmodified lines | ||
| 737 | 737 | {"volume-gain-min", OPT_FLOAT(softvol_gain_min), M_RANGE(-150, 0)}, |
| 738 | 738 | {"volume-gain", OPT_FLOAT(softvol_gain), .flags = UPDATE_VOL, |
| 739 | 739 | M_RANGE(-150, 150)}, |
| 740 | − {"mute", OPT_CHOICE(softvol_mute, | |
| 741 | − {"no", 0}, | |
| 742 | − {"auto", 0}, | |
| 743 | − {"yes", 1}), | |
| 744 | − .flags = UPDATE_VOL}, | |
| 740 | + {"mute", OPT_BOOL(softvol_mute), .flags = UPDATE_VOL}, | |
| 745 | 741 | {"replaygain", OPT_CHOICE(rgain_mode, |
| 746 | 742 | {"no", 0}, |
| 747 | 743 | {"track", 1}, |
| @@ -189,7 +189,7 @@ typedef struct MPOpts { · 188 unmodified lines | ||
| 189 | 189 | float rgain_preamp; // Set replaygain pre-amplification |
| 190 | 190 | bool rgain_clip; // Enable/disable clipping prevention |
| 191 | 191 | float rgain_fallback; |
| 192 | − int softvol_mute; | |
| 192 | + bool softvol_mute; | |
| 193 | 193 | float softvol_max; |
| 194 | 194 | float softvol_gain; |
| 195 | 195 | float softvol_gain_min; |
| @@ -176,7 +176,7 @@ void audio_update_volume(struct MPContext *mpctx) · 175 unmodified lines | ||
| 176 | 176 | gain = pow(gain, 3); |
| 177 | 177 | gain *= compute_replaygain(mpctx); |
| 178 | 178 | gain *= db_gain(opts->softvol_gain); |
| 179 | − if (opts->softvol_mute == 1) | |
| 179 | + if (opts->softvol_mute) | |
| 180 | 180 | gain = 0.0; |
| 181 | 181 | |
| 182 | 182 | ao_set_gain(ao_c->ao, gain); |