mirror of
https://github.com/mpv-player/mpv
synced 2025-01-03 05:22:23 +00:00
af_volume: remove double-negated suboption
You had to use "no-replaygain-noclip" to set this option. Rename it, so that only one negation is needed.
This commit is contained in:
parent
3160182a7b
commit
f8f69cdffe
@ -266,7 +266,7 @@ Available filters are:
|
|||||||
Filter for internal use only. Converts between signed/unsigned formats
|
Filter for internal use only. Converts between signed/unsigned formats
|
||||||
and formats with different endian.
|
and formats with different endian.
|
||||||
|
|
||||||
``volume[=volumedb[:softclip[:s16]]]``
|
``volume[=volumedb[:...]]``
|
||||||
Implements software volume control. Use this filter with caution since it
|
Implements software volume control. Use this filter with caution since it
|
||||||
can reduce the signal to noise ratio of the sound. In most cases it is
|
can reduce the signal to noise ratio of the sound. In most cases it is
|
||||||
best to use the *Master* volume control of your sound card or the volume
|
best to use the *Master* volume control of your sound card or the volume
|
||||||
@ -288,9 +288,9 @@ Available filters are:
|
|||||||
``replaygain-preamp``
|
``replaygain-preamp``
|
||||||
Pre-amplification gain in dB to apply to the selected replaygain gain
|
Pre-amplification gain in dB to apply to the selected replaygain gain
|
||||||
(default: 0).
|
(default: 0).
|
||||||
``replaygain-noclip``
|
``replaygain-clip=yes|no``
|
||||||
Prevent clipping caused by replaygain by automatically lowering the
|
Prevent clipping caused by replaygain by automatically lowering the
|
||||||
gain (default). Use no-replaygain-noclip to disable this.
|
gain (default). Use ``replaygain-clip=no`` to disable this.
|
||||||
``<softclip>``
|
``<softclip>``
|
||||||
Turns soft clipping on. Soft-clipping can make the
|
Turns soft clipping on. Soft-clipping can make the
|
||||||
sound more smooth if very high volume levels are used. Enable this
|
sound more smooth if very high volume levels are used. Enable this
|
||||||
|
@ -35,7 +35,7 @@ struct priv {
|
|||||||
int rgain_track; // Enable/disable track based replaygain
|
int rgain_track; // Enable/disable track based replaygain
|
||||||
int rgain_album; // Enable/disable album based replaygain
|
int rgain_album; // Enable/disable album based replaygain
|
||||||
float rgain_preamp; // Set replaygain pre-amplification
|
float rgain_preamp; // Set replaygain pre-amplification
|
||||||
int rgain_noclip; // Enable/disable clipping prevention
|
int rgain_clip; // Enable/disable clipping prevention
|
||||||
int soft; // Enable/disable soft clipping
|
int soft; // Enable/disable soft clipping
|
||||||
int fast; // Use fix-point volume control
|
int fast; // Use fix-point volume control
|
||||||
float cfg_volume;
|
float cfg_volume;
|
||||||
@ -131,7 +131,7 @@ static int control(struct af_instance *af, int cmd, void *arg)
|
|||||||
gain += s->rgain_preamp;
|
gain += s->rgain_preamp;
|
||||||
af_from_dB(1, &gain, &s->level, 20.0, -200.0, 60.0);
|
af_from_dB(1, &gain, &s->level, 20.0, -200.0, 60.0);
|
||||||
|
|
||||||
if (s->rgain_noclip) // clipping prevention
|
if (!s->rgain_clip) // clipping prevention
|
||||||
s->level = MPMIN(s->level, 1.0 / peak);
|
s->level = MPMIN(s->level, 1.0 / peak);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -203,7 +203,7 @@ struct af_info af_info_volume = {
|
|||||||
OPT_FLAG("replaygain-track", rgain_track, 0),
|
OPT_FLAG("replaygain-track", rgain_track, 0),
|
||||||
OPT_FLAG("replaygain-album", rgain_album, 0),
|
OPT_FLAG("replaygain-album", rgain_album, 0),
|
||||||
OPT_FLOATRANGE("replaygain-preamp", rgain_preamp, 0, -15, 15),
|
OPT_FLOATRANGE("replaygain-preamp", rgain_preamp, 0, -15, 15),
|
||||||
OPT_FLAG("replaygain-noclip", rgain_noclip, 0, OPTDEF_INT(1)),
|
OPT_FLAG("replaygain-clip", rgain_clip, 0),
|
||||||
OPT_FLAG("softclip", soft, 0),
|
OPT_FLAG("softclip", soft, 0),
|
||||||
OPT_FLAG("s16", fast, 0),
|
OPT_FLAG("s16", fast, 0),
|
||||||
{0}
|
{0}
|
||||||
|
Loading…
Reference in New Issue
Block a user