diff --git a/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/components/Visualizer.java b/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/components/Visualizer.java index 1e7287c..28b5cba 100755 --- a/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/components/Visualizer.java +++ b/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/components/Visualizer.java @@ -97,9 +97,9 @@ public class Visualizer extends Widget implements Disposable { } private int updateBufferPosition() { - int pos = (int) ((alGetSourcef(sourceID, AL11.AL_SAMPLE_OFFSET))-mm.getReadWindowSize()*mm.getChannelCount()); + int pos = (int) ((alGetSourcef(sourceID, AL11.AL_SAMPLE_OFFSET))-(mm.getReadWindowSize()*mm.getChannelCount())); try { - readWindowIndex = mm.getPlaybackIndexPosition(); + readWindowIndex = mm.getPlaybackIndexPosition()-1; buffer.position(pos); } catch (IllegalArgumentException iae) { buffer.position(0);