[quote]but these lines didnt make any sense to me or the compiler:
[/quote]
It’s just a utility method located in:
org.lwjgl.test.openal.BasicTest
/**
* Creates an integer buffer to hold specified ints
* - strictly a utility method
*
* @param size how many int to contain
* @return created IntBuffer
*/
protected IntBuffer createIntBuffer(int size) {
ByteBuffer temp = ByteBuffer.allocateDirect(4*size);
temp.order(ByteOrder.nativeOrder());
return temp.asIntBuffer();
}
[quote] Also, is it hard to load orbis files instead of wave files?
[/quote]
Nope - however oal only plays PCM audio, so you need to decode the ogg files to PCM first, and then load them directly:
Go to http://www.jcraft.com/jorbis/index.html and download the jorbis package
Familiarize yourself with it
take any ogg file, and decode it using the VorbisFile class - save the raw data, and play that directly with openal.
http://sourceforge.net/projects/spgl also have some OpenAL stuff in there…(http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/spgl/spgl/src/com/shavenpuppy/jglib/sound/)
hope this gets you started