diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst index e2c3c6d00c..662cc7b62a 100644 --- a/DOCS/man/options.rst +++ b/DOCS/man/options.rst @@ -2052,11 +2052,9 @@ Audio Audio delay in seconds (positive or negative float value). Positive values delay the audio, and negative values delay the video. -``--mute=`` +``--mute=`` Set startup audio mute status (default: no). - ``auto`` is a deprecated possible value that is equivalent to ``no``. - See also: ``--volume``. ``--audio-demuxer=<[+]name>`` diff --git a/options/options.c b/options/options.c index a0d00dde38..b664fe18c5 100644 --- a/options/options.c +++ b/options/options.c @@ -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", OPT_FLOAT(softvol_gain), .flags = UPDATE_VOL, M_RANGE(-150, 150)}, - {"mute", OPT_CHOICE(softvol_mute, - {"no", 0}, - {"auto", 0}, - {"yes", 1}), - .flags = UPDATE_VOL}, + {"mute", OPT_BOOL(softvol_mute), .flags = UPDATE_VOL}, {"replaygain", OPT_CHOICE(rgain_mode, {"no", 0}, {"track", 1}, diff --git a/options/options.h b/options/options.h index b80a128b21..8e6d5e43cb 100644 --- a/options/options.h +++ b/options/options.h @@ -189,7 +189,7 @@ typedef struct MPOpts { float rgain_preamp; // Set replaygain pre-amplification bool rgain_clip; // Enable/disable clipping prevention float rgain_fallback; - int softvol_mute; + bool softvol_mute; float softvol_max; float softvol_gain; float softvol_gain_min; diff --git a/player/audio.c b/player/audio.c index e74add8cf8..4fe78953db 100644 --- a/player/audio.c +++ b/player/audio.c @@ -176,7 +176,7 @@ void audio_update_volume(struct MPContext *mpctx) gain = pow(gain, 3); gain *= compute_replaygain(mpctx); gain *= db_gain(opts->softvol_gain); - if (opts->softvol_mute == 1) + if (opts->softvol_mute) gain = 0.0; ao_set_gain(ao_c->ao, gain);