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:
wm4
2014-03-14 22:37:45 +01:00
parent 3160182a7b
commit f8f69cdffe
2 changed files with 6 additions and 6 deletions
+3 -3
View File
@@ -266,7 +266,7 @@ Available filters are:
Filter for internal use only. Converts between signed/unsigned formats
and formats with different endian.
``volume[=volumedb[:softclip[:s16]]]``
``volume[=volumedb[:...]]``
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
best to use the *Master* volume control of your sound card or the volume
@@ -288,9 +288,9 @@ Available filters are:
``replaygain-preamp``
Pre-amplification gain in dB to apply to the selected replaygain gain
(default: 0).
``replaygain-noclip``
``replaygain-clip=yes|no``
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>``
Turns soft clipping on. Soft-clipping can make the
sound more smooth if very high volume levels are used. Enable this
+3 -3
View File
@@ -35,7 +35,7 @@ struct priv {
int rgain_track; // Enable/disable track based replaygain
int rgain_album; // Enable/disable album based replaygain
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 fast; // Use fix-point volume control
float cfg_volume;
@@ -131,7 +131,7 @@ static int control(struct af_instance *af, int cmd, void *arg)
gain += s->rgain_preamp;
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);
}
}
@@ -203,7 +203,7 @@ struct af_info af_info_volume = {
OPT_FLAG("replaygain-track", rgain_track, 0),
OPT_FLAG("replaygain-album", rgain_album, 0),
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("s16", fast, 0),
{0}