Class AndroidAL
- All Implemented Interfaces:
AL
-
Field Summary
Fields inherited from interface com.jme3.audio.openal.AL
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidalBufferData(int buffer, int format, ByteBuffer data, int size, int frequency) Sets the sample data of the specified buffer.voidalDeleteBuffers(int numBuffers, IntBuffer buffers) Requests the deletion of a number of buffers.voidalDeleteSources(int numSources, IntBuffer sources) Requests the deletion of a number of sources.voidalGenBuffers(int numBuffers, IntBuffer buffers) Requests a number of buffer names.intRequests a number of source names.intObtains error information.intalGetSourcei(int source, int param) Returns the integer value of the specified source parameter.alGetString(int parameter) voidalListener(int param, FloatBuffer data) Pointer version ofListenerf.voidalListener3f(int param, float value1, float value2, float value3) Sets the 3 dimensional float values of a listener parameter.voidalListenerf(int param, float value) Sets the float value of a listener parameter.voidalSource3f(int source, int param, float value1, float value2, float value3) Sets the 3 dimensional values of a source parameter.voidalSource3i(int source, int param, int value1, int value2, int value3) Sets the 3 dimensional integer values of a source parameter.voidalSourcef(int source, int param, float value) Sets the float value of a source parameter.voidalSourcei(int source, int param, int value) Integer version ofSourcef.voidalSourcePause(int source) Sets the source state to AL_PAUSED.voidalSourcePlay(int source) Sets the source state to AL_PLAYING.voidalSourceQueueBuffers(int source, int numBuffers, IntBuffer buffers) Queues up one or multiple buffer names to the specified source.voidalSourceStop(int source) Sets the source state to AL_STOPPED.voidalSourceUnqueueBuffers(int source, int numBuffers, IntBuffer buffers) Removes a number of buffer entries that have finished processing, in the order of appearance, from the queue of the specified source.
-
Constructor Details
-
AndroidAL
public AndroidAL()
-
-
Method Details
-
alGetString
- Specified by:
alGetStringin interfaceAL
-
alGenSources
public int alGenSources()Description copied from interface:ALRequests a number of source names.- Specified by:
alGenSourcesin interfaceAL- Returns:
- the number of source names.
-
alGetError
public int alGetError()Description copied from interface:ALObtains error information.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.
- Specified by:
alGetErrorin interfaceAL- Returns:
- the error code, or AL_NO_ERROR if none
-
alDeleteSources
Description copied from interface:ALRequests the deletion of a number of sources.- Specified by:
alDeleteSourcesin interfaceAL- Parameters:
numSources- the number of sources.sources- the sources to delete.
-
alGenBuffers
Description copied from interface:ALRequests a number of buffer names.- Specified by:
alGenBuffersin interfaceAL- Parameters:
numBuffers- the number of buffers.buffers- the buffer that will receive the buffer names.
-
alDeleteBuffers
Description copied from interface:ALRequests the deletion of a number of buffers.- Specified by:
alDeleteBuffersin interfaceAL- Parameters:
numBuffers- the number of buffers.buffers- the buffers to delete.
-
alSourceStop
public void alSourceStop(int source) Description copied from interface:ALSets the source state to AL_STOPPED.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.
- Specified by:
alSourceStopin interfaceAL- Parameters:
source- the source to stop.
-
alSourcei
public void alSourcei(int source, int param, int value) Description copied from interface:ALInteger version ofSourcef. -
alBufferData
Description copied from interface:ALSets the sample data of the specified buffer.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.
- Specified by:
alBufferDatain interfaceAL- Parameters:
buffer- the buffer to modify.format- the data format. One of:FORMAT_MONO8FORMAT_MONO16FORMAT_STEREO8FORMAT_STEREO16data- the sample data.size- the length of the data (in bytes, ≥0)frequency- the data frequency.
-
alSourcePlay
public void alSourcePlay(int source) Description copied from interface:ALSets the source state to AL_PLAYING.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.
- Specified by:
alSourcePlayin interfaceAL- Parameters:
source- the source to play.
-
alSourcePause
public void alSourcePause(int source) Description copied from interface:ALSets the source state to AL_PAUSED.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.
- Specified by:
alSourcePausein interfaceAL- Parameters:
source- the source to pause.
-
alSourcef
public void alSourcef(int source, int param, float value) Description copied from interface:ALSets the float value of a source parameter.- Specified by:
alSourcefin interfaceAL- Parameters:
source- the source to modify.param- the parameter to modify. One of:CONE_INNER_ANGLECONE_OUTER_ANGLEPITCHDIRECTIONLOOPINGBUFFERSOURCE_STATECONE_OUTER_GAINSOURCE_TYPEPOSITIONVELOCITYGAINREFERENCE_DISTANCEROLLOFF_FACTORMAX_DISTANCEvalue- the parameter value.
-
alSource3f
public void alSource3f(int source, int param, float value1, float value2, float value3) Description copied from interface:ALSets the 3 dimensional values of a source parameter.- Specified by:
alSource3fin interfaceAL- Parameters:
source- the source to modify.param- the parameter to modify. One of:CONE_INNER_ANGLECONE_OUTER_ANGLEPITCHDIRECTIONLOOPINGBUFFERSOURCE_STATECONE_OUTER_GAINSOURCE_TYPEPOSITIONVELOCITYGAINREFERENCE_DISTANCEROLLOFF_FACTORMAX_DISTANCEvalue1- the first parameter value.value2- the second parameter value.value3- the third parameter value.
-
alGetSourcei
public int alGetSourcei(int source, int param) Description copied from interface:ALReturns the integer value of the specified source parameter.- Specified by:
alGetSourceiin interfaceAL- Parameters:
source- the source to query.param- the parameter to query. One of:CONE_INNER_ANGLECONE_OUTER_ANGLEPITCHDIRECTIONLOOPINGBUFFERSOURCE_STATECONE_OUTER_GAINSOURCE_TYPEPOSITIONVELOCITYGAINREFERENCE_DISTANCEROLLOFF_FACTORMAX_DISTANCE- Returns:
- the parameter value
-
alSourceUnqueueBuffers
Description copied from interface:ALRemoves a number of buffer entries that have finished processing, in the order of appearance, from the queue of the specified source.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).
- Specified by:
alSourceUnqueueBuffersin interfaceAL- Parameters:
source- the target sourcenumBuffers- the names count.buffers- the buffer names
-
alSourceQueueBuffers
Description copied from interface:ALQueues up one or multiple buffer names to the specified source.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
NULLbuffer (i.e., 0) which can always be queued.- Specified by:
alSourceQueueBuffersin interfaceAL- Parameters:
source- the target source.numBuffers- the names count.buffers- the buffer names.
-
alListener
Description copied from interface:ALPointer version ofListenerf.- Specified by:
alListenerin interfaceAL- Parameters:
param- the parameter to modify.data- the parameter values.
-
alListenerf
public void alListenerf(int param, float value) Description copied from interface:ALSets the float value of a listener parameter.- Specified by:
alListenerfin interfaceAL- Parameters:
param- the parameter to modify. One of:ORIENTATIONPOSITIONVELOCITYGAINvalue- the parameter value.
-
alListener3f
public void alListener3f(int param, float value1, float value2, float value3) Description copied from interface:ALSets the 3 dimensional float values of a listener parameter.- Specified by:
alListener3fin interfaceAL- Parameters:
param- the parameter to modify. One of:ORIENTATIONPOSITIONVELOCITYGAINvalue1- the first value.value2- the second value.value3- the third value.
-
alSource3i
public void alSource3i(int source, int param, int value1, int value2, int value3) Description copied from interface:ALSets the 3 dimensional integer values of a source parameter.- Specified by:
alSource3iin interfaceAL- Parameters:
source- the source to modify.param- the parameter to modify.value1- the first value.value2- the second value.value3- the third value.
-