aboutsummaryrefslogtreecommitdiffstats
path: root/src/replay_gain_info.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2010-02-17 08:13:34 +0100
committerMax Kellermann <max@duempel.org>2010-02-17 08:13:34 +0100
commit48b49e230352de10bb3f66a1c85d367dade52001 (patch)
treef457ea9daf5f53f11bb62ff91bb52620dbd265bc /src/replay_gain_info.c
parent752dfb3d95482c562e5d24c6ea839c4815de9a6d (diff)
downloadmpd-48b49e230352de10bb3f66a1c85d367dade52001.tar.gz
mpd-48b49e230352de10bb3f66a1c85d367dade52001.tar.xz
mpd-48b49e230352de10bb3f66a1c85d367dade52001.zip
replay_gain: fall back to track gain if album gain is unavailable
Diffstat (limited to 'src/replay_gain_info.c')
-rw-r--r--src/replay_gain_info.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/replay_gain_info.c b/src/replay_gain_info.c
index 76bd98acd..9ab5b05fa 100644
--- a/src/replay_gain_info.c
+++ b/src/replay_gain_info.c
@@ -35,3 +35,11 @@ replay_gain_tuple_scale(const struct replay_gain_tuple *tuple, float preamp)
return scale;
}
+
+void
+replay_gain_info_complete(struct replay_gain_info *info)
+{
+ if (!replay_gain_tuple_defined(&info->tuples[REPLAY_GAIN_ALBUM]))
+ info->tuples[REPLAY_GAIN_ALBUM] =
+ info->tuples[REPLAY_GAIN_TRACK];
+}