Top Description Fields Constructors Methods
org.lwjgl.openal

public final Class AL

extends Object
Class Inheritance
Imports
org.lwjgl.LWJGLException, .LWJGLUtil, .Sys

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

Author
Brian Matzon
Version
$Revision$ $Id$

Field Summary

Modifier and TypeField and Description
pack-priv static ALCcontext
context

Current ALCcontext.

private static boolean
created

Have we been created?

pack-priv static ALCdevice
device

ALCdevice instance.

Constructor Summary

AccessConstructor and Description
private
AL()

Method Summary

Modifier and TypeMethod and Description
public static void
create(String
Arguments supplied to native device
deviceArguments
,
int
Frequency for mixing output buffer, in units of Hz (Common values include 11025, 22050, and 44100).
contextFrequency
,
int
Refresh intervalls, in units of Hz.
contextRefresh
,
boolean
Flag, indicating a synchronous context.*
contextSynchronized
)

Creates an OpenAL instance.

public static void
create(String deviceArguments, int contextFrequency, int contextRefresh, boolean contextSynchronized, boolean
Whether to automatically open the device
openDevice
)

public static void
create()

Creates an OpenAL instance.

public static void
destroy()

Exit cleanly by calling destroy.

public static ALCcontext

Returns:

handle to the default AL context.
getContext
()

public static ALCdevice

Returns:

handle to the default AL device.
getDevice
()

private static void
init(String deviceArguments, int contextFrequency, int contextRefresh, boolean contextSynchronized, boolean openDevice)

public static boolean

Returns:

true if AL has been created
isCreated
()

private static native void
nCreate(String
Path to search for OpenAL library
oalPath
)

Native method to create AL instance

private static native void
nCreateDefault()

Native method to create AL instance from the Mac OS X 10.4 OpenAL framework.

private static native void
nDestroy()

Native method the destroy the AL

private static native void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

contextback to summary
pack-priv static ALCcontext context

Current ALCcontext.

createdback to summary
private static boolean created

Have we been created?

deviceback to summary
pack-priv static ALCdevice device

ALCdevice instance.

Constructor Detail

ALback to summary
private AL()

Method Detail

createback to summary
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:String

Arguments supplied to native device

contextFrequency:int

Frequency for mixing output buffer, in units of Hz (Common values include 11025, 22050, and 44100).

contextRefresh:int

Refresh intervalls, in units of Hz.

contextSynchronized:boolean

Flag, indicating a synchronous context.*

createback to summary
public static void create(String deviceArguments, int contextFrequency, int contextRefresh, boolean contextSynchronized, boolean openDevice) throws LWJGLException
Parameters
openDevice:boolean

Whether to automatically open the device

See Also
create(String, int, int, boolean)
createback to summary
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.

destroyback to summary
public static void destroy()

Exit cleanly by calling destroy.

getContextback to summary
public static ALCcontext getContext()
Returns:ALCcontext

handle to the default AL context.

getDeviceback to summary
public static ALCdevice getDevice()
Returns:ALCdevice

handle to the default AL device.

initback to summary
private static void init(String deviceArguments, int contextFrequency, int contextRefresh, boolean contextSynchronized, boolean openDevice) throws LWJGLException
isCreatedback to summary
public static boolean isCreated()
Returns:boolean

true if AL has been created

nCreateback to summary
private static native void nCreate(String oalPath) throws LWJGLException

Native method to create AL instance

Parameters
oalPath:String

Path to search for OpenAL library

nCreateDefaultback to summary
private static native void nCreateDefault() throws LWJGLException

Native method to create AL instance from the Mac OS X 10.4 OpenAL framework. It is only defined in the Mac OS X native library.

nDestroyback to summary
private static native void nDestroy()

Native method the destroy the AL

resetNativeStubsback to summary
private static native void resetNativeStubs(Class<T> clazz)