aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/mpc_plugin.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/mpc_plugin.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/mpc_plugin.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/decoder/mpc_plugin.c b/src/decoder/mpc_plugin.c
index 6bb1d4f59..02b20a942 100644
--- a/src/decoder/mpc_plugin.c
+++ b/src/decoder/mpc_plugin.c
@@ -157,10 +157,10 @@ mpc_decode(struct decoder *mpd_decoder, struct input_stream *inStream)
audio_format.sample_rate = info.sample_freq;
replayGainInfo = replay_gain_info_new();
- replayGainInfo->album_gain = info.gain_album * 0.01;
- replayGainInfo->album_peak = info.peak_album / 32767.0;
- replayGainInfo->track_gain = info.gain_title * 0.01;
- replayGainInfo->track_peak = info.peak_title / 32767.0;
+ replayGainInfo->tuples[REPLAY_GAIN_ALBUM].gain = info.gain_album * 0.01;
+ replayGainInfo->tuples[REPLAY_GAIN_ALBUM].peak = info.peak_album / 32767.0;
+ replayGainInfo->tuples[REPLAY_GAIN_TRACK].gain = info.gain_title * 0.01;
+ replayGainInfo->tuples[REPLAY_GAIN_TRACK].peak = info.peak_title / 32767.0;
decoder_initialized(mpd_decoder, &audio_format,
inStream->seekable,