aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/mad_decoder_plugin.c
diff options
context:
space:
mode:
authorTim Phipps <mpd@phipps-hutton.freeserve.co.uk>2010-05-08 00:19:44 -0700
committerAvuton Olrich <avuton@gmail.com>2010-05-08 00:19:44 -0700
commit0ac5b6e613777bab093d1dbca1f3d6c80c48ca52 (patch)
tree167dbcd9c66cb60baf6ea61b0d501fdca4c71e98 /src/decoder/mad_decoder_plugin.c
parenteb5208c4f9e642c45b305f338c224cb65075840b (diff)
downloadmpd-0ac5b6e613777bab093d1dbca1f3d6c80c48ca52.tar.gz
mpd-0ac5b6e613777bab093d1dbca1f3d6c80c48ca52.tar.xz
mpd-0ac5b6e613777bab093d1dbca1f3d6c80c48ca52.zip
mixramp: Adjust MixRamp threshold to account for ReplayGain.
Diffstat (limited to 'src/decoder/mad_decoder_plugin.c')
-rw-r--r--src/decoder/mad_decoder_plugin.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/decoder/mad_decoder_plugin.c b/src/decoder/mad_decoder_plugin.c
index 57221d878..573afc975 100644
--- a/src/decoder/mad_decoder_plugin.c
+++ b/src/decoder/mad_decoder_plugin.c
@@ -446,13 +446,16 @@ static void mp3_parse_id3(struct mp3_data *data, size_t tagsize,
struct replay_gain_info rgi;
char *mixramp_start;
char *mixramp_end;
+ float replay_gain_db = 0;
+
if (parse_id3_replay_gain_info(&rgi, id3_tag)) {
- decoder_replay_gain(data->decoder, &rgi);
+ replay_gain_db = decoder_replay_gain(data->decoder, &rgi);
data->found_replay_gain = true;
}
if (parse_id3_mixramp(&mixramp_start, &mixramp_end, id3_tag)) {
g_debug("setting mixramp_tags");
- decoder_mixramp(data->decoder, mixramp_start, mixramp_end);
+ decoder_mixramp(data->decoder, replay_gain_db,
+ mixramp_start, mixramp_end);
}
}