fixed error with window index
This commit is contained in:
parent
03966d124a
commit
4c207b20d1
@ -97,9 +97,9 @@ public class Visualizer extends Widget implements Disposable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private int updateBufferPosition() {
|
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 {
|
try {
|
||||||
readWindowIndex = mm.getPlaybackIndexPosition();
|
readWindowIndex = mm.getPlaybackIndexPosition()-1;
|
||||||
buffer.position(pos);
|
buffer.position(pos);
|
||||||
} catch (IllegalArgumentException iae) {
|
} catch (IllegalArgumentException iae) {
|
||||||
buffer.position(0);
|
buffer.position(0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user