# AL (LWJGL API)
Date: 2015-07-28

## org.lwjgl.openal
Class AL

    java.lang.Object
      org.lwjgl.openal.AL

    public final class AL

extends java.lang.Object

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

Version:
  $Revision$ $Id$
Author:
  Brian Matzon <brian@matzon.dk>

Method Summary
`static void` `create()` Creates an OpenAL instance.
`static void` `create(java.lang.String deviceArguments, int contextFrequency, int contextRefresh, boolean contextSynchronized)` Creates an OpenAL instance.
`static void` `create(java.lang.String deviceArguments, int contextFrequency, int contextRefresh, boolean contextSynchronized, boolean openDevice)`
`static void` `destroy()` Exit cleanly by calling destroy.
`static ALCcontext` `getContext()`
`static ALCdevice` `getDevice()`
`static boolean` `isCreated()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### isCreated

    public static boolean isCreated()

  Returns:
    true if AL has been created

### create

    public static void create(java.lang.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(java.lang.String deviceArguments,
                              int contextFrequency,
                              int contextRefresh,
                              boolean contextSynchronized,
                              boolean openDevice)
                       throws LWJGLException

  Parameters:
    `openDevice` - Whether to automatically open the device
  Throws:
    `LWJGLException`
  See Also:
    `create(String, int, int, boolean)`

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

Copyright © 2002-2009 lwjgl.org. All Rights Reserved.