diff --git a/desktop/src/zero1hd/rhythmbullet/desktop/audio/PCMObtainer.java b/desktop/src/zero1hd/rhythmbullet/desktop/audio/PCMObtainer.java index 341f72b..604cc98 100755 --- a/desktop/src/zero1hd/rhythmbullet/desktop/audio/PCMObtainer.java +++ b/desktop/src/zero1hd/rhythmbullet/desktop/audio/PCMObtainer.java @@ -74,9 +74,6 @@ public class PCMObtainer implements Observer, PCMSystem { PCM[sid] /= Short.MAX_VALUE + 1f; } - // Take down original buffer position so we don't need to sync again after... - int originalPos = buffer.position(); - // Begin comparison buffer.rewind(); if (intermediateBuffer.compareTo(buffer) != 0) { @@ -87,15 +84,12 @@ public class PCMObtainer implements Observer, PCMSystem { intermediateBuffer.put(buffer); intermediateBuffer.flip(); } - - // Reset buffer to proper position. - buffer.position(originalPos); } private void bufferChanged() { - playingBuffer.position(0); + playingBuffer.rewind(); playingBuffer.put(intermediateBuffer); - + playingBuffer.rewind(); synchronizeBufferWithPlayback(); }