add last backwards-compatible version

This commit is contained in:
2021-12-14 00:33:46 -07:00
parent 68b10d413b
commit b0dd3f07f3
335 changed files with 4746 additions and 19627 deletions

View File

@@ -115,21 +115,22 @@ float replaygain_info::anyGain(bool bPreferAlbum) const {
}
}
float replaygain_info::g_parse_gain_text(const char * p_text, t_size p_text_len) {
void replaygain_info::set_album_gain_text(const char * p_text,t_size p_text_len)
{
RG_FPU();
if (p_text != 0 && p_text_len > 0 && *p_text != 0)
return (float)pfc::string_to_float(p_text, p_text_len);
m_album_gain = (float)pfc::string_to_float(p_text,p_text_len);
else
return gain_invalid;
}
void replaygain_info::set_album_gain_text(const char * p_text,t_size p_text_len) {
m_album_gain = g_parse_gain_text(p_text, p_text_len);
remove_album_gain();
}
void replaygain_info::set_track_gain_text(const char * p_text,t_size p_text_len)
{
m_track_gain = g_parse_gain_text(p_text, p_text_len);
RG_FPU();
if (p_text != 0 && p_text_len > 0 && *p_text != 0)
m_track_gain = (float)pfc::string_to_float(p_text,p_text_len);
else
remove_track_gain();
}
void replaygain_info::set_album_peak_text(const char * p_text,t_size p_text_len)