Class ALC10
- java.lang.Object
-
- org.lwjgl.openal.ALC10
-
public class ALC10 extends java.lang.ObjectNative bindings to ALC 1.0 functionality.
-
-
Field Summary
Fields Modifier and Type Field and Description static intALC_ALL_ATTRIBUTES
ALC_ATTRIBUTES_SIZEInteger queries.static intALC_DEFAULT_DEVICE_SPECIFIER
ALC_DEVICE_SPECIFIER
ALC_EXTENSIONSString queries.static intALC_FALSEGeneral tokens.static intALC_FREQUENCYContext creation attributes.static intALC_INVALIDGeneral tokens.static intALC_INVALID_CONTEXT
ALC_INVALID_DEVICE
ALC_INVALID_ENUM
ALC_INVALID_VALUEError conditions.static intALC_MAJOR_VERSION
ALC_MINOR_VERSIONInteger queries.static intALC_NO_ERROR
ALC_OUT_OF_MEMORYError conditions.static intALC_REFRESH
ALC_SYNCContext creation attributes.static intALC_TRUEGeneral tokens.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static booleanalcCloseDevice(long deviceHandle)Allows the application to disconnect from a device.static longalcCreateContext(long deviceHandle, int[] attrList)Array version of:CreateContextstatic longalcCreateContext(long deviceHandle, java.nio.IntBuffer attrList)Creates an AL context.static voidalcDestroyContext(long context)Destroys a context.static longalcGetContextsDevice(long context)Queries for, and obtains a handle to, the device of a given context.static longalcGetCurrentContext()Queries for, and obtains a handle to, the current context for the application.static intalcGetEnumValue(long deviceHandle, java.nio.ByteBuffer enumName)Returns extension enum values.static intalcGetEnumValue(long deviceHandle, java.lang.CharSequence enumName)Returns extension enum values.static intalcGetError(long deviceHandle)Queries ALC errors.static intalcGetInteger(long deviceHandle, int token)Obtains integer value(s) from ALC.static voidalcGetIntegerv(long deviceHandle, int token, int[] dest)Array version of:GetIntegervstatic voidalcGetIntegerv(long deviceHandle, int token, java.nio.IntBuffer dest)Obtains integer value(s) from ALC.static longalcGetProcAddress(long deviceHandle, java.nio.ByteBuffer funcName)Retrieves extension entry points.static longalcGetProcAddress(long deviceHandle, java.lang.CharSequence funcName)Retrieves extension entry points.static java.lang.StringalcGetString(long deviceHandle, int token)Obtains string value(s) from ALC.static booleanalcIsExtensionPresent(long deviceHandle, java.nio.ByteBuffer extName)Verifies that a given extension is available for the current context and the device it is associated with.static booleanalcIsExtensionPresent(long deviceHandle, java.lang.CharSequence extName)Verifies that a given extension is available for the current context and the device it is associated with.static booleanalcMakeContextCurrent(long context)Makes a context current with respect to OpenAL operation.static longalcOpenDevice(java.nio.ByteBuffer deviceSpecifier)Allows the application to connect to a device.static longalcOpenDevice(java.lang.CharSequence deviceSpecifier)Allows the application to connect to a device.static voidalcProcessContext(long context)The current context is the only context accessible to state changes by AL commands (aside from state changes affecting shared objects).static voidalcSuspendContext(long context)The application can suspend any context from processing (including the current one).
-
-
-
Field Detail
-
ALC_INVALID
public static final int ALC_INVALID
General tokens.- See Also:
- Constant Field Values
-
ALC_FALSE
public static final int ALC_FALSE
General tokens.- See Also:
- Constant Field Values
-
ALC_TRUE
public static final int ALC_TRUE
General tokens.- See Also:
- Constant Field Values
-
ALC_FREQUENCY
public static final int ALC_FREQUENCY
Context creation attributes.- See Also:
- Constant Field Values
-
ALC_REFRESH
public static final int ALC_REFRESH
Context creation attributes.- See Also:
- Constant Field Values
-
ALC_SYNC
public static final int ALC_SYNC
Context creation attributes.- See Also:
- Constant Field Values
-
ALC_NO_ERROR
public static final int ALC_NO_ERROR
Error conditions.- See Also:
- Constant Field Values
-
ALC_INVALID_DEVICE
public static final int ALC_INVALID_DEVICE
Error conditions.- See Also:
- Constant Field Values
-
ALC_INVALID_CONTEXT
public static final int ALC_INVALID_CONTEXT
Error conditions.- See Also:
- Constant Field Values
-
ALC_INVALID_ENUM
public static final int ALC_INVALID_ENUM
Error conditions.- See Also:
- Constant Field Values
-
ALC_INVALID_VALUE
public static final int ALC_INVALID_VALUE
Error conditions.- See Also:
- Constant Field Values
-
ALC_OUT_OF_MEMORY
public static final int ALC_OUT_OF_MEMORY
Error conditions.- See Also:
- Constant Field Values
-
ALC_DEFAULT_DEVICE_SPECIFIER
public static final int ALC_DEFAULT_DEVICE_SPECIFIER
String queries.- See Also:
- Constant Field Values
-
ALC_DEVICE_SPECIFIER
public static final int ALC_DEVICE_SPECIFIER
String queries.- See Also:
- Constant Field Values
-
ALC_EXTENSIONS
public static final int ALC_EXTENSIONS
String queries.- See Also:
- Constant Field Values
-
ALC_MAJOR_VERSION
public static final int ALC_MAJOR_VERSION
Integer queries.- See Also:
- Constant Field Values
-
ALC_MINOR_VERSION
public static final int ALC_MINOR_VERSION
Integer queries.- See Also:
- Constant Field Values
-
ALC_ATTRIBUTES_SIZE
public static final int ALC_ATTRIBUTES_SIZE
Integer queries.- See Also:
- Constant Field Values
-
ALC_ALL_ATTRIBUTES
public static final int ALC_ALL_ATTRIBUTES
Integer queries.- See Also:
- Constant Field Values
-
-
Method Detail
-
alcOpenDevice
public static long alcOpenDevice(java.nio.ByteBuffer deviceSpecifier)
Allows the application to connect to a device.If the function returns
NULL, then no sound driver/device has been found. The argument is a null terminated string that requests a certain device or device configuration. IfNULLis specified, the implementation will provide an implementation specific default.- Parameters:
deviceSpecifier- the requested device or device configuration
-
alcOpenDevice
public static long alcOpenDevice(java.lang.CharSequence deviceSpecifier)
Allows the application to connect to a device.If the function returns
NULL, then no sound driver/device has been found. The argument is a null terminated string that requests a certain device or device configuration. IfNULLis specified, the implementation will provide an implementation specific default.- Parameters:
deviceSpecifier- the requested device or device configuration
-
alcCloseDevice
public static boolean alcCloseDevice(long deviceHandle)
Allows the application to disconnect from a device.The return code will be ALC_TRUE or ALC_FALSE, indicating success or failure. Failure will occur if all the device's contexts and buffers have not been destroyed. Once closed, the
deviceHandleis invalid.- Parameters:
deviceHandle- the device to close
-
alcCreateContext
public static long alcCreateContext(long deviceHandle, java.nio.IntBuffer attrList)Creates an AL context.- Parameters:
deviceHandle- a valid deviceattrList- null or a zero terminated list of integer pairs composed of valid ALC attribute tokens and requested values. One of:FREQUENCYREFRESHSYNCMONO_SOURCESSTEREO_SOURCES
-
alcMakeContextCurrent
public static boolean alcMakeContextCurrent(long context)
Makes a context current with respect to OpenAL operation.The context parameter can be
NULLor a valid context pointer. UsingNULLresults in no context being current, which is useful when shutting OpenAL down. The operation will apply to the device that the context was created for.For each OS process (usually this means for each application), only one context can be current at any given time. All AL commands apply to the current context. Commands that affect objects shared among contexts (e.g. buffers) have side effects on other contexts.
- Parameters:
context- the context to make current
-
alcProcessContext
public static void alcProcessContext(long context)
The current context is the only context accessible to state changes by AL commands (aside from state changes affecting shared objects). However, multiple contexts can be processed at the same time. To indicate that a context should be processed (i.e. that internal execution state such as the offset increments are to be performed), the application usesalcProcessContext.Repeated calls to alcProcessContext are legal, and do not affect a context that is already marked as processing. The default state of a context created by alcCreateContext is that it is processing.
- Parameters:
context- the context to mark for processing
-
alcSuspendContext
public static void alcSuspendContext(long context)
The application can suspend any context from processing (including the current one). To indicate that a context should be suspended from processing (i.e. that internal execution state such as offset increments are not to be changed), the application usesalcSuspendContext.Repeated calls to alcSuspendContext are legal, and do not affect a context that is already marked as suspended.
- Parameters:
context- the context to mark as suspended
-
alcDestroyContext
public static void alcDestroyContext(long context)
Destroys a context.The correct way to destroy a context is to first release it using alcMakeCurrent with a
NULLcontext. Applications should not attempt to destroy a current context – doing so will not work and will result in an ALC_INVALID_OPERATION error. All sources within a context will automatically be deleted during context destruction.- Parameters:
context- the context to destroy
-
alcGetCurrentContext
public static long alcGetCurrentContext()
Queries for, and obtains a handle to, the current context for the application. If there is no current context,NULLis returned.
-
alcGetContextsDevice
public static long alcGetContextsDevice(long context)
Queries for, and obtains a handle to, the device of a given context.- Parameters:
context- the context to query
-
alcIsExtensionPresent
public static boolean alcIsExtensionPresent(long deviceHandle, java.nio.ByteBuffer extName)Verifies that a given extension is available for the current context and the device it is associated with.Invalid and unsupported string tokens return ALC_FALSE. A
NULLdeviceHandle is acceptable.extNameis not case sensitive – the implementation will convert the name to all upper-case internally (and will express extension names in upper-case).- Parameters:
deviceHandle- the device to queryextName- the extension name
-
alcIsExtensionPresent
public static boolean alcIsExtensionPresent(long deviceHandle, java.lang.CharSequence extName)Verifies that a given extension is available for the current context and the device it is associated with.Invalid and unsupported string tokens return ALC_FALSE. A
NULLdeviceHandle is acceptable.extNameis not case sensitive – the implementation will convert the name to all upper-case internally (and will express extension names in upper-case).- Parameters:
deviceHandle- the device to queryextName- the extension name
-
alcGetProcAddress
public static long alcGetProcAddress(long deviceHandle, java.nio.ByteBuffer funcName)Retrieves extension entry points.The application is expected to verify the applicability of an extension or core function entry point before requesting it by name, by use of
IsExtensionPresent.Entry points can be device specific, but are not context specific. Using a
NULLdevice handle does not guarantee that the entry point is returned, even if available for one of the available devices.- Parameters:
deviceHandle- the device to queryfuncName- the function name
-
alcGetProcAddress
public static long alcGetProcAddress(long deviceHandle, java.lang.CharSequence funcName)Retrieves extension entry points.The application is expected to verify the applicability of an extension or core function entry point before requesting it by name, by use of
IsExtensionPresent.Entry points can be device specific, but are not context specific. Using a
NULLdevice handle does not guarantee that the entry point is returned, even if available for one of the available devices.- Parameters:
deviceHandle- the device to queryfuncName- the function name
-
alcGetEnumValue
public static int alcGetEnumValue(long deviceHandle, java.nio.ByteBuffer enumName)Returns extension enum values.Enumeration/token values are device independent, but tokens defined for extensions might not be present for a given device. Using a
NULLhandle is legal, but only the tokens defined by the AL core are guaranteed. Availability of extension tokens depends on the ALC extension.- Parameters:
deviceHandle- the device to queryenumName- the enum name
-
alcGetEnumValue
public static int alcGetEnumValue(long deviceHandle, java.lang.CharSequence enumName)Returns extension enum values.Enumeration/token values are device independent, but tokens defined for extensions might not be present for a given device. Using a
NULLhandle is legal, but only the tokens defined by the AL core are guaranteed. Availability of extension tokens depends on the ALC extension.- Parameters:
deviceHandle- the device to queryenumName- the enum name
-
alcGetError
public static int alcGetError(long deviceHandle)
Queries ALC errors.ALC uses the same conventions and mechanisms as AL for error handling. In particular, ALC does not use conventions derived from X11 (GLX) or Windows (WGL).
Error conditions are specific to the device, and (like AL) a call to alcGetError resets the error state.
- Parameters:
deviceHandle- the device to query
-
alcGetString
public static java.lang.String alcGetString(long deviceHandle, int token)Obtains string value(s) from ALC.LWJGL note: Use
ALUtil.getStringList(long, int)for those tokens that return multiple values.- Parameters:
deviceHandle- the device to querytoken- the information to query. One of:DEFAULT_DEVICE_SPECIFIERDEVICE_SPECIFIEREXTENSIONSCAPTURE_DEFAULT_DEVICE_SPECIFIERCAPTURE_DEVICE_SPECIFIER
-
alcGetIntegerv
public static void alcGetIntegerv(long deviceHandle, int token, java.nio.IntBuffer dest)Obtains integer value(s) from ALC.- Parameters:
deviceHandle- the device to querytoken- the information to query. One of:MAJOR_VERSIONMINOR_VERSIONATTRIBUTES_SIZEALL_ATTRIBUTESCAPTURE_SAMPLESdest- the destination buffer
-
alcGetInteger
public static int alcGetInteger(long deviceHandle, int token)Obtains integer value(s) from ALC.- Parameters:
deviceHandle- the device to querytoken- the information to query. One of:MAJOR_VERSIONMINOR_VERSIONATTRIBUTES_SIZEALL_ATTRIBUTESCAPTURE_SAMPLES
-
alcCreateContext
public static long alcCreateContext(long deviceHandle, int[] attrList)Array version of:CreateContext
-
alcGetIntegerv
public static void alcGetIntegerv(long deviceHandle, int token, int[] dest)Array version of:GetIntegerv
-
-