Remove debug messages.

multithread-playback
Nekojimi 2 years ago
parent 4ec47df625
commit f6fde8d694
  1. 8
      src/main/java/moe/nekojimi/chords/MusicHandler.java
  2. 2
      src/main/java/moe/nekojimi/chords/TrackPlayer.java

@ -157,22 +157,22 @@ public class MusicHandler implements AudioSendHandler, Closeable
// System.out.println("SAMPLES from player: " + Util.printSamples(read)); // System.out.println("SAMPLES from player: " + Util.printSamples(read));
// System.out.println("Wanted: " + byteCount + " Space:" + space + " Available: " + din.available() + " To read: " + bytesToRead + " Read: " + read); // System.out.println("Wanted: " + byteCount + " Space:" + space + " Available: " + din.available() + " To read: " + bytesToRead + " Read: " + read);
System.out.println("Read: " + read.remaining()); // System.out.println("Read: " + read.remaining());
ret.put(read); ret.put(read);
} catch (TrackPlayer.OutOfInputException | IOException ex) } catch (TrackPlayer.OutOfInputException | IOException ex)
{ {
System.out.println("Track ended, starting next."); // System.out.println("Track ended, starting next.");
boolean foundNext = nextSong(); boolean foundNext = nextSong();
if (!foundNext) if (!foundNext)
{ {
System.out.println("Out of tracks!"); // System.out.println("Out of tracks!");
break; break;
} }
} }
} }
System.out.println("Buffer filled, submitting."); // System.out.println("Buffer filled, submitting.");
ret.rewind(); // required apparently, if returned buf has pos > 0 you get silence ret.rewind(); // required apparently, if returned buf has pos > 0 you get silence
assert ret.hasArray(); // output MUST be array backed assert ret.hasArray(); // output MUST be array backed
return ret; return ret;

@ -58,7 +58,7 @@ public class TrackPlayer implements Closeable
// throw new OutOfInputException(); // throw new OutOfInputException();
int toRead = Math.min(length, audioBuffer.getCurrentNumberOfBytes()); int toRead = Math.min(length, audioBuffer.getCurrentNumberOfBytes());
System.out.println("To read: " + toRead + " from " + audioBuffer.getCurrentNumberOfBytes()); // System.out.println("To read: " + toRead + " from " + audioBuffer.getCurrentNumberOfBytes());
if (toRead <= 0) if (toRead <= 0)
throw new OutOfInputException(); throw new OutOfInputException();

Loading…
Cancel
Save