Top Description Fields Constructors Methods
org.lwjgl.openal

public Class ALC10

extends Object
Class Inheritance
Known Direct Subclasses
org.lwjgl.openal.ALC11
Imports
javax.annotation.*, java.nio.*, org.lwjgl.system.*

Native bindings to ALC 1.0 functionality.

Field Summary

Modifier and TypeField and Description
public static final int
ALC_ALL_ATTRIBUTES

Integer queries.

public static final int
ALC_ATTRIBUTES_SIZE

Integer queries.

public static final int
public static final int
ALC_DEVICE_SPECIFIER

String queries.

public static final int
ALC_EXTENSIONS

String queries.

public static final int
ALC_FALSE

General tokens.

public static final int
ALC_FREQUENCY

Context creation attributes.

public static final int
ALC_INVALID

General tokens.

public static final int
ALC_INVALID_CONTEXT

Error conditions.

public static final int
ALC_INVALID_DEVICE

Error conditions.

public static final int
ALC_INVALID_ENUM

Error conditions.

public static final int
ALC_INVALID_VALUE

Error conditions.

public static final int
ALC_MAJOR_VERSION

Integer queries.

public static final int
ALC_MINOR_VERSION

Integer queries.

public static final int
ALC_NO_ERROR

Error conditions.

public static final int
ALC_OUT_OF_MEMORY

Error conditions.

public static final int
ALC_REFRESH

Context creation attributes.

public static final int
ALC_SYNC

Context creation attributes.

public static final int
ALC_TRUE

General tokens.

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public static boolean
alcCloseDevice(long
the device to close
deviceHandle
)

Allows the application to disconnect from a device.

public static long
alcCreateContext(long
a valid device
deviceHandle
,
IntBuffer
null or a zero terminated list of integer pairs composed of valid ALC attribute tokens and requested values. One of:
FREQUENCYREFRESHSYNCMONO_SOURCESSTEREO_SOURCES
attrList
)

Creates an AL context.

public static long
alcCreateContext(long deviceHandle, int[] attrList)

Array version of: CreateContext

public static void
alcDestroyContext(long
the context to destroy
context
)

Destroys a context.

public static long
alcGetContextsDevice(long
the context to query
context
)

Queries for, and obtains a handle to, the device of a given context.

public static long
alcGetCurrentContext()

Queries for, and obtains a handle to, the current context for the application.

public static int
alcGetEnumValue(long
the device to query
deviceHandle
,
ByteBuffer
the enum name
enumName
)

Returns extension enum values.

public static int
alcGetEnumValue(long
the device to query
deviceHandle
,
CharSequence
the enum name
enumName
)

Returns extension enum values.

public static int
alcGetError(long
the device to query
deviceHandle
)

Queries ALC errors.

public static int
alcGetInteger(long
the device to query
deviceHandle
,
int token)

Obtains integer value(s) from ALC.

public static void
alcGetIntegerv(long
the device to query
deviceHandle
,
int token, IntBuffer
the destination buffer
dest
)

Obtains integer value(s) from ALC.

public static void
alcGetIntegerv(long deviceHandle, int token, int[] dest)

Array version of: GetIntegerv

public static long
alcGetProcAddress(long
the device to query
deviceHandle
,
ByteBuffer
the function name
funcName
)

Retrieves extension entry points.

public static long
alcGetProcAddress(long
the device to query
deviceHandle
,
CharSequence
the function name
funcName
)

Retrieves extension entry points.

public static String
alcGetString(long
the device to query
deviceHandle
,
int token)

Obtains string value(s) from ALC.

public static boolean
alcIsExtensionPresent(long
the device to query
deviceHandle
,
ByteBuffer
the extension name
extName
)

Verifies that a given extension is available for the current context and the device it is associated with.

public static boolean
alcIsExtensionPresent(long
the device to query
deviceHandle
,
CharSequence
the extension name
extName
)

Verifies that a given extension is available for the current context and the device it is associated with.

public static boolean
alcMakeContextCurrent(long
the context to make current
context
)

Makes a context current with respect to OpenAL operation.

public static long
alcOpenDevice(ByteBuffer
the requested device or device configuration
deviceSpecifier
)

Allows the application to connect to a device.

public static long
alcOpenDevice(CharSequence
the requested device or device configuration
deviceSpecifier
)

Allows the application to connect to a device.

public static void
alcProcessContext(long
the context to mark for processing
context
)

The current context is the only context accessible to state changes by AL commands (aside from state changes affecting shared objects).

public static void
alcSuspendContext(long
the context to mark as suspended
context
)

The application can suspend any context from processing (including the current one).

public static long
nalcCreateContext(long deviceHandle, long attrList)

Unsafe version of: CreateContext

public static int
nalcGetEnumValue(long deviceHandle, long enumName)

Unsafe version of: GetEnumValue

public static void
nalcGetIntegerv(long deviceHandle, int token, int
the size of the dest buffer
size
,
long dest)

Unsafe version of: GetIntegerv

public static long
nalcGetProcAddress(long deviceHandle, long funcName)

Unsafe version of: GetProcAddress

public static long
nalcGetString(long deviceHandle, int token)

Unsafe version of: GetString

public static boolean
nalcIsExtensionPresent(long deviceHandle, long extName)

Unsafe version of: IsExtensionPresent

public static long
nalcOpenDevice(long deviceSpecifier)

Unsafe version of: OpenDevice

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

ALC_ALL_ATTRIBUTESback to summary
public static final int ALC_ALL_ATTRIBUTES

Integer queries.

ALC_ATTRIBUTES_SIZEback to summary
public static final int ALC_ATTRIBUTES_SIZE

Integer queries.

ALC_DEFAULT_DEVICE_SPECIFIERback to summary
public static final int ALC_DEFAULT_DEVICE_SPECIFIER

String queries.

ALC_DEVICE_SPECIFIERback to summary
public static final int ALC_DEVICE_SPECIFIER

String queries.

ALC_EXTENSIONSback to summary
public static final int ALC_EXTENSIONS

String queries.

ALC_FALSEback to summary
public static final int ALC_FALSE

General tokens.

ALC_FREQUENCYback to summary
public static final int ALC_FREQUENCY

Context creation attributes.

ALC_INVALIDback to summary
public static final int ALC_INVALID

General tokens.

ALC_INVALID_CONTEXTback to summary
public static final int ALC_INVALID_CONTEXT

Error conditions.

ALC_INVALID_DEVICEback to summary
public static final int ALC_INVALID_DEVICE

Error conditions.

ALC_INVALID_ENUMback to summary
public static final int ALC_INVALID_ENUM

Error conditions.

ALC_INVALID_VALUEback to summary
public static final int ALC_INVALID_VALUE

Error conditions.

ALC_MAJOR_VERSIONback to summary
public static final int ALC_MAJOR_VERSION

Integer queries.

ALC_MINOR_VERSIONback to summary
public static final int ALC_MINOR_VERSION

Integer queries.

ALC_NO_ERRORback to summary
public static final int ALC_NO_ERROR

Error conditions.

ALC_OUT_OF_MEMORYback to summary
public static final int ALC_OUT_OF_MEMORY

Error conditions.

ALC_REFRESHback to summary
public static final int ALC_REFRESH

Context creation attributes.

ALC_SYNCback to summary
public static final int ALC_SYNC

Context creation attributes.

ALC_TRUEback to summary
public static final int ALC_TRUE

General tokens.

Constructor Detail

ALC10back to summary
protected ALC10()

Method Detail

alcCloseDeviceback to summary
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 deviceHandle is invalid.

Parameters
deviceHandle:long

the device to close

Annotations
@NativeType:ALCboolean
alcCreateContextback to summary
public static long alcCreateContext(long deviceHandle, IntBuffer attrList)

Creates an AL context.

Parameters
deviceHandle:long

a valid device

attrList:IntBuffer

null or a zero terminated list of integer pairs composed of valid ALC attribute tokens and requested values. One of:

FREQUENCYREFRESHSYNCMONO_SOURCESSTEREO_SOURCES
Annotations
@NativeType:ALCcontext *
alcCreateContextback to summary
public static long alcCreateContext(long deviceHandle, int[] attrList)

Array version of: CreateContext

Annotations
@NativeType:ALCcontext *
alcDestroyContextback to summary
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 NULL context. 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:long

the context to destroy

Annotations
@NativeType:ALCvoid
alcGetContextsDeviceback to summary
public static long alcGetContextsDevice(long context)

Queries for, and obtains a handle to, the device of a given context.

Parameters
context:long

the context to query

Annotations
@NativeType:ALCdevice *
alcGetCurrentContextback to summary
public static long alcGetCurrentContext()

Queries for, and obtains a handle to, the current context for the application. If there is no current context, NULL is returned.

Annotations
@NativeType:ALCcontext *
alcGetEnumValueback to summary
public static int alcGetEnumValue(long deviceHandle, 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 NULL handle is legal, but only the tokens defined by the AL core are guaranteed. Availability of extension tokens depends on the ALC extension.

Parameters
deviceHandle:long

the device to query

enumName:ByteBuffer

the enum name

Annotations
@NativeType:ALCenum
alcGetEnumValueback to summary
public static int alcGetEnumValue(long deviceHandle, 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 NULL handle is legal, but only the tokens defined by the AL core are guaranteed. Availability of extension tokens depends on the ALC extension.

Parameters
deviceHandle:long

the device to query

enumName:CharSequence

the enum name

Annotations
@NativeType:ALCenum
alcGetErrorback to summary
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:long

the device to query

Annotations
@NativeType:ALCenum
alcGetIntegerback to summary
public static int alcGetInteger(long deviceHandle, int token)

Obtains integer value(s) from ALC.

Parameters
deviceHandle:long

the device to query

token:int

the information to query. One of:

MAJOR_VERSIONMINOR_VERSIONATTRIBUTES_SIZEALL_ATTRIBUTESCAPTURE_SAMPLES
Annotations
@NativeType:ALCvoid
alcGetIntegervback to summary
public static void alcGetIntegerv(long deviceHandle, int token, IntBuffer dest)

Obtains integer value(s) from ALC.

Parameters
deviceHandle:long

the device to query

token:int

the information to query. One of:

MAJOR_VERSIONMINOR_VERSIONATTRIBUTES_SIZEALL_ATTRIBUTESCAPTURE_SAMPLES
dest:IntBuffer

the destination buffer

Annotations
@NativeType:ALCvoid
alcGetIntegervback to summary
public static void alcGetIntegerv(long deviceHandle, int token, int[] dest)

Array version of: GetIntegerv

Annotations
@NativeType:ALCvoid
alcGetProcAddressback to summary
public static long alcGetProcAddress(long deviceHandle, 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 NULL device handle does not guarantee that the entry point is returned, even if available for one of the available devices.

Parameters
deviceHandle:long

the device to query

funcName:ByteBuffer

the function name

Annotations
@NativeType:void *
alcGetProcAddressback to summary
public static long alcGetProcAddress(long deviceHandle, 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 NULL device handle does not guarantee that the entry point is returned, even if available for one of the available devices.

Parameters
deviceHandle:long

the device to query

funcName:CharSequence

the function name

Annotations
@NativeType:void *
alcGetStringback to summary
public static String alcGetString(long deviceHandle, int token)

Obtains string value(s) from ALC.

LWJGL note: Use ALUtil#getStringList for those tokens that return multiple values.

Parameters
deviceHandle:long

the device to query

token:int

the information to query. One of:

DEFAULT_DEVICE_SPECIFIERDEVICE_SPECIFIEREXTENSIONS
CAPTURE_DEFAULT_DEVICE_SPECIFIERCAPTURE_DEVICE_SPECIFIER
Annotations
@Nullable
@NativeType:ALCchar const *
alcIsExtensionPresentback to summary
public static boolean alcIsExtensionPresent(long deviceHandle, 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 NULL deviceHandle is acceptable. extName is not case sensitive – the implementation will convert the name to all upper-case internally (and will express extension names in upper-case).

Parameters
deviceHandle:long

the device to query

extName:ByteBuffer

the extension name

Annotations
@NativeType:ALCboolean
alcIsExtensionPresentback to summary
public static boolean alcIsExtensionPresent(long deviceHandle, 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 NULL deviceHandle is acceptable. extName is not case sensitive – the implementation will convert the name to all upper-case internally (and will express extension names in upper-case).

Parameters
deviceHandle:long

the device to query

extName:CharSequence

the extension name

Annotations
@NativeType:ALCboolean
alcMakeContextCurrentback to summary
public static boolean alcMakeContextCurrent(long context)

Makes a context current with respect to OpenAL operation.

The context parameter can be NULL or a valid context pointer. Using NULL results 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:long

the context to make current

Annotations
@NativeType:ALCboolean
alcOpenDeviceback to summary
public static long alcOpenDevice(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. If NULL is specified, the implementation will provide an implementation specific default.

Parameters
deviceSpecifier:ByteBuffer

the requested device or device configuration

Annotations
@NativeType:ALCdevice *
alcOpenDeviceback to summary
public static long alcOpenDevice(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. If NULL is specified, the implementation will provide an implementation specific default.

Parameters
deviceSpecifier:CharSequence

the requested device or device configuration

Annotations
@NativeType:ALCdevice *
alcProcessContextback to summary
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 uses alcProcessContext.

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:long

the context to mark for processing

Annotations
@NativeType:ALCvoid
alcSuspendContextback to summary
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 uses alcSuspendContext.

Repeated calls to alcSuspendContext are legal, and do not affect a context that is already marked as suspended.

Parameters
context:long

the context to mark as suspended

Annotations
@NativeType:ALCvoid
nalcCreateContextback to summary
public static long nalcCreateContext(long deviceHandle, long attrList)

Unsafe version of: CreateContext

nalcGetEnumValueback to summary
public static int nalcGetEnumValue(long deviceHandle, long enumName)

Unsafe version of: GetEnumValue

nalcGetIntegervback to summary
public static void nalcGetIntegerv(long deviceHandle, int token, int size, long dest)

Unsafe version of: GetIntegerv

Parameters
size:int

the size of the dest buffer

nalcGetProcAddressback to summary
public static long nalcGetProcAddress(long deviceHandle, long funcName)

Unsafe version of: GetProcAddress

nalcGetStringback to summary
public static long nalcGetString(long deviceHandle, int token)

Unsafe version of: GetString

nalcIsExtensionPresentback to summary
public static boolean nalcIsExtensionPresent(long deviceHandle, long extName)

Unsafe version of: IsExtensionPresent

nalcOpenDeviceback to summary
public static long nalcOpenDevice(long deviceSpecifier)

Unsafe version of: OpenDevice