diff options
author | wm4 <wm4@nowhere> | 2014-03-14 22:09:16 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-03-14 22:37:45 +0100 |
commit | f8f69cdffe5d6166ffb75ea52b0ffcf8215100e1 (patch) | |
tree | 95ae647a6f48384789595a4f74ae7313869c6804 | |
parent | 3160182a7bd24cd236cdae09618d051be649b0f6 (diff) | |
download | mpv-f8f69cdffe5d6166ffb75ea52b0ffcf8215100e1.tar.bz2 mpv-f8f69cdffe5d6166ffb75ea52b0ffcf8215100e1.tar.xz |
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.
-rw-r--r-- | DOCS/man/en/af.rst | 6 | ||||
-rw-r--r-- | audio/filter/af_volume.c | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/DOCS/man/en/af.rst b/DOCS/man/en/af.rst index dd7607d769..2ebb40e6ef 100644 --- a/DOCS/man/en/af.rst +++ b/DOCS/man/en/af.rst @@ -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 diff --git a/audio/filter/af_volume.c b/audio/filter/af_volume.c index b218913ea3..a25e5204ea 100644 --- a/audio/filter/af_volume.c +++ b/audio/filter/af_volume.c @@ -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} |