diff options
author | Daniel Seuthe <daniel+mpd@seuthe.org> | 2010-05-18 20:30:03 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2010-05-18 20:30:03 +0200 |
commit | f824ecdfa10beb7241f447674193e0e4a5ae8eb1 (patch) | |
tree | a363ec13075ddcba8122d673e0372da80ea1d002 /src/replay_gain_config.c | |
parent | 6c831e04a298581966d75a2059b8735c387a0e09 (diff) | |
download | mpd-f824ecdfa10beb7241f447674193e0e4a5ae8eb1.tar.gz mpd-f824ecdfa10beb7241f447674193e0e4a5ae8eb1.tar.xz mpd-f824ecdfa10beb7241f447674193e0e4a5ae8eb1.zip |
replay_gain_config: added function replay_gain_get_real_mode()
Diffstat (limited to '')
-rw-r--r-- | src/replay_gain_config.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/replay_gain_config.c b/src/replay_gain_config.c index 3eae9d960..2ef39a4b7 100644 --- a/src/replay_gain_config.c +++ b/src/replay_gain_config.c @@ -19,6 +19,7 @@ #include "config.h" #include "replay_gain_config.h" +#include "playlist.h" #include "conf.h" #include "idle.h" @@ -129,3 +130,15 @@ void replay_gain_global_init(void) replay_gain_missing_preamp = pow(10, f / 20.0); } } + +enum replay_gain_mode replay_gain_get_real_mode(void) +{ + 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; + + return rgm; +} |