Merge pull request #187 from chengyuhui/fix-negative-gain

fix: fix negative replay gain values
This commit is contained in:
CappielloAntonio
2024-03-16 12:52:59 +01:00
committed by GitHub

View File

@@ -102,7 +102,7 @@ public class ReplayGainUtil {
private static Float parseReplayGainTag(Metadata.Entry entry) {
try {
return Float.parseFloat(entry.toString().replaceAll("[^\\d.]", ""));
return Float.parseFloat(entry.toString().replaceAll("[^\\d.-]", ""));
} catch (NumberFormatException exception) {
return 0f;
}