Hello Guest

AL.create and AL.destroy nonexistant (beginner question)

  • 2 Replies
  • 12021 Views
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??

*

Offline SHC

  • **
  • 94
    • GoHarsha.com
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.

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