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/filter | |
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 'src/filter')
-rw-r--r-- | src/filter/replay_gain_filter_plugin.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/src/filter/replay_gain_filter_plugin.c b/src/filter/replay_gain_filter_plugin.c index 0519b9dfe..a0133e493 100644 --- a/src/filter/replay_gain_filter_plugin.c +++ b/src/filter/replay_gain_filter_plugin.c @@ -28,7 +28,6 @@ #include "replay_gain_info.h" #include "replay_gain_config.h" #include "mixer_control.h" -#include "playlist.h" #include <assert.h> #include <string.h> @@ -115,11 +114,7 @@ replay_gain_filter_init(G_GNUC_UNUSED const struct config_param *param, filter_init(&filter->filter, &replay_gain_filter_plugin); filter->mixer = NULL; - if (replay_gain_mode == REPLAY_GAIN_AUTO) { - filter->mode = g_playlist.queue.random ? REPLAY_GAIN_TRACK : REPLAY_GAIN_ALBUM; - } else { - filter->mode = replay_gain_mode; - } + filter->mode = replay_gain_get_real_mode(); replay_gain_info_init(&filter->info); filter->volume = PCM_VOLUME_1; @@ -169,11 +164,7 @@ replay_gain_filter_filter(struct filter *_filter, enum replay_gain_mode rg_mode; /* check if the mode has been changed since the last call */ - if (replay_gain_mode == REPLAY_GAIN_AUTO) { - rg_mode = g_playlist.queue.random ? REPLAY_GAIN_TRACK : REPLAY_GAIN_ALBUM; - } else { - rg_mode = replay_gain_mode; - } + rg_mode = replay_gain_get_real_mode(); if (filter->mode != rg_mode) { g_debug("replay gain mode has changed %d->%d\n", filter->mode, rg_mode); |