Class SOFTBufferSamples
- java.lang.Object
-
- org.lwjgl.openal.SOFTBufferSamples
-
public class SOFTBufferSamples extends java.lang.ObjectNative 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 voidalBufferSamplesSOFT(int buffer, int samplerate, int internalformat, int samples, int channels, int type, double[] data)Array version of:BufferSamplesSOFTstatic voidalBufferSamplesSOFT(int buffer, int samplerate, int internalformat, int samples, int channels, int type, float[] data)Array version of:BufferSamplesSOFTstatic voidalBufferSamplesSOFT(int buffer, int samplerate, int internalformat, int samples, int channels, int type, int[] data)Array version of:BufferSamplesSOFTstatic voidalBufferSamplesSOFT(int buffer, int samplerate, int internalformat, int samples, int channels, int type, short[] data)Array version of:BufferSamplesSOFTstatic voidalBufferSamplesSOFT(int buffer, int samplerate, int internalformat, int samples, int channels, int type, java.nio.ByteBuffer data)static voidalBufferSamplesSOFT(int buffer, int samplerate, int internalformat, int samples, int channels, int type, java.nio.DoubleBuffer data)static voidalBufferSamplesSOFT(int buffer, int samplerate, int internalformat, int samples, int channels, int type, java.nio.FloatBuffer data)static voidalBufferSamplesSOFT(int buffer, int samplerate, int internalformat, int samples, int channels, int type, java.nio.IntBuffer data)static voidalBufferSamplesSOFT(int buffer, int samplerate, int internalformat, int samples, int channels, int type, java.nio.ShortBuffer data)static voidalBufferSubSamplesSOFT(int buffer, int offset, int samples, int channels, int type, double[] data)Array version of:BufferSubSamplesSOFTstatic voidalBufferSubSamplesSOFT(int buffer, int offset, int samples, int channels, int type, float[] data)Array version of:BufferSubSamplesSOFTstatic voidalBufferSubSamplesSOFT(int buffer, int offset, int samples, int channels, int type, int[] data)Array version of:BufferSubSamplesSOFTstatic voidalBufferSubSamplesSOFT(int buffer, int offset, int samples, int channels, int type, short[] data)Array version of:BufferSubSamplesSOFTstatic voidalBufferSubSamplesSOFT(int buffer, int offset, int samples, int channels, int type, java.nio.ByteBuffer data)static voidalBufferSubSamplesSOFT(int buffer, int offset, int samples, int channels, int type, java.nio.DoubleBuffer data)static voidalBufferSubSamplesSOFT(int buffer, int offset, int samples, int channels, int type, java.nio.FloatBuffer data)static voidalBufferSubSamplesSOFT(int buffer, int offset, int samples, int channels, int type, java.nio.IntBuffer data)static voidalBufferSubSamplesSOFT(int buffer, int offset, int samples, int channels, int type, java.nio.ShortBuffer data)static voidalGetBufferSamplesSOFT(int buffer, int offset, int samples, int channels, int type, double[] data)Array version of:GetBufferSamplesSOFTstatic voidalGetBufferSamplesSOFT(int buffer, int offset, int samples, int channels, int type, float[] data)Array version of:GetBufferSamplesSOFTstatic voidalGetBufferSamplesSOFT(int buffer, int offset, int samples, int channels, int type, int[] data)Array version of:GetBufferSamplesSOFTstatic voidalGetBufferSamplesSOFT(int buffer, int offset, int samples, int channels, int type, short[] data)Array version of:GetBufferSamplesSOFTstatic voidalGetBufferSamplesSOFT(int buffer, int offset, int samples, int channels, int type, java.nio.ByteBuffer data)static voidalGetBufferSamplesSOFT(int buffer, int offset, int samples, int channels, int type, java.nio.DoubleBuffer data)static voidalGetBufferSamplesSOFT(int buffer, int offset, int samples, int channels, int type, java.nio.FloatBuffer data)static voidalGetBufferSamplesSOFT(int buffer, int offset, int samples, int channels, int type, java.nio.IntBuffer data)static voidalGetBufferSamplesSOFT(int buffer, int offset, int samples, int channels, int type, java.nio.ShortBuffer data)static booleanalIsBufferFormatSupportedSOFT(int format)static voidnalBufferSamplesSOFT(int buffer, int samplerate, int internalformat, int samples, int channels, int type, long data)Unsafe version of:BufferSamplesSOFTstatic voidnalBufferSubSamplesSOFT(int buffer, int offset, int samples, int channels, int type, long data)Unsafe version of:BufferSubSamplesSOFTstatic voidnalGetBufferSamplesSOFT(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 theinternalformatparameter 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 thechannelsparameter 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 thetypeparameter ofBufferSamplesSOFT,BufferSubSamplesSOFT, andGetBufferSamplesSOFT.
-
AL_BYTE_RW_OFFSETS_SOFT, AL_SAMPLE_RW_OFFSETS_SOFT
Accepted by theparamNameparameter ofGetSourceivandGetSourcefv(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_SOFTSTEREO_SOFTQUAD_SOFTREAR_SOFT5POINT1_SOFT6POINT1_SOFT7POINT1_SOFTtype- one of:BYTE_SOFTUNSIGNED_BYTE_SOFTSHORT_SOFTUNSIGNED_SHORT_SOFTINT_SOFTUNSIGNED_INT_SOFTFLOAT_SOFTDOUBLE_SOFTBYTE3_SOFTUNSIGNED_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
-
-