Top Description Fields Constructors Methods
org.lwjgl.openal

public final Class ALC11

extends Object
Class Inheritance
Imports
java.nio.ByteBuffer, .IntBuffer, org.lwjgl.BufferUtils, .LWJGLException, .LWJGLUtil, .MemoryUtil

The ALC11 class implements features in OpenAL 1.1, specifically ALC methods and properties.

Author
Brian Matzon
Version
$Revision: 2286 $ $Id: ALC.java 2286 2006-03-23 19:32:21 +0000 (to, 23 mar 2006) matzon $
See Also
ALC10

Field Summary

Modifier and TypeField and Description
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static boolean

Returns:

true if device was successfully closed
alcCaptureCloseDevice
(ALCdevice device)

The alcCaptureCloseDevice function allows the application to disconnect from a capture device.

public static ALCdevice

Returns:

ALCdevice if it was possible to open a device
alcCaptureOpenDevice
(String
Name of device to open for capture
devicename
,
int
Frequency of samples to capture
frequency
,
int
Format of samples to capture
format
,
int
Size of buffer to capture to
buffersize
)

The alcCaptureOpenDevice function allows the application to connect to a capture device.

public static void
alcCaptureSamples(ALCdevice device, ByteBuffer
Buffer to store samples in
buffer
,
int
Number of samples to request
samples
)

When the application feels there are enough samples available to process, it can obtain them from the AL via the alcCaptureSamples entry point.

public static void
alcCaptureStart(ALCdevice device)

Once a capture device has been opened via alcCaptureOpenDevice, it is made to start recording audio via the alcCaptureStart entry point: Once started, the device will record audio to an internal ring buffer, the size of which was specified when opening the device.

public static void
alcCaptureStop(ALCdevice device)

If the application doesn't need to capture more audio for an amount of time, they can halt the device without closing it via the alcCaptureStop entry point.

pack-priv static boolean

Returns:

true if initialization was successfull
initialize
()

Initializes ALC11, including any extensions

pack-priv static native void
pack-priv static native boolean
private static native long
nalcCaptureOpenDevice(long devicename, int frequency, int format, int buffersize)

pack-priv static native void
nalcCaptureSamples(long device, long buffer, int samples)

pack-priv static native void
nalcCaptureStart(long device)

pack-priv static native void
nalcCaptureStop(long device)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

ALC_ALL_DEVICES_SPECIFIERback to summary
public static final int ALC_ALL_DEVICES_SPECIFIER
ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIERback to summary
public static final int ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER
ALC_CAPTURE_DEVICE_SPECIFIERback to summary
public static final int ALC_CAPTURE_DEVICE_SPECIFIER
ALC_CAPTURE_SAMPLESback to summary
public static final int ALC_CAPTURE_SAMPLES
ALC_DEFAULT_ALL_DEVICES_SPECIFIERback to summary
public static final int ALC_DEFAULT_ALL_DEVICES_SPECIFIER
ALC_MONO_SOURCESback to summary
public static final int ALC_MONO_SOURCES
ALC_STEREO_SOURCESback to summary
public static final int ALC_STEREO_SOURCES

Constructor Detail

ALC11back to summary
public ALC11()

Method Detail

alcCaptureCloseDeviceback to summary
public static boolean alcCaptureCloseDevice(ALCdevice device)

The alcCaptureCloseDevice function allows the application to disconnect from a capture device. The return code will be true or false, indicating success or failure. If the device is null or invalid, an ALC_INVALID_DEVICE error will be generated. Once closed, a capture device is invalid.

Returns:boolean

true if device was successfully closed

alcCaptureOpenDeviceback to summary
public static ALCdevice alcCaptureOpenDevice(String devicename, int frequency, int format, int buffersize)

The alcCaptureOpenDevice function allows the application to connect to a capture device. To obtain a list of all available capture devices, use getCaptureDevices a list of all capture devices will be returned. Retrieving ALC_CAPTURE_DEVICE_SPECIFIER with a valid capture device specified will result in the name of that device being returned as a single string. If the function returns null, then no sound driver/device has been found, or the requested format could not be fulfilled. The "deviceName" argument is a string that requests a certain device or device configuration. If null is specified, the implementation will provide an implementation specific default. The "frequency" and "format" arguments specify the format that audio data will be presented to the application, and match the values that can be passed to alBufferData. The implementation is expected to convert and resample to this format on behalf of the application. The "buffersize" argument specifies the number of sample frames to buffer in the AL, for example, requesting a format of AL_FORMAT_STEREO16 and a buffer size of 1024 would require the AL to store up to 1024 * 4 bytes of audio data. Note that the implementation may use a larger buffer than requested if it needs to, but the implementation will set up a buffer of at least the requested size. Specifying a compressed or extension-supplied format may result in failure, even if the extension is supplied for rendering. LWJGL SPECIFIC: the actual created device is managed internally in lwjgl

Parameters
devicename:String

Name of device to open for capture

frequency:int

Frequency of samples to capture

format:int

Format of samples to capture

buffersize:int

Size of buffer to capture to

Returns:ALCdevice

ALCdevice if it was possible to open a device

alcCaptureSamplesback to summary
public static void alcCaptureSamples(ALCdevice device, ByteBuffer buffer, int samples)

When the application feels there are enough samples available to process, it can obtain them from the AL via the alcCaptureSamples entry point. The "buffer" argument specifies an application-allocated buffer that can contain at least "samples" sample frames. The implementation may defer conversion and resampling until this point. Requesting more sample frames than are currently available is an error.

Parameters
buffer:ByteBuffer

Buffer to store samples in

samples:int

Number of samples to request

alcCaptureStartback to summary
public static void alcCaptureStart(ALCdevice device)

Once a capture device has been opened via alcCaptureOpenDevice, it is made to start recording audio via the alcCaptureStart entry point: Once started, the device will record audio to an internal ring buffer, the size of which was specified when opening the device. The application may query the capture device to discover how much data is currently available via the alcGetInteger with the ALC_CAPTURE_SAMPLES token. This will report the number of sample frames currently available.

alcCaptureStopback to summary
public static void alcCaptureStop(ALCdevice device)

If the application doesn't need to capture more audio for an amount of time, they can halt the device without closing it via the alcCaptureStop entry point. The implementation is encouraged to optimize for this case. The amount of audio samples available after restarting a stopped capture device is reset to zero. The application does not need to stop the capture device to read from it.

initializeback to summary
pack-priv static boolean initialize()

Initializes ALC11, including any extensions

Returns:boolean

true if initialization was successfull

initNativeStubsback to summary
pack-priv static native void initNativeStubs() throws LWJGLException
nalcCaptureCloseDeviceback to summary
pack-priv static native boolean nalcCaptureCloseDevice(long device)
nalcCaptureOpenDeviceback to summary
private static native long nalcCaptureOpenDevice(long devicename, int frequency, int format, int buffersize)
nalcCaptureSamplesback to summary
pack-priv static native void nalcCaptureSamples(long device, long buffer, int samples)
nalcCaptureStartback to summary
pack-priv static native void nalcCaptureStart(long device)
nalcCaptureStopback to summary
pack-priv static native void nalcCaptureStop(long device)