aboutsummaryrefslogtreecommitdiffstats
path: root/src/output_init.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2010-05-02 15:57:59 +0200
committerMax Kellermann <max@duempel.org>2010-05-02 18:21:16 +0200
commitd88c3c8462f12cec592d24ef8a3ebd570ede9ca6 (patch)
tree580e25a8c0368fead87dba18c5f226c00ea679a2 /src/output_init.c
parent5399a72ec1141307e79970993e4a90a8d643ac50 (diff)
downloadmpd-d88c3c8462f12cec592d24ef8a3ebd570ede9ca6.tar.gz
mpd-d88c3c8462f12cec592d24ef8a3ebd570ede9ca6.tar.xz
mpd-d88c3c8462f12cec592d24ef8a3ebd570ede9ca6.zip
output_thread: call replay gain filter manually
Don't add it to the filter chain, because we need to apply replay gain before cross-fading with the next song. Add a second replay_gain filter which is used for the song being faded in (chunk->other).
Diffstat (limited to '')
-rw-r--r--src/output_init.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/output_init.c b/src/output_init.c
index a091e749a..f4700dfb2 100644
--- a/src/output_init.c
+++ b/src/output_init.c
@@ -209,10 +209,17 @@ audio_output_init(struct audio_output *ao, const struct config_param *param,
param, NULL);
assert(ao->replay_gain_filter != NULL);
- filter_chain_append(ao->filter, ao->replay_gain_filter);
ao->replay_gain_serial = 0;
- } else
+
+ ao->other_replay_gain_filter = filter_new(&replay_gain_filter_plugin,
+ param, NULL);
+ assert(ao->other_replay_gain_filter != NULL);
+
+ ao->other_replay_gain_serial = 0;
+ } else {
ao->replay_gain_filter = NULL;
+ ao->other_replay_gain_filter = NULL;
+ }
/* create the normalization filter (if configured) */