Hi,
I now got far enough with my game to check out the tutorials for OpenAL realized with LWJGL, but I´m struggling with the differences of two tutorials.
On the main page of the LWJGL-wiki are tose tutorials to be found:
http://lwjgl.org/wik...ounds_for_LWJGL
http://lwjgl.org/wik...e_Static_Source
The problem now lies with the Loading of the soundfiles:
I´d like to use the Slick-Util-Library, due to its facility to load .ogg sound (wich is my preffered format).
The other tutorial explains the technique to create 3D-Stereo-Soundeffects, but it only uses .wav-files.
Now I´m struggling to merge both lessons to be able to make this work:
The methods of the OpenAL-tutorial cannot be applied to data stored in the class org.newdawn.slick.openal.Audio, they require some sort of ByteBuffer (the tutorial uses a class called "WaveData"). So I am not able to load a .ogg-file and do 3D-Sound-effects and all that fancy stuff.
The question now is,
how do I convert "Audio" to "WaveData" or simply
how how can I make those methods work?
Thx, in advance
LWJGL - Problem with the sound
Started by m41q, Mar 01 2012 12:29 PM
1 reply to this topic
Sponsor:
#2 Members - Reputation: 151
Posted 02 March 2012 - 08:54 AM
if no one knows about this topic...
Any suggestion of an alternative viable method of using 3D-Sound (.ogg-files) with Java is appreciated as well.
EDIT:
SOLVED:
Just in case anyone has the same problem:
There is a class similar to WaveData, called OggData, but it has to be decoded first (using the class "OggDecoder").
A pretty solid explanation of the stuff can be found here:
http://www.cokeandcode.com/index.html?page=tutorials/ast4
It is a tutorial for the sounds of a game made with LWJGL, using .ogg-files and the sound-buffers for 3D-Sound (althougt I think they did not acutally implement the 3D-effect).
Any suggestion of an alternative viable method of using 3D-Sound (.ogg-files) with Java is appreciated as well.
EDIT:
SOLVED:
Just in case anyone has the same problem:
There is a class similar to WaveData, called OggData, but it has to be decoded first (using the class "OggDecoder").
A pretty solid explanation of the stuff can be found here:
http://www.cokeandcode.com/index.html?page=tutorials/ast4
It is a tutorial for the sounds of a game made with LWJGL, using .ogg-files and the sound-buffers for 3D-Sound (althougt I think they did not acutally implement the 3D-effect).






