diff --git a/build-number.txt b/build-number.txt index c048157f..111ab202 100644 --- a/build-number.txt +++ b/build-number.txt @@ -1 +1 @@ -2942 \ No newline at end of file +2948 \ No newline at end of file diff --git a/src/main/java/me/chayapak1/chomens_bot/song/NBSConverter.java b/src/main/java/me/chayapak1/chomens_bot/song/NBSConverter.java index 6a028085..b028c00d 100644 --- a/src/main/java/me/chayapak1/chomens_bot/song/NBSConverter.java +++ b/src/main/java/me/chayapak1/chomens_bot/song/NBSConverter.java @@ -50,7 +50,7 @@ public class NBSConverter implements Converter { } public static class NBSNote { - public int tick; + public long tick; public short layer; public byte instrument; public byte key; @@ -119,11 +119,11 @@ public class NBSConverter implements Converter { } final ArrayList nbsNotes = new ArrayList<>(); - short tick = -1; + long tick = -1; while (true) { - final int tickJumps = buffer.getShort(); + final short tickJumps = buffer.getShort(); if (tickJumps == 0) break; - tick += (short) tickJumps; + tick += tickJumps; short layer = -1; while (true) { @@ -282,7 +282,7 @@ public class NBSConverter implements Converter { return new String(arr, StandardCharsets.UTF_8); } - private static long getMilliTime (final int tick, final double tempo) { + private static long getMilliTime (final long tick, final double tempo) { return (long) (1000L * tick * 100 / tempo); }