Fix issue with skip command not ending current track.

master
Nekojimi 1 year ago
parent be6036cd5d
commit d9a7da27f2
  1. 5
      src/main/java/moe/nekojimi/chords/MusicHandler.java

@ -24,7 +24,7 @@ public class MusicHandler implements AudioSendHandler, Closeable
private QueueManager queueManager; private QueueManager queueManager;
// private final LinkedList<Song> songQueue = new LinkedList<>(); // private final LinkedList<Song> songQueue = new LinkedList<>();
// private final Queue<byte[]> queue = new ConcurrentLinkedQueue<>(); // private final Queue<byte[]> queue = new ConcurrentLinkedQueue<>();
private final CircularByteBuffer audioBuffer = new CircularByteBuffer(3840 * 1024); // private final CircularByteBuffer audioBuffer = new CircularByteBuffer(3840 * 1024);
private boolean shouldPlay = true; private boolean shouldPlay = true;
private int byteCount; private int byteCount;
@ -84,7 +84,8 @@ public class MusicHandler implements AudioSendHandler, Closeable
if (immediate) if (immediate)
{ {
System.out.println("Immediate next - clearing buffer"); System.out.println("Immediate next - clearing buffer");
audioBuffer.clear(); player = null;
// audioBuffer.clear();
} }
try try

Loading…
Cancel
Save