mixramp: Adjust MixRamp threshold to account for ReplayGain.

This commit is contained in:
Tim Phipps
2010-05-08 00:19:44 -07:00
committed by Avuton Olrich
parent eb5208c4f9
commit 0ac5b6e613
12 changed files with 48 additions and 14 deletions

View File

@@ -114,6 +114,7 @@ void flac_metadata_common_cb(const FLAC__StreamMetadata * block,
struct replay_gain_info rgi;
char *mixramp_start;
char *mixramp_end;
float replay_gain_db = 0;
switch (block->type) {
case FLAC__METADATA_TYPE_STREAMINFO:
@@ -122,10 +123,11 @@ void flac_metadata_common_cb(const FLAC__StreamMetadata * block,
case FLAC__METADATA_TYPE_VORBIS_COMMENT:
if (flac_parse_replay_gain(&rgi, block))
decoder_replay_gain(data->decoder, &rgi);
replay_gain_db = decoder_replay_gain(data->decoder, &rgi);
if (flac_parse_mixramp(&mixramp_start, &mixramp_end, block)) {
g_debug("setting mixramp_tags");
decoder_mixramp(data->decoder, mixramp_start, mixramp_end);
decoder_mixramp(data->decoder, replay_gain_db,
mixramp_start, mixramp_end);
}
if (data->tag != NULL)