Modifier and Type | Field and Description |
---|---|
static int |
AL_BITS |
static int |
AL_BUFFER
Indicate the buffer to provide sound samples.
|
static int |
AL_BUFFERS_PROCESSED |
static int |
AL_BUFFERS_QUEUED
Buffer Queue params
|
static int |
AL_BYTE_OFFSET |
static int |
AL_CHANNELS |
static int |
AL_CONE_INNER_ANGLE
Directional source, inner cone angle, in degrees.
|
static int |
AL_CONE_OUTER_ANGLE
Directional source, outer cone angle, in degrees.
|
static int |
AL_CONE_OUTER_GAIN
Directional source, outer cone gain.
|
static int |
AL_DIRECTION
Specify the current direction.
|
static int |
AL_DISTANCE_MODEL
Distance models
used in conjunction with DistanceModel
implicit: NONE, which disables distance attenuation.
|
static int |
AL_DOPPLER_FACTOR
Doppler scale.
|
static int |
AL_DOPPLER_VELOCITY
Tweaks speed of propagation.
|
static int |
AL_EXPONENT_DISTANCE |
static int |
AL_EXPONENT_DISTANCE_CLAMPED |
static int |
AL_EXTENSIONS |
static int |
AL_FALSE
Boolean False.
|
static int |
AL_FORMAT_MONO16 |
static int |
AL_FORMAT_MONO8
Sound samples: format specifier.
|
static int |
AL_FORMAT_STEREO16 |
static int |
AL_FORMAT_STEREO8 |
static int |
AL_FREQUENCY
Sound samples: frequency, in units of Hertz [Hz].
|
static int |
AL_GAIN
Indicate the gain (volume amplification) applied.
|
static int |
AL_INITIAL |
static int |
AL_INVALID_ENUM
Invalid parameter passed to AL call.
|
static int |
AL_INVALID_NAME
Invalid Name parameter passed to AL call.
|
static int |
AL_INVALID_OPERATION
Illegal call.
|
static int |
AL_INVALID_VALUE
Invalid enum parameter value.
|
static int |
AL_INVERSE_DISTANCE |
static int |
AL_INVERSE_DISTANCE_CLAMPED |
static int |
AL_LINEAR_DISTANCE |
static int |
AL_LINEAR_DISTANCE_CLAMPED |
static int |
AL_LOOPING
Indicate whether source is looping.
|
static int |
AL_MAX_DISTANCE
Indicate distance above which sources are not attenuated using the
inverse clamped distance model.
|
static int |
AL_MAX_GAIN
Indicate maximum source attenuation Type: ALfloat Range: [0.0 - 1.0]
Logarithmic
|
static int |
AL_MIN_GAIN
Indicate minimum source attenuation
Type: ALfloat
Range: [0.0 - 1.0]
Logarithmic
|
static int |
AL_NO_ERROR
Errors: No Error.
|
static int |
AL_NONE |
static int |
AL_ORIENTATION
Indicate listener orientation.
|
static int |
AL_OUT_OF_MEMORY
No mojo.
|
static int |
AL_PAUSED |
static int |
AL_PENDING |
static int |
AL_PITCH
Specify the pitch to be applied at source.
|
static int |
AL_PLAYING |
static int |
AL_POSITION
Specify the current location in three dimensional space.
|
static int |
AL_PROCESSED |
static int |
AL_REFERENCE_DISTANCE
source specific reference distance Type: ALfloat Range: 0.0 - +inf
At 0.0, no distance attenuation occurs.
|
static int |
AL_RENDERER |
static int |
AL_ROLLOFF_FACTOR
source specific rolloff factor Type: ALfloat Range: 0.0 - +inf
|
static int |
AL_SAMPLE_OFFSET |
static int |
AL_SEC_OFFSET
Source buffer position information
|
static int |
AL_SIZE |
static int |
AL_SOURCE_RELATIVE
Indicate Source has relative coordinates.
|
static int |
AL_SOURCE_STATE
Source state information.
|
static int |
AL_SOURCE_TYPE
Source type (Static, Streaming or undetermined)
Source is Static if a Buffer has been attached using AL_BUFFER
Source is Streaming if one or more Buffers have been attached using alSourceQueueBuffers
Source is undetermined when it has the NULL buffer attached
|
static int |
AL_SPEED_OF_SOUND
Speed of Sound in units per second
|
static int |
AL_STATIC |
static int |
AL_STOPPED |
static int |
AL_STREAMING |
static int |
AL_TRUE
Boolean True.
|
static int |
AL_UNDETERMINED |
static int |
AL_UNUSED
Buffer state.
|
static int |
AL_VELOCITY
Specify the current velocity in three dimensional space.
|
static int |
AL_VENDOR
Context strings: Vendor Name.
|
static int |
AL_VERSION |
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 apperance, from the queue of the specified source.
|
static final int AL_FALSE
static final int AL_TRUE
static final int AL_NONE
static final int AL_SOURCE_RELATIVE
static final int AL_CONE_INNER_ANGLE
static final int AL_CONE_OUTER_ANGLE
static final int AL_PITCH
static final int AL_POSITION
static final int AL_DIRECTION
static final int AL_VELOCITY
static final int AL_LOOPING
static final int AL_BUFFER
static final int AL_GAIN
static final int AL_MIN_GAIN
static final int AL_MAX_GAIN
static final int AL_ORIENTATION
static final int AL_SOURCE_STATE
static final int AL_INITIAL
static final int AL_PLAYING
static final int AL_PAUSED
static final int AL_STOPPED
static final int AL_BUFFERS_QUEUED
static final int AL_BUFFERS_PROCESSED
static final int AL_SEC_OFFSET
static final int AL_SAMPLE_OFFSET
static final int AL_BYTE_OFFSET
static final int AL_SOURCE_TYPE
static final int AL_STATIC
static final int AL_STREAMING
static final int AL_UNDETERMINED
static final int AL_FORMAT_MONO8
static final int AL_FORMAT_MONO16
static final int AL_FORMAT_STEREO8
static final int AL_FORMAT_STEREO16
static final int AL_REFERENCE_DISTANCE
static final int AL_ROLLOFF_FACTOR
static final int AL_CONE_OUTER_GAIN
static final int AL_MAX_DISTANCE
static final int AL_FREQUENCY
static final int AL_BITS
static final int AL_CHANNELS
static final int AL_SIZE
static final int AL_UNUSED
static final int AL_PENDING
static final int AL_PROCESSED
static final int AL_NO_ERROR
static final int AL_INVALID_NAME
static final int AL_INVALID_ENUM
static final int AL_INVALID_VALUE
static final int AL_INVALID_OPERATION
static final int AL_OUT_OF_MEMORY
static final int AL_VENDOR
static final int AL_VERSION
static final int AL_RENDERER
static final int AL_EXTENSIONS
static final int AL_DOPPLER_FACTOR
static final int AL_DOPPLER_VELOCITY
static final int AL_SPEED_OF_SOUND
static final int AL_DISTANCE_MODEL
static final int AL_INVERSE_DISTANCE
static final int AL_INVERSE_DISTANCE_CLAMPED
static final int AL_LINEAR_DISTANCE
static final int AL_LINEAR_DISTANCE_CLAMPED
static final int AL_EXPONENT_DISTANCE
static final int AL_EXPONENT_DISTANCE_CLAMPED
java.lang.String alGetString(int parameter)
int alGenSources()
int alGetError()
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.
void alDeleteSources(int numSources, java.nio.IntBuffer sources)
numSources
- the number of sources.sources
- the sources to delete.void alGenBuffers(int numBuffers, java.nio.IntBuffer buffers)
numBuffers
- the number of buffers.buffers
- the buffer that will receive the buffer names.void alDeleteBuffers(int numBuffers, java.nio.IntBuffer buffers)
numBuffers
- the number of buffers.buffers
- the buffers to delete.void alSourceStop(int source)
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.
source
- the source to stop.void alSourcei(int source, int param, int value)
Sourcef
.source
- the source to modify.param
- the parameter to modify.value
- the parameter value.void alBufferData(int buffer, int format, java.nio.ByteBuffer data, int size, int frequency)
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.
buffer
- the buffer to modify.format
- the data format. One of:
FORMAT_MONO8
FORMAT_MONO16
FORMAT_STEREO8
FORMAT_STEREO16
data
- the sample data.frequency
- the data frequency.void alSourcePlay(int source)
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.
source
- the source to play.void alSourcePause(int source)
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.
source
- the source to pause.void alSourcef(int source, int param, float value)
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.void alSource3f(int source, int param, float value1, float value2, float value3)
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.int alGetSourcei(int source, int param)
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
void alSourceUnqueueBuffers(int source, int numBuffers, java.nio.IntBuffer buffers)
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).
source
- the target sourcenumBuffers
- the names count.buffers
- the buffer namesvoid alSourceQueueBuffers(int source, int numBuffers, java.nio.IntBuffer buffers)
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.
source
- the target source.numBuffers
- the names count.buffers
- the buffer names.void alListener(int param, java.nio.FloatBuffer data)
Listenerf
.param
- the parameter to modify.data
- the parameter values.void alListenerf(int param, float value)
param
- the parameter to modify. One of:
ORIENTATION
POSITION
VELOCITY
GAIN
value
- the parameter value.void alListener3f(int param, float value1, float value2, float value3)
param
- the parameter to modify. One of:
ORIENTATION
POSITION
VELOCITY
GAIN
value1
- the first value.value2
- the second value.value3
- the third value.void alSource3i(int source, int param, int value1, int value2, int value3)
source
- the source to modify.param
- the parameter to modify.value1
- the first value.value2
- the second value.value3
- the third value.