LWJGL Forum

Please login or register.

Login with username, password and session length

Author Topic: AL.create and AL.destroy nonexistant (beginner question)  (Read 2615 times)

david37370

  • Newbie
  • *
  • Offline Offline
  • Posts: 20
AL.create and AL.destroy nonexistant (beginner question)
« on: February 14, 2015, 14:32:09 »

I started to look at openAL for sound handling in my game. it may sound wierd, but AL.create() and AL.destroy() dont exist in the class AL, apparently! and all of the tutorials i tried code from, used those functions. i tried both nightly and stable builds, but nothing works and im feeling stupid. is the official tutorial in the lwjgl site outdated??
Logged

SHC

  • Regular nerd
  • **
  • Offline Offline
  • Posts: 94
Re: AL.create and AL.destroy nonexistant (beginner question)
« Reply #1 on: February 14, 2015, 16:20:07 »

Those are the functions available in LWJGL 2.X. In LWJGL 3, the system has changed a lot. You have to do this instead of those two methods.

Code: [Select]
private ALContext context;

public void myALCreate()
{
    context = ALContext.create(null, 48000, 60, false);
}

public void myALDestroy()
{
    ALDevice device = context.getDevice();
    context.destroy();
    device.destroy();
}

Everything else should be the same as in those tutorials. Hope this helps.

david37370

  • Newbie
  • *
  • Offline Offline
  • Posts: 20
Re: AL.create and AL.destroy nonexistant (beginner question)
« Reply #2 on: February 14, 2015, 17:10:16 »

Thanks! I also want to say that i learned the first steps of VBOs from your tutorials, and i give you credit for that :)
Logged