aboutsummaryrefslogtreecommitdiffstats
path: root/src/tag/ApeReplayGain.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/tag/ApeReplayGain.cxx')
-rw-r--r--src/tag/ApeReplayGain.cxx19
1 files changed, 3 insertions, 16 deletions
diff --git a/src/tag/ApeReplayGain.cxx b/src/tag/ApeReplayGain.cxx
index cc65fb79d..345f45710 100644
--- a/src/tag/ApeReplayGain.cxx
+++ b/src/tag/ApeReplayGain.cxx
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2003-2013 The Music Player Daemon Project
+ * Copyright (C) 2003-2014 The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
@@ -20,7 +20,7 @@
#include "config.h"
#include "ApeReplayGain.hxx"
#include "ApeLoader.hxx"
-#include "ReplayGainInfo.hxx"
+#include "ReplayGain.hxx"
#include "util/ASCII.hxx"
#include "fs/Path.hxx"
@@ -43,20 +43,7 @@ replay_gain_ape_callback(unsigned long flags, const char *key,
memcpy(value, _value, value_length);
value[value_length] = 0;
- if (StringEqualsCaseASCII(key, "replaygain_track_gain")) {
- info.tuples[REPLAY_GAIN_TRACK].gain = atof(value);
- return true;
- } else if (StringEqualsCaseASCII(key, "replaygain_album_gain")) {
- info.tuples[REPLAY_GAIN_ALBUM].gain = atof(value);
- return true;
- } else if (StringEqualsCaseASCII(key, "replaygain_track_peak")) {
- info.tuples[REPLAY_GAIN_TRACK].peak = atof(value);
- return true;
- } else if (StringEqualsCaseASCII(key, "replaygain_album_peak")) {
- info.tuples[REPLAY_GAIN_ALBUM].peak = atof(value);
- return true;
- } else
- return false;
+ return ParseReplayGainTag(info, key, value);
}
bool