tag/ApeReplayGain, decoder/mad: move duplicate code to tag/ReplayGain.cxx
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
#include "tag/TagId3.hxx"
|
||||
#include "tag/TagRva2.hxx"
|
||||
#include "tag/TagHandler.hxx"
|
||||
#include "tag/ReplayGain.hxx"
|
||||
#include "CheckAudioFormat.hxx"
|
||||
#include "util/StringUtil.hxx"
|
||||
#include "util/ASCII.hxx"
|
||||
@@ -270,19 +271,8 @@ parse_id3_replay_gain_info(ReplayGainInfo &rgi,
|
||||
id3_ucs4_latin1duplicate(id3_field_getstring
|
||||
(&frame->fields[2]));
|
||||
|
||||
if (StringEqualsCaseASCII(key, "replaygain_track_gain")) {
|
||||
rgi.tuples[REPLAY_GAIN_TRACK].gain = atof(value);
|
||||
if (ParseReplayGainTag(rgi, key, value))
|
||||
found = true;
|
||||
} else if (StringEqualsCaseASCII(key, "replaygain_album_gain")) {
|
||||
rgi.tuples[REPLAY_GAIN_ALBUM].gain = atof(value);
|
||||
found = true;
|
||||
} else if (StringEqualsCaseASCII(key, "replaygain_track_peak")) {
|
||||
rgi.tuples[REPLAY_GAIN_TRACK].peak = atof(value);
|
||||
found = true;
|
||||
} else if (StringEqualsCaseASCII(key, "replaygain_album_peak")) {
|
||||
rgi.tuples[REPLAY_GAIN_ALBUM].peak = atof(value);
|
||||
found = true;
|
||||
}
|
||||
|
||||
free(key);
|
||||
free(value);
|
||||
|
Reference in New Issue
Block a user