Class AL


  • public final class AL
    extends Object

    The AL class implements the actual creation code for linking to the native library OpenAL.

    Version:
    $Revision$ $Id$
    Author:
    Brian Matzon
    • Method Detail

      • isCreated

        public static boolean isCreated()
        Returns:
        true if AL has been created
      • create

        public static void create​(String deviceArguments,
                                  int contextFrequency,
                                  int contextRefresh,
                                  boolean contextSynchronized)
                           throws LWJGLException
        Creates an OpenAL instance. Using this constructor will cause OpenAL to open the device using supplied device argument, and create a context using the context values supplied.
        Parameters:
        deviceArguments - Arguments supplied to native device
        contextFrequency - Frequency for mixing output buffer, in units of Hz (Common values include 11025, 22050, and 44100).
        contextRefresh - Refresh intervalls, in units of Hz.
        contextSynchronized - Flag, indicating a synchronous context.*
        Throws:
        LWJGLException
      • create

        public static void create()
                           throws LWJGLException
        Creates an OpenAL instance. The empty create will cause OpenAL to open the default device, and create a context using default values. This method used to use default values that the OpenAL implementation chose but this produces unexpected results on some systems; so now it defaults to 44100Hz mixing @ 60Hz refresh.
        Throws:
        LWJGLException
      • destroy

        public static void destroy()
        Exit cleanly by calling destroy.
      • getContext

        public static ALCcontext getContext()
        Returns:
        handle to the default AL context.
      • getDevice

        public static ALCdevice getDevice()
        Returns:
        handle to the default AL device.