// if ogg vorbis data, we need to pass it unmodified to alBufferData
buffer = ByteBuffer.allocateDirect(baos.size());
buffer.order(ByteOrder.nativeOrder());
buffer.put(baos.toByteArray());
buffer.rewind();
} catch (Exception ioe) {
ioe.printStackTrace();
}
return buffer;
}