Class SOFTCallbackBuffer
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
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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.static void
alGetBuffer3PtrSOFT
(int buffer, int param, org.lwjgl.PointerBuffer ptr0, org.lwjgl.PointerBuffer ptr1, org.lwjgl.PointerBuffer ptr2) static long
alGetBufferPtrSOFT
(int buffer, int param) static void
alGetBufferPtrSOFT
(int buffer, int param, org.lwjgl.PointerBuffer ptr) static void
alGetBufferPtrvSOFT
(int buffer, int param, org.lwjgl.PointerBuffer ptr) static void
nalBufferCallbackSOFT
(int buffer, int format, int freq, long callback, long userptr) Unsafe version of:BufferCallbackSOFT
static void
nalGetBuffer3PtrSOFT
(int buffer, int param, long ptr0, long ptr1, long ptr2) static void
nalGetBufferPtrSOFT
(int buffer, int param, long ptr) static void
nalGetBufferPtrvSOFT
(int buffer, int param, long ptr)
-
Field Details
-
AL_BUFFER_CALLBACK_FUNCTION_SOFT
public static final int AL_BUFFER_CALLBACK_FUNCTION_SOFT- See Also:
-
AL_BUFFER_CALLBACK_USER_PARAM_SOFT
public static final int AL_BUFFER_CALLBACK_USER_PARAM_SOFT- See Also:
-
-
Method Details
-
nalBufferCallbackSOFT
public static void nalBufferCallbackSOFT(int buffer, int format, int freq, long callback, long userptr) Unsafe version of:BufferCallbackSOFT
-
alBufferCallbackSOFT
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, usealBufferCallbackSOFT
.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
- the sample format that will be expected from the callbackfreq
- the base sample rate the samples will play atuserptr
- stored with thecallback
pointer. Any data it references is not copied
-
nalGetBufferPtrSOFT
public static void nalGetBufferPtrSOFT(int buffer, int param, long ptr) -
alGetBufferPtrSOFT
public static void alGetBufferPtrSOFT(int buffer, int param, org.lwjgl.PointerBuffer ptr) -
alGetBufferPtrSOFT
public static long alGetBufferPtrSOFT(int buffer, int param) -
nalGetBuffer3PtrSOFT
public static void nalGetBuffer3PtrSOFT(int buffer, int param, long ptr0, long ptr1, long ptr2) -
alGetBuffer3PtrSOFT
public static void alGetBuffer3PtrSOFT(int buffer, int param, org.lwjgl.PointerBuffer ptr0, org.lwjgl.PointerBuffer ptr1, org.lwjgl.PointerBuffer ptr2) -
nalGetBufferPtrvSOFT
public static void nalGetBufferPtrvSOFT(int buffer, int param, long ptr) -
alGetBufferPtrvSOFT
public static void alGetBufferPtrvSOFT(int buffer, int param, org.lwjgl.PointerBuffer ptr)
-