mirror of
https://github.com/CappielloAntonio/tempo.git
synced 2026-02-04 16:23:08 +00:00
Fix negative replay gain values
This commit is contained in:
@@ -102,7 +102,7 @@ public class ReplayGainUtil {
|
|||||||
|
|
||||||
private static Float parseReplayGainTag(Metadata.Entry entry) {
|
private static Float parseReplayGainTag(Metadata.Entry entry) {
|
||||||
try {
|
try {
|
||||||
return Float.parseFloat(entry.toString().replaceAll("[^\\d.]", ""));
|
return Float.parseFloat(entry.toString().replaceAll("[^\\d.-]", ""));
|
||||||
} catch (NumberFormatException exception) {
|
} catch (NumberFormatException exception) {
|
||||||
return 0f;
|
return 0f;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user