Package org.lwjgl.openal
Class AL
java.lang.Object
org.lwjgl.openal.AL
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
Modifier and TypeMethodDescriptionstatic void
create()
Creates an OpenAL instance.static void
create
(String deviceArguments, int contextFrequency, int contextRefresh, boolean contextSynchronized) Creates an OpenAL instance.static void
create
(String deviceArguments, int contextFrequency, int contextRefresh, boolean contextSynchronized, boolean openDevice) static void
destroy()
Exit cleanly by calling destroy.static ALCcontext
static ALCdevice
static boolean
-
Method Details
-
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 devicecontextFrequency
- 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(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
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
- Returns:
- handle to the default AL context.
-
getDevice
- Returns:
- handle to the default AL device.
-