Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


LWJGL - Problem with the sound


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 m41q   Members   -  Reputation: 151

Like
0Likes
Like

Posted 01 March 2012 - 12:29 PM

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

Sponsor:

#2 m41q   Members   -  Reputation: 151

Like
0Likes
Like

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).




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS