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("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);
} catch (TrackPlayer.OutOfInputException | IOException ex)
{
System.out.println("Track ended, starting next.");
// System.out.println("Track ended, starting next.");
boolean foundNext = nextSong();
if (!foundNext)
{
System.out.println("Out of tracks!");
// System.out.println("Out of tracks!");
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
assert ret.hasArray(); // output MUST be array backed
return ret;

@ -58,7 +58,7 @@ public class TrackPlayer implements Closeable
// throw new OutOfInputException();
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)
throw new OutOfInputException();

Loading…
Cancel
Save