Package org.lwjgl.openal
Class ALC
- java.lang.Object
-
- org.lwjgl.openal.ALC
-
public final class ALC extends java.lang.ObjectThis class must be used before any OpenAL function is called. It has the following responsibilities:- Loads the OpenAL native library into the JVM process.
- Creates instances of
ALCCapabilitiesclasses. AnALCCapabilitiesinstance contains flags for functionality that is available for an OpenAL device. Internally, it also contains function pointers that are only valid for that specific OpenAL device.
Library lifecycle
The OpenAL library is loaded automatically when this class is initialized. Set the
Configuration.OPENAL_EXPLICIT_INIToption to override this behavior. Manual loading/unloading can be achieved with theALC.create()andALC.destroy()functions. The name of the library loaded can be overridden with theConfiguration.OPENAL_LIBRARY_NAMEoption.ALCCapabilities creation
Instances of
ALCCapabilitiescan be created with theALC.createCapabilities(long)method. Calling this method is expensive, soALCCapabilitiesinstances should be cached in user code.- See Also:
AL
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static voidcreate()Loads the OpenAL native library, using the default library name.static voidcreate(FunctionProviderLocal functionProvider)Initializes ALC with the specifiedFunctionProviderLocal.static voidcreate(java.lang.String libName)Loads the OpenAL native library, using the specified library name.static ALCCapabilitiescreateCapabilities(long device)Creates a newALCCapabilitiesinstance for the specified OpenAL device.static voiddestroy()Unloads the OpenAL native library.static FunctionProviderLocalgetFunctionProvider()Returns theFunctionProviderLocalfor the OpenAL native library.
-
-
-
Method Detail
-
create
public static void create()
Loads the OpenAL native library, using the default library name.
-
create
public static void create(java.lang.String libName)
Loads the OpenAL native library, using the specified library name.- Parameters:
libName- the native library name
-
create
public static void create(FunctionProviderLocal functionProvider)
Initializes ALC with the specifiedFunctionProviderLocal. This method can be used to implement custom ALC library loading.- Parameters:
functionProvider- the provider of ALC function addresses
-
destroy
public static void destroy()
Unloads the OpenAL native library.
-
getFunctionProvider
public static FunctionProviderLocal getFunctionProvider()
Returns theFunctionProviderLocalfor the OpenAL native library.
-
createCapabilities
public static ALCCapabilities createCapabilities(long device)
Creates a newALCCapabilitiesinstance for the specified OpenAL device.- Returns:
- the
ALCCapabilitiesinstance
-
-