diff options
author | Max Kellermann <max@duempel.org> | 2013-01-05 00:05:57 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-01-05 02:40:33 +0100 |
commit | 1a8ef3cdab39234e91fe9d91dad2ae004e4537dc (patch) | |
tree | 128f25b72f61ff2e7a2a3fb1f292b57ad27b9061 /src/ReplayGainConfig.cxx | |
parent | 7be33eba489825d3a36f3ccbb3571002fcc06c0b (diff) | |
download | mpd-1a8ef3cdab39234e91fe9d91dad2ae004e4537dc.tar.gz mpd-1a8ef3cdab39234e91fe9d91dad2ae004e4537dc.tar.xz mpd-1a8ef3cdab39234e91fe9d91dad2ae004e4537dc.zip |
filter/ReplayGain: add method _set_mode()
Push the new mode to the filter instead of accessing global variables
through replay_gain_get_real_mode().
Diffstat (limited to 'src/ReplayGainConfig.cxx')
-rw-r--r-- | src/ReplayGainConfig.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ReplayGainConfig.cxx b/src/ReplayGainConfig.cxx index 4d3e2f29d..d3af332ce 100644 --- a/src/ReplayGainConfig.cxx +++ b/src/ReplayGainConfig.cxx @@ -136,14 +136,15 @@ void replay_gain_global_init(void) replay_gain_limit = config_get_bool(CONF_REPLAYGAIN_LIMIT, DEFAULT_REPLAYGAIN_LIMIT); } -enum replay_gain_mode replay_gain_get_real_mode(void) +enum replay_gain_mode +replay_gain_get_real_mode(bool random_mode) { enum replay_gain_mode rgm; rgm = replay_gain_mode; if (rgm == REPLAY_GAIN_AUTO) - rgm = g_playlist.queue.random ? REPLAY_GAIN_TRACK : REPLAY_GAIN_ALBUM; + rgm = random_mode ? REPLAY_GAIN_TRACK : REPLAY_GAIN_ALBUM; return rgm; } |