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
commit 7a58ad5494
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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;
}