Compare commits

...

2 Commits

  1. 3
      src/main/java/moe/nekojimi/chords/MusicHandler.java
  2. 2
      src/main/java/moe/nekojimi/chords/QueueManager.java

@ -95,7 +95,7 @@ public class MusicHandler implements AudioSendHandler, Closeable, Consumer<Track
{ {
return false; return false;
} }
System.out.println("Playing track " + currentTrack.getLocation().getAbsolutePath()); // System.out.println("Playing track " + currentTrack.getLocation().getAbsolutePath());
arrayErr = false; arrayErr = false;
byteCount = 3840; byteCount = 3840;
TrackPlayer player = new TrackPlayer(currentTrack); TrackPlayer player = new TrackPlayer(currentTrack);
@ -251,6 +251,7 @@ public class MusicHandler implements AudioSendHandler, Closeable, Consumer<Track
if (!isPlaying()) if (!isPlaying())
return false; return false;
playingTracks.clear(); playingTracks.clear();
currentTrack = null;
requestTrack(); requestTrack();
return true; return true;
} }

@ -51,7 +51,7 @@ public class QueueManager extends QueueThing<Track, Track>
// if (inputQueue.size() < QUEUE_TARGET_SIZE) // if (inputQueue.size() < QUEUE_TARGET_SIZE)
// demandInput(QUEUE_TARGET_SIZE - inputQueue.size()); // demandInput(QUEUE_TARGET_SIZE - inputQueue.size());
if (!handler.isPlaying() || handler.getCurrentTrack() == null) if (handler != null && !handler.isPlaying() || handler.getCurrentTrack() == null)
handler.requestTrack(); handler.requestTrack();
} }

Loading…
Cancel
Save