Class SOFTBufferSamples
- java.lang.Object
-
- org.lwjgl.openal.SOFTBufferSamples
-
public class SOFTBufferSamples extends java.lang.Object
Native bindings to the SOFT_buffer_samples extension.This extension provides a more flexible mechanism for loading buffer data, as well as a method to retrieve buffer data. Unextended OpenAL only provides a method to specify a single buffer format when loading data, which defines the data given by the application. The AL is given leeway in converting the data, so that it is possible or more efficient to use internally. However, there are some drawbacks to this approach:
- The conversion done by the implementation is hidden from the app. This makes it difficult for the app to know what kind of precision it will have, and impossible to request a storage precision.
- Conversion is not guaranteed, so the application can be restricted in the formats that can be loaded depending on the implementation.
If the application could specify the internal storage format, as well as use a separate format to specify the incoming data's format, it would allow to add more input formats (signed 8-bit, 32-bit int, and float, for example), with no undue burden placed on the implementation beyond needing some conversion routines. The application can then be assured that many different formats can be loaded, even if storage is restricted to a comparatively small subset.
In addition, unextended OpenAL does not have any methods for updating only a portion of a buffer, nor a method to retrieve the data from a buffer.
-
-
Field Summary
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
alBufferSamplesSOFT(int buffer, int samplerate, int internalformat, int samples, int channels, int type, double[] data)
Array version of:BufferSamplesSOFT
static void
alBufferSamplesSOFT(int buffer, int samplerate, int internalformat, int samples, int channels, int type, float[] data)
Array version of:BufferSamplesSOFT
static void
alBufferSamplesSOFT(int buffer, int samplerate, int internalformat, int samples, int channels, int type, int[] data)
Array version of:BufferSamplesSOFT
static void
alBufferSamplesSOFT(int buffer, int samplerate, int internalformat, int samples, int channels, int type, short[] data)
Array version of:BufferSamplesSOFT
static void
alBufferSamplesSOFT(int buffer, int samplerate, int internalformat, int samples, int channels, int type, java.nio.ByteBuffer data)
static void
alBufferSamplesSOFT(int buffer, int samplerate, int internalformat, int samples, int channels, int type, java.nio.DoubleBuffer data)
static void
alBufferSamplesSOFT(int buffer, int samplerate, int internalformat, int samples, int channels, int type, java.nio.FloatBuffer data)
static void
alBufferSamplesSOFT(int buffer, int samplerate, int internalformat, int samples, int channels, int type, java.nio.IntBuffer data)
static void
alBufferSamplesSOFT(int buffer, int samplerate, int internalformat, int samples, int channels, int type, java.nio.ShortBuffer data)
static void
alBufferSubSamplesSOFT(int buffer, int offset, int samples, int channels, int type, double[] data)
Array version of:BufferSubSamplesSOFT
static void
alBufferSubSamplesSOFT(int buffer, int offset, int samples, int channels, int type, float[] data)
Array version of:BufferSubSamplesSOFT
static void
alBufferSubSamplesSOFT(int buffer, int offset, int samples, int channels, int type, int[] data)
Array version of:BufferSubSamplesSOFT
static void
alBufferSubSamplesSOFT(int buffer, int offset, int samples, int channels, int type, short[] data)
Array version of:BufferSubSamplesSOFT
static void
alBufferSubSamplesSOFT(int buffer, int offset, int samples, int channels, int type, java.nio.ByteBuffer data)
static void
alBufferSubSamplesSOFT(int buffer, int offset, int samples, int channels, int type, java.nio.DoubleBuffer data)
static void
alBufferSubSamplesSOFT(int buffer, int offset, int samples, int channels, int type, java.nio.FloatBuffer data)
static void
alBufferSubSamplesSOFT(int buffer, int offset, int samples, int channels, int type, java.nio.IntBuffer data)
static void
alBufferSubSamplesSOFT(int buffer, int offset, int samples, int channels, int type, java.nio.ShortBuffer data)
static void
alGetBufferSamplesSOFT(int buffer, int offset, int samples, int channels, int type, double[] data)
Array version of:GetBufferSamplesSOFT
static void
alGetBufferSamplesSOFT(int buffer, int offset, int samples, int channels, int type, float[] data)
Array version of:GetBufferSamplesSOFT
static void
alGetBufferSamplesSOFT(int buffer, int offset, int samples, int channels, int type, int[] data)
Array version of:GetBufferSamplesSOFT
static void
alGetBufferSamplesSOFT(int buffer, int offset, int samples, int channels, int type, short[] data)
Array version of:GetBufferSamplesSOFT
static void
alGetBufferSamplesSOFT(int buffer, int offset, int samples, int channels, int type, java.nio.ByteBuffer data)
static void
alGetBufferSamplesSOFT(int buffer, int offset, int samples, int channels, int type, java.nio.DoubleBuffer data)
static void
alGetBufferSamplesSOFT(int buffer, int offset, int samples, int channels, int type, java.nio.FloatBuffer data)
static void
alGetBufferSamplesSOFT(int buffer, int offset, int samples, int channels, int type, java.nio.IntBuffer data)
static void
alGetBufferSamplesSOFT(int buffer, int offset, int samples, int channels, int type, java.nio.ShortBuffer data)
static boolean
alIsBufferFormatSupportedSOFT(int format)
static void
nalBufferSamplesSOFT(int buffer, int samplerate, int internalformat, int samples, int channels, int type, long data)
Unsafe version of:BufferSamplesSOFT
static void
nalBufferSubSamplesSOFT(int buffer, int offset, int samples, int channels, int type, long data)
Unsafe version of:BufferSubSamplesSOFT
static void
nalGetBufferSamplesSOFT(int buffer, int offset, int samples, int channels, int type, long data)
Unsafe version of:GetBufferSamplesSOFT
-
-
-
Field Detail
-
AL_MONO8_SOFT, AL_MONO16_SOFT, AL_MONO32F_SOFT, AL_STEREO8_SOFT, AL_STEREO16_SOFT, AL_STEREO32F_SOFT, AL_QUAD8_SOFT, AL_QUAD16_SOFT, AL_QUAD32F_SOFT, AL_REAR8_SOFT, AL_REAR16_SOFT, AL_REAR32F_SOFT, AL_5POINT1_8_SOFT, AL_5POINT1_16_SOFT, AL_5POINT1_32F_SOFT, AL_6POINT1_8_SOFT, AL_6POINT1_16_SOFT, AL_6POINT1_32F_SOFT, AL_7POINT1_8_SOFT, AL_7POINT1_16_SOFT, AL_7POINT1_32F_SOFT
Accepted by theinternalformat
parameter ofBufferSamplesSOFT
(values are shared with standard OpenAL,EXT_FLOAT32
, andEXT_MCFORMATS
).
-
AL_MONO_SOFT, AL_STEREO_SOFT, AL_QUAD_SOFT, AL_REAR_SOFT, AL_5POINT1_SOFT, AL_6POINT1_SOFT, AL_7POINT1_SOFT
Accepted by thechannels
parameter ofBufferSamplesSOFT
,BufferSubSamplesSOFT
, andGetBufferSamplesSOFT
.
-
AL_BYTE_SOFT, AL_UNSIGNED_BYTE_SOFT, AL_SHORT_SOFT, AL_UNSIGNED_SHORT_SOFT, AL_INT_SOFT, AL_UNSIGNED_INT_SOFT, AL_FLOAT_SOFT, AL_DOUBLE_SOFT, AL_BYTE3_SOFT, AL_UNSIGNED_BYTE3_SOFT
Accepted by thetype
parameter ofBufferSamplesSOFT
,BufferSubSamplesSOFT
, andGetBufferSamplesSOFT
.
-
AL_BYTE_RW_OFFSETS_SOFT, AL_SAMPLE_RW_OFFSETS_SOFT
Accepted by theparamName
parameter ofGetSourceiv
andGetSourcefv
(these are the same as inSOFT_buffer_sub_data
).
-
-
Method Detail
-
nalBufferSamplesSOFT
public static void nalBufferSamplesSOFT(int buffer, int samplerate, int internalformat, int samples, int channels, int type, long data)
Unsafe version of:BufferSamplesSOFT
-
alBufferSamplesSOFT
public static void alBufferSamplesSOFT(int buffer, int samplerate, int internalformat, int samples, int channels, int type, java.nio.ByteBuffer data) public static void alBufferSamplesSOFT(int buffer, int samplerate, int internalformat, int samples, int channels, int type, java.nio.ShortBuffer data) public static void alBufferSamplesSOFT(int buffer, int samplerate, int internalformat, int samples, int channels, int type, java.nio.IntBuffer data) public static void alBufferSamplesSOFT(int buffer, int samplerate, int internalformat, int samples, int channels, int type, java.nio.FloatBuffer data) public static void alBufferSamplesSOFT(int buffer, int samplerate, int internalformat, int samples, int channels, int type, java.nio.DoubleBuffer data)
- Parameters:
internalformat
- one of:channels
- one of:MONO_SOFT
STEREO_SOFT
QUAD_SOFT
REAR_SOFT
5POINT1_SOFT
6POINT1_SOFT
7POINT1_SOFT
type
- one of:BYTE_SOFT
UNSIGNED_BYTE_SOFT
SHORT_SOFT
UNSIGNED_SHORT_SOFT
INT_SOFT
UNSIGNED_INT_SOFT
FLOAT_SOFT
DOUBLE_SOFT
BYTE3_SOFT
UNSIGNED_BYTE3_SOFT
-
nalBufferSubSamplesSOFT
public static void nalBufferSubSamplesSOFT(int buffer, int offset, int samples, int channels, int type, long data)
Unsafe version of:BufferSubSamplesSOFT
-
alBufferSubSamplesSOFT
public static void alBufferSubSamplesSOFT(int buffer, int offset, int samples, int channels, int type, java.nio.ByteBuffer data) public static void alBufferSubSamplesSOFT(int buffer, int offset, int samples, int channels, int type, java.nio.ShortBuffer data) public static void alBufferSubSamplesSOFT(int buffer, int offset, int samples, int channels, int type, java.nio.IntBuffer data) public static void alBufferSubSamplesSOFT(int buffer, int offset, int samples, int channels, int type, java.nio.FloatBuffer data) public static void alBufferSubSamplesSOFT(int buffer, int offset, int samples, int channels, int type, java.nio.DoubleBuffer data)
-
nalGetBufferSamplesSOFT
public static void nalGetBufferSamplesSOFT(int buffer, int offset, int samples, int channels, int type, long data)
Unsafe version of:GetBufferSamplesSOFT
-
alGetBufferSamplesSOFT
public static void alGetBufferSamplesSOFT(int buffer, int offset, int samples, int channels, int type, java.nio.ByteBuffer data) public static void alGetBufferSamplesSOFT(int buffer, int offset, int samples, int channels, int type, java.nio.ShortBuffer data) public static void alGetBufferSamplesSOFT(int buffer, int offset, int samples, int channels, int type, java.nio.IntBuffer data) public static void alGetBufferSamplesSOFT(int buffer, int offset, int samples, int channels, int type, java.nio.FloatBuffer data) public static void alGetBufferSamplesSOFT(int buffer, int offset, int samples, int channels, int type, java.nio.DoubleBuffer data)
-
alIsBufferFormatSupportedSOFT
public static boolean alIsBufferFormatSupportedSOFT(int format)
-
alBufferSamplesSOFT
public static void alBufferSamplesSOFT(int buffer, int samplerate, int internalformat, int samples, int channels, int type, short[] data)
Array version of:BufferSamplesSOFT
-
alBufferSamplesSOFT
public static void alBufferSamplesSOFT(int buffer, int samplerate, int internalformat, int samples, int channels, int type, int[] data) public static void alBufferSamplesSOFT(int buffer, int samplerate, int internalformat, int samples, int channels, int type, float[] data) public static void alBufferSamplesSOFT(int buffer, int samplerate, int internalformat, int samples, int channels, int type, double[] data)
Array version of:BufferSamplesSOFT
-
alBufferSubSamplesSOFT
public static void alBufferSubSamplesSOFT(int buffer, int offset, int samples, int channels, int type, short[] data) public static void alBufferSubSamplesSOFT(int buffer, int offset, int samples, int channels, int type, int[] data) public static void alBufferSubSamplesSOFT(int buffer, int offset, int samples, int channels, int type, float[] data) public static void alBufferSubSamplesSOFT(int buffer, int offset, int samples, int channels, int type, double[] data)
Array version of:BufferSubSamplesSOFT
-
alGetBufferSamplesSOFT
public static void alGetBufferSamplesSOFT(int buffer, int offset, int samples, int channels, int type, short[] data) public static void alGetBufferSamplesSOFT(int buffer, int offset, int samples, int channels, int type, int[] data) public static void alGetBufferSamplesSOFT(int buffer, int offset, int samples, int channels, int type, float[] data) public static void alGetBufferSamplesSOFT(int buffer, int offset, int samples, int channels, int type, double[] data)
Array version of:GetBufferSamplesSOFT
-
-