aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-10-17 21:38:45 +0200
committerMax Kellermann <max@duempel.org>2009-10-17 21:38:45 +0200
commit8d217567c6494c42bf849ea27f66e14e20788857 (patch)
tree9a713e10747993e409092c714684b03a12b0ab84
parenta17d814381ec5e0c17d1e48e46d692e2d9be2afc (diff)
downloadmpd-8d217567c6494c42bf849ea27f66e14e20788857.tar.gz
mpd-8d217567c6494c42bf849ea27f66e14e20788857.tar.xz
mpd-8d217567c6494c42bf849ea27f66e14e20788857.zip
replay_gain: added setting "replaygain off"
There was no setting for disabling replay gain. It was off when the "replaygain" setting was not there.
-rw-r--r--doc/mpd.conf.52
-rw-r--r--doc/mpdconf.example4
-rw-r--r--src/replay_gain.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/doc/mpd.conf.5 b/doc/mpd.conf.5
index 940263795..0784ea393 100644
--- a/doc/mpd.conf.5
+++ b/doc/mpd.conf.5
@@ -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
documentation (available online at <\fBhttp://www.mega-nerd.com/SRC/\fP>).
.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
(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
diff --git a/doc/mpdconf.example b/doc/mpdconf.example
index 320c3b758..3b9e460b1 100644
--- a/doc/mpdconf.example
+++ b/doc/mpdconf.example
@@ -299,8 +299,8 @@ input {
# Normalization automatic volume adjustments ##################################
#
# 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
-# details. This setting is disabled by default.
+# the argument "off", "album" or "track". See <http://www.replaygain.org>
+# for more details. This setting is off by default.
#
#replaygain "album"
#
diff --git a/src/replay_gain.c b/src/replay_gain.c
index 4ddb7abb8..e1c7db9fe 100644
--- a/src/replay_gain.c
+++ b/src/replay_gain.c
@@ -44,7 +44,7 @@ void replay_gain_global_init(void)
{
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;
} else if (strcmp(param->value, "track") == 0) {
replay_gain_mode = REPLAY_GAIN_TRACK;