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.
This commit is contained in:
Max Kellermann 2009-10-17 21:38:32 +02:00
parent 5554633ab8
commit a17d814381
1 changed files with 3 additions and 4 deletions

View File

@ -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;