Jump to content
  • Advertisement
Sign in to follow this  
Guest m41q

LWJGL - Problem with the sound

This topic is 2475 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Guest m41q
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

Share this post


Link to post
Share on other sites
Advertisement
Guest m41q
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).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!