replay_gain: added setting "replaygain off"

There was no setting for disabling replay gain.  It was off when the
"replaygain" setting was not there.
This commit is contained in:
Max Kellermann 2009-10-17 21:38:45 +02:00
parent a17d814381
commit 8d217567c6
3 changed files with 4 additions and 4 deletions

View File

@ -168,7 +168,7 @@ only choice) if MPD was compiled without libsamplerate.
For an up-to-date list of available converters, please see the libsamplerate For an up-to-date list of available converters, please see the libsamplerate
documentation (available online at <\fBhttp://www.mega-nerd.com/SRC/\fP>). documentation (available online at <\fBhttp://www.mega-nerd.com/SRC/\fP>).
.TP .TP
.B replaygain <album or track> .B replaygain <off or album or track>
If specified, mpd will adjust the volume of songs played using ReplayGain tags If specified, mpd will adjust the volume of songs played using ReplayGain tags
(see <\fBhttp://www.replaygain.org/\fP>). Setting this to "album" will adjust (see <\fBhttp://www.replaygain.org/\fP>). Setting this to "album" will adjust
volume using the album's ReplayGain tags, while setting it to "track" will volume using the album's ReplayGain tags, while setting it to "track" will

View File

@ -299,8 +299,8 @@ input {
# Normalization automatic volume adjustments ################################## # Normalization automatic volume adjustments ##################################
# #
# This setting specifies the type of ReplayGain to use. This setting can have # This setting specifies the type of ReplayGain to use. This setting can have
# the argument "album" or "track". See <http://www.replaygain.org> for more # the argument "off", "album" or "track". See <http://www.replaygain.org>
# details. This setting is disabled by default. # for more details. This setting is off by default.
# #
#replaygain "album" #replaygain "album"
# #

View File

@ -44,7 +44,7 @@ void replay_gain_global_init(void)
{ {
const struct config_param *param = config_get_param(CONF_REPLAYGAIN); const struct config_param *param = config_get_param(CONF_REPLAYGAIN);
if (param == NULL) { if (param == NULL || strcmp(param->value, "off") == 0) {
replay_gain_mode = REPLAY_GAIN_OFF; replay_gain_mode = REPLAY_GAIN_OFF;
} else if (strcmp(param->value, "track") == 0) { } else if (strcmp(param->value, "track") == 0) {
replay_gain_mode = REPLAY_GAIN_TRACK; replay_gain_mode = REPLAY_GAIN_TRACK;