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 28b5cba..efefe5d 100755 --- a/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/components/Visualizer.java +++ b/desktop/src/zero1hd/rhythmbullet/desktop/graphics/ui/components/Visualizer.java @@ -100,7 +100,7 @@ public class Visualizer extends Widget implements Disposable { int pos = (int) ((alGetSourcef(sourceID, AL11.AL_SAMPLE_OFFSET))-(mm.getReadWindowSize()*mm.getChannelCount())); try { readWindowIndex = mm.getPlaybackIndexPosition()-1; - buffer.position(pos); + buffer.position(Math.max(pos, 0)); } catch (IllegalArgumentException iae) { buffer.position(0); Gdx.app.error("BufferPosition", iae + " position was " + pos);