Hello Guest

Looking for advice on LWJGL 3 migration...

  • 3 Replies
  • 11122 Views
*

Offline Danjb

  • *
  • 18
Looking for advice on LWJGL 3 migration...
« on: February 11, 2016, 09:31:31 »
I have been developing a game for some time using LWJGL 2, and I am considering migrating to LWJGL 3. The main thing that concerns me is audio. Until now, I have been using the slick-util library to load and play audio. It's dead easy to use, BUT the project seems somewhat dead and lacking support. I recently encountered a fairly major problem with the Audio.playAsMusic() function whereby changing the gain does not seem to alter the music volume. I don't know if I'm doing something wrong or if this is a problem with the library, but it's enough to make me start thinking about alternatives.

I understand that LWJGL 3 uses OpenAL Soft for audio, but this looks a lot more complicated than my current solution. All I need (for now) is the ability to play WAVs and OGGs at different volumes - although extra functionality might be nice later down the line.

What do you suggest? Is my current problem fixable? Is it worth making the jump to LWJGL 3? Are there some good examples / tutorials out there (I have seen a few but nothing comprehensive, and a lot of them seem to opt for drastically different approaches)?

Thanks,
Danjb

*

Kai

Re: Looking for advice on LWJGL 3 migration...
« Reply #1 on: February 11, 2016, 12:48:36 »
Well, clearly it is more complicated using OpenAL directly than using the Ogg Vorbis Loader and other high-level utility classes provided by Slick Util.
As far as I know, there is currently no high-level framework like Slick Util building on top of LWJGL 3 regarding audio.
But probably you can port Slick Util's classes in the openal package to use LWJGL 3.
The OpenAL interface should still be the same.

*

Offline abcdef

  • ****
  • 336
Re: Looking for advice on LWJGL 3 migration...
« Reply #2 on: February 11, 2016, 16:00:35 »
I haven't tried it but Kappa wrote a compatibility wrapper for slick to work in LWJGL3

http://slick.ninjacave.com/slick-util3.zip


*

Offline Danjb

  • *
  • 18
Re: Looking for advice on LWJGL 3 migration...
« Reply #3 on: February 20, 2016, 21:59:11 »
Thanks for the replies guys!

Fortunately I found a way to control the music volume in Slick-Util using SoundStore.setMusicVolume(), so I think I'll stick with LWJGL 2 for now until I have a good reason to make the transition.