Fixed mp3 playing, refactored to avoid duplicating code.

git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@153 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
Andrzej Kapolka
2007-02-09 02:10:32 +00:00
parent ea9f4d481e
commit fc5459fb7d
7 changed files with 341 additions and 216 deletions
+2 -1
View File
@@ -24,6 +24,7 @@ package com.threerings.openal;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.nio.IntBuffer;
import org.lwjgl.BufferUtils;
@@ -263,7 +264,7 @@ public abstract class Stream
protected boolean populateBuffer (int bufferId)
{
if (_abuf == null) {
_abuf = ByteBuffer.allocateDirect(BUFFER_SIZE);
_abuf = ByteBuffer.allocateDirect(BUFFER_SIZE).order(ByteOrder.nativeOrder());
}
_abuf.clear();
int read = 0;