cleaned
This commit is contained in:
parent
89e3abed63
commit
50bc2bfdea
@ -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();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user