keybind key icon textures changed; removed useless code from old
visualizer;
This commit is contained in:
parent
30567e086c
commit
b083e5f187
Binary file not shown.
Before Width: | Height: | Size: 121 KiB After Width: | Height: | Size: 87 KiB |
@ -91,16 +91,7 @@ public class PCMObtainer implements Observer, PCMSystem {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void bufferChanged() {
|
private void bufferChanged() {
|
||||||
// set position to beginning to prepare for overwrite
|
|
||||||
playingBuffer.position(0);
|
playingBuffer.position(0);
|
||||||
// if the backing playing buffer is full, we have two sections: A and B. A is
|
|
||||||
// the one before B, and is read from due to playback latency and offset. B is
|
|
||||||
// merely a buffer.
|
|
||||||
if (playingBuffer.limit() == playingBuffer.capacity()) {
|
|
||||||
// put the second portion into the first...
|
|
||||||
playingBuffer.put(playingBuffer.array(), buffer.capacity(), buffer.capacity());
|
|
||||||
}
|
|
||||||
// put the new buffer into the remaining portion.
|
|
||||||
playingBuffer.put(compareBuffer);
|
playingBuffer.put(compareBuffer);
|
||||||
|
|
||||||
synchronizeBufferWithPlayback();
|
synchronizeBufferWithPlayback();
|
||||||
@ -128,7 +119,7 @@ public class PCMObtainer implements Observer, PCMSystem {
|
|||||||
sampleRate = mc.getCurrentMusicHeader().getSampleRate();
|
sampleRate = mc.getCurrentMusicHeader().getSampleRate();
|
||||||
String millisPerWindowF = df.format(windowSize/(float) sampleRate);
|
String millisPerWindowF = df.format(windowSize/(float) sampleRate);
|
||||||
millisPerWindow = (long) (Float.valueOf(millisPerWindowF)*1000);
|
millisPerWindow = (long) (Float.valueOf(millisPerWindowF)*1000);
|
||||||
playingBuffer = ShortBuffer.allocate(buffer.capacity() * 2);
|
playingBuffer = ShortBuffer.allocate(buffer.capacity());
|
||||||
buffer.rewind();
|
buffer.rewind();
|
||||||
playingBuffer.put(buffer);
|
playingBuffer.put(buffer);
|
||||||
playingBuffer.flip();
|
playingBuffer.flip();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user