but these lines didnt make any sense to me or the compiler:
It's just a utility method located in:
org.lwjgl.test.openal.BasicTest
1 2 3 4 5 6 7 8 9 10 11 12 13
| protected IntBuffer createIntBuffer(int size) { ByteBuffer temp = ByteBuffer.allocateDirect(4*size); temp.order(ByteOrder.nativeOrder()); return temp.asIntBuffer(); } |
Also, is it hard to load orbis files instead of wave files?
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