aboutsummaryrefslogtreecommitdiffstats
path: root/src/replay_gain.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-10-17 21:38:32 +0200
committerMax Kellermann <max@duempel.org>2009-10-17 21:38:32 +0200
commita17d814381ec5e0c17d1e48e46d692e2d9be2afc (patch)
tree53669156c68f80889c151dc70248f28eb5b0326b /src/replay_gain.c
parent5554633ab8f3a0c1af2e7f4bfc342895f395cc1b (diff)
downloadmpd-a17d814381ec5e0c17d1e48e46d692e2d9be2afc.tar.gz
mpd-a17d814381ec5e0c17d1e48e46d692e2d9be2afc.tar.xz
mpd-a17d814381ec5e0c17d1e48e46d692e2d9be2afc.zip
replay_gain: read configuration even when replay gain is disabled
It will be possible to enable replay gain at runtime even when it is disabled in the configuration file. This patch enables the preamp settings in this case.
Diffstat (limited to '')
-rw-r--r--src/replay_gain.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/replay_gain.c b/src/replay_gain.c
index d21b94e0a..4ddb7abb8 100644
--- a/src/replay_gain.c
+++ b/src/replay_gain.c
@@ -44,10 +44,9 @@ void replay_gain_global_init(void)
{
const struct config_param *param = config_get_param(CONF_REPLAYGAIN);
- if (!param)
- return;
-
- if (strcmp(param->value, "track") == 0) {
+ if (param == NULL) {
+ replay_gain_mode = REPLAY_GAIN_OFF;
+ } else if (strcmp(param->value, "track") == 0) {
replay_gain_mode = REPLAY_GAIN_TRACK;
} else if (strcmp(param->value, "album") == 0) {
replay_gain_mode = REPLAY_GAIN_ALBUM;