AL_BITS, AL_BUFFER, AL_BUFFERS_PROCESSED, AL_BUFFERS_QUEUED, AL_BYTE_OFFSET, AL_CHANNELS, AL_CONE_INNER_ANGLE, AL_CONE_OUTER_ANGLE, AL_CONE_OUTER_GAIN, AL_DIRECTION, AL_DISTANCE_MODEL, AL_DOPPLER_FACTOR, AL_DOPPLER_VELOCITY, AL_EXPONENT_DISTANCE, AL_EXPONENT_DISTANCE_CLAMPED, AL_EXTENSIONS, AL_FALSE, AL_FORMAT_MONO16, AL_FORMAT_MONO8, AL_FORMAT_STEREO16, AL_FORMAT_STEREO8, AL_FREQUENCY, AL_GAIN, AL_INITIAL, AL_INVALID_ENUM, AL_INVALID_NAME, AL_INVALID_OPERATION, AL_INVALID_VALUE, AL_INVERSE_DISTANCE, AL_INVERSE_DISTANCE_CLAMPED, AL_LINEAR_DISTANCE, AL_LINEAR_DISTANCE_CLAMPED, AL_LOOPING, AL_MAX_DISTANCE, AL_MAX_GAIN, AL_MIN_GAIN, AL_NO_ERROR, AL_NONE, AL_ORIENTATION, AL_OUT_OF_MEMORY, AL_PAUSED, AL_PENDING, AL_PITCH, AL_PLAYING, AL_POSITION, AL_PROCESSED, AL_REFERENCE_DISTANCE, AL_RENDERER, AL_ROLLOFF_FACTOR, AL_SAMPLE_OFFSET, AL_SEC_OFFSET, AL_SIZE, AL_SOURCE_RELATIVE, AL_SOURCE_STATE, AL_SOURCE_TYPE, AL_SPEED_OF_SOUND, AL_STATIC, AL_STOPPED, AL_STREAMING, AL_TRUE, AL_UNDETERMINED, AL_UNUSED, AL_VELOCITY, AL_VENDOR, AL_VERSION
Constructor and Description |
---|
LwjglAL() |
Modifier and Type | Method and Description |
---|---|
void |
alBufferData(int buffer,
int format,
java.nio.ByteBuffer data,
int size,
int frequency)
Sets the sample data of the specified buffer.
|
void |
alDeleteBuffers(int numBuffers,
java.nio.IntBuffer buffers)
Requests the deletion of a number of buffers.
|
void |
alDeleteSources(int numSources,
java.nio.IntBuffer sources)
Requests the deletion of a number of sources.
|
void |
alGenBuffers(int numBuffers,
java.nio.IntBuffer buffers)
Requests a number of buffer names.
|
int |
alGenSources()
Requests a number of source names.
|
int |
alGetError()
Obtains error information.
|
int |
alGetSourcei(int source,
int param)
Returns the integer value of the specified source parameter.
|
java.lang.String |
alGetString(int parameter) |
void |
alListener(int param,
java.nio.FloatBuffer data)
Pointer version of
Listenerf . |
void |
alListener3f(int param,
float value1,
float value2,
float value3)
Sets the 3 dimensional float values of a listener parameter.
|
void |
alListenerf(int param,
float value)
Sets the float value of a listener parameter.
|
void |
alSource3f(int source,
int param,
float value1,
float value2,
float value3)
Sets the 3 dimensional values of a source parameter.
|
void |
alSource3i(int source,
int param,
int value1,
int value2,
int value3)
Sets the 3 dimensional integer values of a source parameter.
|
void |
alSourcef(int source,
int param,
float value)
Sets the float value of a source parameter.
|
void |
alSourcei(int source,
int param,
int value)
Integer version of
Sourcef . |
void |
alSourcePause(int source)
Sets the source state to AL_PAUSED.
|
void |
alSourcePlay(int source)
Sets the source state to AL_PLAYING.
|
void |
alSourceQueueBuffers(int source,
int numBuffers,
java.nio.IntBuffer buffers)
Queues up one or multiple buffer names to the specified source.
|
void |
alSourceStop(int source)
Sets the source state to AL_STOPPED.
|
void |
alSourceUnqueueBuffers(int source,
int numBuffers,
java.nio.IntBuffer buffers)
Removes a number of buffer entries that have finished processing, in the order of appearance, from the queue of the specified source.
|
public java.lang.String alGetString(int parameter)
alGetString
in interface AL
public int alGenSources()
AL
alGenSources
in interface AL
public int alGetError()
AL
Each detectable error is assigned a numeric code. When an error is detected by AL, a flag is set and the error code is recorded. Further errors, if they occur, do not affect this recorded code. When alGetError is called, the code is returned and the flag is cleared, so that a further error will again record its code. If a call to alGetError returns AL_NO_ERROR then there has been no detectable error since the last call to alGetError (or since the AL was initialized).
Error codes can be mapped to strings. The alGetString function returns a pointer to a constant (literal) string that is identical to the identifier used for the enumeration value, as defined in the specification.
alGetError
in interface AL
public void alDeleteSources(int numSources, java.nio.IntBuffer sources)
AL
alDeleteSources
in interface AL
numSources
- the number of sources.sources
- the sources to delete.public void alGenBuffers(int numBuffers, java.nio.IntBuffer buffers)
AL
alGenBuffers
in interface AL
numBuffers
- the number of buffers.buffers
- the buffer that will receive the buffer names.public void alDeleteBuffers(int numBuffers, java.nio.IntBuffer buffers)
AL
alDeleteBuffers
in interface AL
numBuffers
- the number of buffers.buffers
- the buffers to delete.public void alSourceStop(int source)
AL
alSourceStop applied to an AL_INITIAL source is a legal NOP. alSourceStop applied to a AL_PLAYING source will change its state to AL_STOPPED. The source is exempt from processing, its current state is preserved. alSourceStop applied to a AL_PAUSED source will change its state to AL_STOPPED, with the same consequences as on a AL_PLAYING source. alSourceStop applied to a AL_STOPPED source is a legal NOP.
alSourceStop
in interface AL
source
- the source to stop.public void alSourcei(int source, int param, int value)
AL
Sourcef
.public void alBufferData(int buffer, int format, java.nio.ByteBuffer data, int size, int frequency)
AL
The data specified is copied to an internal software, or if possible, hardware buffer. The implementation is free to apply decompression, conversion, resampling, and filtering as needed.
8-bit data is expressed as an unsigned value over the range 0 to 255, 128 being an audio output level of zero.
16-bit data is expressed as a signed value over the range -32768 to 32767, 0 being an audio output level of zero. Byte order for 16-bit values is determined by the native format of the CPU.
Stereo data is expressed in an interleaved format, left channel sample followed by the right channel sample.
Buffers containing audio data with more than one channel will be played without 3D spatialization features – these formats are normally used for background music.
alBufferData
in interface AL
buffer
- the buffer to modify.format
- the data format. One of:
FORMAT_MONO8
FORMAT_MONO16
FORMAT_STEREO8
FORMAT_STEREO16
data
- the sample data.size
- the length of the data (in bytes, ≥0)frequency
- the data frequency.public void alSourcePlay(int source)
AL
alSourcePlay applied to an AL_INITIAL source will promote the source to AL_PLAYING, thus the data found in the buffer will be fed into the processing, starting at the beginning. alSourcePlay applied to a AL_PLAYING source will restart the source from the beginning. It will not affect the configuration, and will leave the source in AL_PLAYING state, but reset the sampling offset to the beginning. alSourcePlay applied to a AL_PAUSED source will resume processing using the source state as preserved at the alSourcePause operation. alSourcePlay applied to a AL_STOPPED source will propagate it to AL_INITIAL then to AL_PLAYING immediately.
alSourcePlay
in interface AL
source
- the source to play.public void alSourcePause(int source)
AL
alSourcePause applied to an AL_INITIAL source is a legal NOP. alSourcePause applied to a AL_PLAYING source will change its state to AL_PAUSED. The source is exempt from processing, its current state is preserved. alSourcePause applied to a AL_PAUSED source is a legal NOP. alSourcePause applied to a AL_STOPPED source is a legal NOP.
alSourcePause
in interface AL
source
- the source to pause.public void alSourcef(int source, int param, float value)
AL
alSourcef
in interface AL
source
- the source to modify.param
- the parameter to modify. One of:
CONE_INNER_ANGLE
CONE_OUTER_ANGLE
PITCH
DIRECTION
LOOPING
BUFFER
SOURCE_STATE
CONE_OUTER_GAIN
SOURCE_TYPE
POSITION
VELOCITY
GAIN
REFERENCE_DISTANCE
ROLLOFF_FACTOR
MAX_DISTANCE
value
- the parameter value.public void alSource3f(int source, int param, float value1, float value2, float value3)
AL
alSource3f
in interface AL
source
- the source to modify.param
- the parameter to modify. One of:
CONE_INNER_ANGLE
CONE_OUTER_ANGLE
PITCH
DIRECTION
LOOPING
BUFFER
SOURCE_STATE
CONE_OUTER_GAIN
SOURCE_TYPE
POSITION
VELOCITY
GAIN
REFERENCE_DISTANCE
ROLLOFF_FACTOR
MAX_DISTANCE
value1
- the first parameter value.value2
- the second parameter value.value3
- the third parameter value.public int alGetSourcei(int source, int param)
AL
alGetSourcei
in interface AL
source
- the source to query.param
- the parameter to query. One of:
CONE_INNER_ANGLE
CONE_OUTER_ANGLE
PITCH
DIRECTION
LOOPING
BUFFER
SOURCE_STATE
CONE_OUTER_GAIN
SOURCE_TYPE
POSITION
VELOCITY
GAIN
REFERENCE_DISTANCE
ROLLOFF_FACTOR
MAX_DISTANCE
public void alSourceUnqueueBuffers(int source, int numBuffers, java.nio.IntBuffer buffers)
AL
Once a queue entry for a buffer has been appended to a queue and is pending processing, it should not be changed. Removal of a given queue entry is not possible unless either the source is stopped (in which case then entire queue is considered processed), or if the queue entry has already been processed (AL_PLAYING or AL_PAUSED source). A playing source will enter the AL_STOPPED state if it completes playback of the last buffer in its queue (the same behavior as when a single buffer has been attached to a source and has finished playback).
alSourceUnqueueBuffers
in interface AL
source
- the target sourcenumBuffers
- the names count.buffers
- the buffer namespublic void alSourceQueueBuffers(int source, int numBuffers, java.nio.IntBuffer buffers)
AL
The buffers will be queued in the sequence in which they appear in the array. This command is legal on a source in any playback state (to allow for
streaming, queuing has to be possible on a AL_PLAYING source). All buffers in a queue must have the same format and attributes, with the exception of
the NULL
buffer (i.e., 0) which can always be queued.
alSourceQueueBuffers
in interface AL
source
- the target source.numBuffers
- the names count.buffers
- the buffer names.public void alListener(int param, java.nio.FloatBuffer data)
AL
Listenerf
.alListener
in interface AL
param
- the parameter to modify.data
- the parameter values.public void alListenerf(int param, float value)
AL
alListenerf
in interface AL
param
- the parameter to modify. One of:
ORIENTATION
POSITION
VELOCITY
GAIN
value
- the parameter value.public void alListener3f(int param, float value1, float value2, float value3)
AL
alListener3f
in interface AL
param
- the parameter to modify. One of:
ORIENTATION
POSITION
VELOCITY
GAIN
value1
- the first value.value2
- the second value.value3
- the third value.public void alSource3i(int source, int param, int value1, int value2, int value3)
AL
alSource3i
in interface AL
source
- the source to modify.param
- the parameter to modify.value1
- the first value.value2
- the second value.value3
- the third value.