some more before i go to sleep

This commit is contained in:
Chayapak 2023-08-14 21:21:13 +07:00
parent abfbe8044b
commit 7cf994a3eb
2 changed files with 4 additions and 2 deletions

View file

@ -290,7 +290,7 @@ public class MusicPlayerPlugin extends Bot.Listener {
while (currentSong.reachedNextNote()) {
final Note note = currentSong.getNextNote();
if (notesPerSecond > 1000) continue;
if (notesPerSecond > 2500) continue;
float key = note.pitch;

View file

@ -5,6 +5,7 @@ import land.chipmunk.chayapak.chomens_bot.Bot;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.nio.file.Path;
import java.util.ArrayList;
// Author: hhhzzzsss
@ -168,7 +169,8 @@ public class NBSConverter {
NBSCustomInstrument customInstrument = customInstruments.get(index);
String name = customInstrument.file;
final Path path = Path.of(customInstrument.file);
String name = path.getFileName().toString();
if (name.endsWith(".ogg")) name = name.substring(0, name.length() - ".ogg".length()); // bad but OK
instrument = Instrument.of(name);