Top Description Fields Constructors Methods
org.lwjgl.openal

public Class SOFTCallbackBuffer

extends Object
Class Inheritance
Imports
org.lwjgl.*, org.lwjgl.system.*

Native bindings to the SOFT_callback_buffer extension.

This extension provides a mechanism for applications to provide sample data to the audio device in real-time.

Standard OpenAL sources can read samples from a pre-loaded static buffer, or from a queue of prepared buffers that can be fed in over time. In both cases, an application needs to prepare all or some of the audio samples ahead of time to ensure proper continuous playback. A callback mechanism allows applications to generate audio as needed, without having to prepare samples ahead of time, and to implement their own streaming interface instead of having to fill, queue, and manage multiple OpenAL buffers per stream.

Field Summary

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

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public static void
alBufferCallbackSOFT(int buffer, int
the sample format that will be expected from the callback
format
,
int
the base sample rate the samples will play at
freq
,
SOFTCallbackBufferTypeI callback, long
stored with the callback pointer. Any data it references is not copied
userptr
)

Instead of storing sample data, a buffer may be given a callback function which will be invoked when the source it's attached to needs more samples to mix.

public static void
alGetBuffer3PtrSOFT(int buffer, int param, PointerBuffer ptr0, PointerBuffer ptr1, PointerBuffer ptr2)

public static void
alGetBufferPtrSOFT(int buffer, int param, PointerBuffer ptr)

public static long
alGetBufferPtrSOFT(int buffer, int param)

public static void
alGetBufferPtrvSOFT(int buffer, int param, PointerBuffer ptr)

public static void
nalBufferCallbackSOFT(int buffer, int format, int freq, long callback, long userptr)

Unsafe version of: BufferCallbackSOFT

public static void
nalGetBuffer3PtrSOFT(int buffer, int param, long ptr0, long ptr1, long ptr2)

public static void
nalGetBufferPtrSOFT(int buffer, int param, long ptr)

public static void
nalGetBufferPtrvSOFT(int buffer, int param, long ptr)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

AL_BUFFER_CALLBACK_FUNCTION_SOFTback to summary
public static final int AL_BUFFER_CALLBACK_FUNCTION_SOFT

Accepted as the param parameter of GetBufferPtrSOFT and GetBufferPtrvSOFT.

AL_BUFFER_CALLBACK_USER_PARAM_SOFTback to summary
public static final int AL_BUFFER_CALLBACK_USER_PARAM_SOFT

Accepted as the param parameter of GetBufferPtrSOFT and GetBufferPtrvSOFT.

Constructor Detail

SOFTCallbackBufferback to summary
protected SOFTCallbackBuffer()

Method Detail

alBufferCallbackSOFTback to summary
public static void alBufferCallbackSOFT(int buffer, int format, int freq, SOFTCallbackBufferTypeI callback, long userptr)

Instead of storing sample data, a buffer may be given a callback function which will be invoked when the source it's attached to needs more samples to mix. To specify a callback for a buffer, use alBufferCallbackSOFT.

After a successful call, any sample data that was stored in the buffer is removed.

A buffer with a callback cannot be queued onto a streaming source, and it can only be set on one static source at a time. Attempting to queue such a buffer on a source, or attempting to set it on a source while it's already on one, will generate an INVALID_OPERATION error.

A subsequent successful call to BufferData will remove the callback from the buffer, and make it a normal non-callback buffer.

Parameters
format:int

the sample format that will be expected from the callback

freq:int

the base sample rate the samples will play at

userptr:long

stored with the callback pointer. Any data it references is not copied

Annotations
@NativeType:ALvoid
alGetBuffer3PtrSOFTback to summary
public static void alGetBuffer3PtrSOFT(int buffer, int param, PointerBuffer ptr0, PointerBuffer ptr1, PointerBuffer ptr2)
Annotations
@NativeType:ALvoid
alGetBufferPtrSOFTback to summary
public static void alGetBufferPtrSOFT(int buffer, int param, PointerBuffer ptr)
Annotations
@NativeType:ALvoid
alGetBufferPtrSOFTback to summary
public static long alGetBufferPtrSOFT(int buffer, int param)
Annotations
@NativeType:ALvoid
alGetBufferPtrvSOFTback to summary
public static void alGetBufferPtrvSOFT(int buffer, int param, PointerBuffer ptr)
Annotations
@NativeType:ALvoid
nalBufferCallbackSOFTback to summary
public static void nalBufferCallbackSOFT(int buffer, int format, int freq, long callback, long userptr)

Unsafe version of: BufferCallbackSOFT

nalGetBuffer3PtrSOFTback to summary
public static void nalGetBuffer3PtrSOFT(int buffer, int param, long ptr0, long ptr1, long ptr2)
nalGetBufferPtrSOFTback to summary
public static void nalGetBufferPtrSOFT(int buffer, int param, long ptr)
nalGetBufferPtrvSOFTback to summary
public static void nalGetBufferPtrvSOFT(int buffer, int param, long ptr)