aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/_flac_common.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-11-11 16:24:27 +0100
committerMax Kellermann <max@duempel.org>2008-11-11 16:24:27 +0100
commit5ddde0aac790c57b75f20ce71e100f4379f1c653 (patch)
treeb2e8ec4a99e032bf894002fd436c00e35e3cf5fd /src/decoder/_flac_common.c
parent5e686add91a7c2a89b886d04136983480793a26f (diff)
downloadmpd-5ddde0aac790c57b75f20ce71e100f4379f1c653.tar.gz
mpd-5ddde0aac790c57b75f20ce71e100f4379f1c653.tar.xz
mpd-5ddde0aac790c57b75f20ce71e100f4379f1c653.zip
replay_gain: converted struct replay_gain_info elements to an array
Having an array instead of individual variables allows the use of the replay_gain_mode enum as an array index.
Diffstat (limited to '')
-rw-r--r--src/decoder/_flac_common.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/decoder/_flac_common.c b/src/decoder/_flac_common.c
index 3df7d24e5..200b6fee6 100644
--- a/src/decoder/_flac_common.c
+++ b/src/decoder/_flac_common.c
@@ -75,13 +75,13 @@ static void flacParseReplayGain(const FLAC__StreamMetadata * block,
data->replayGainInfo = replay_gain_info_new();
found |= flacFindVorbisCommentFloat(block, "replaygain_album_gain",
- &data->replayGainInfo->album_gain);
+ &data->replayGainInfo->tuples[REPLAY_GAIN_ALBUM].gain);
found |= flacFindVorbisCommentFloat(block, "replaygain_album_peak",
- &data->replayGainInfo->album_peak);
+ &data->replayGainInfo->tuples[REPLAY_GAIN_ALBUM].peak);
found |= flacFindVorbisCommentFloat(block, "replaygain_track_gain",
- &data->replayGainInfo->track_gain);
+ &data->replayGainInfo->tuples[REPLAY_GAIN_TRACK].gain);
found |= flacFindVorbisCommentFloat(block, "replaygain_track_peak",
- &data->replayGainInfo->track_peak);
+ &data->replayGainInfo->tuples[REPLAY_GAIN_TRACK].peak);
if (!found) {
replay_gain_info_free(data->replayGainInfo);