mirror of
https://github.com/shadowfacts/lwjgl2-arm64.git
synced 2026-04-05 06:25:46 +00:00
changed: AL_ and al prefix removed (this included lowercasing first letter in method)
This commit is contained in:
parent
05c2e5844b
commit
94de774d49
8 changed files with 386 additions and 386 deletions
|
|
@ -29,7 +29,7 @@ public class ALUT {
|
|||
*
|
||||
* @param args String array of arguments to engine
|
||||
*/
|
||||
public native void alutInit(String[] args);
|
||||
public native void init(String[] args);
|
||||
|
||||
/**
|
||||
* Loads a wave file into memory
|
||||
|
|
@ -37,7 +37,7 @@ public class ALUT {
|
|||
* @param file name of file to load (in current working directory)
|
||||
* @return ALUTLoadWAVFile object containing information regarding file loaded
|
||||
*/
|
||||
public native ALUTLoadWAVFile alutLoadWAVFile(String file);
|
||||
public native ALUTLoadWAVFile loadWAVFile(String file);
|
||||
|
||||
/**
|
||||
* Unloads the specified file from memory
|
||||
|
|
@ -47,10 +47,10 @@ public class ALUT {
|
|||
* @param size size of the data in bytes
|
||||
* @param freq frequency of the data
|
||||
*/
|
||||
public native void alutUnloadWAV(int format, int data, int size, int freq);
|
||||
public native void unloadWAV(int format, int data, int size, int freq);
|
||||
|
||||
/**
|
||||
* Deinitializes the OpenAL engine
|
||||
*/
|
||||
public native void alutExit();
|
||||
public native void exit();
|
||||
}
|
||||
|
|
@ -9,321 +9,321 @@ package org.lwjgl.openal;
|
|||
* @version $Revision$
|
||||
*/
|
||||
public interface BaseALConstants {
|
||||
|
||||
/** Bad value */
|
||||
public static final int AL_INVALID = -1;
|
||||
|
||||
/** Disable value */
|
||||
public static final int AL_NONE = 0;
|
||||
|
||||
/** Boolean False */
|
||||
public static final int AL_FALSE = 0;
|
||||
|
||||
/** Boolean True */
|
||||
public static final int AL_TRUE = 1;
|
||||
|
||||
/**
|
||||
* Indicate the type of AL_SOURCE.
|
||||
* Sources can be spatialized
|
||||
*/
|
||||
public static final int AL_SOURCE_TYPE = 0x200;
|
||||
|
||||
/** Indicate source has absolute coordinates */
|
||||
public static final int AL_SOURCE_ABSOLUTE = 0x201;
|
||||
|
||||
/** Indicate Source has listener relative coordinates */
|
||||
public static final int AL_SOURCE_RELATIVE = 0x202;
|
||||
|
||||
/**
|
||||
* Directional source, inner cone angle, in degrees
|
||||
* Range: [0-360]
|
||||
* Default: 360
|
||||
*/
|
||||
public static final int AL_CONE_INNER_ANGLE = 0x1001;
|
||||
|
||||
/**
|
||||
* Directional source, outer cone angle, in degrees.
|
||||
* Range: [0-360]
|
||||
* Default: 360
|
||||
*/
|
||||
public static final int AL_CONE_OUTER_ANGLE = 0x1002;
|
||||
|
||||
/**
|
||||
* Specify the pitch to be applied, either at source,
|
||||
* or on mixer results, at listener.
|
||||
* Range: [0.5-2.0]
|
||||
* Default: 1.0
|
||||
*/
|
||||
public static final int AL_PITCH = 0x1003;
|
||||
|
||||
/**
|
||||
* Specify the current location in three dimensional space.
|
||||
* OpenAL, like OpenGL, uses a right handed coordinate system,
|
||||
* where in a frontal default view X (thumb) points right,
|
||||
* Y points up (index finger), and Z points towards the
|
||||
* viewer/camera (middle finger).
|
||||
* To switch from a left handed coordinate system, flip the
|
||||
* sign on the Z coordinate.
|
||||
* Listener position is always in the world coordinate system.
|
||||
*/
|
||||
public static final int AL_POSITION = 0x1004;
|
||||
|
||||
/** Specify the current direction as forward vector. */
|
||||
public static final int AL_DIRECTION = 0x1005;
|
||||
|
||||
/** Specify the current velocity in three dimensional space. */
|
||||
public static final int AL_VELOCITY = 0x1006;
|
||||
|
||||
/**
|
||||
* Indicate whether source has to loop infinite.
|
||||
* Type: ALboolean
|
||||
* Range: [AL_TRUE, AL_FALSE]
|
||||
* Default: AL_FALSE
|
||||
*/
|
||||
public static final int AL_LOOPING = 0x1007;
|
||||
|
||||
/**
|
||||
* Indicate the buffer to provide sound samples.
|
||||
* Type: ALuint.
|
||||
* Range: any valid Buffer id.
|
||||
*/
|
||||
public static final int AL_BUFFER = 0x1009;
|
||||
|
||||
/**
|
||||
* Indicate the gain (volume amplification) applied.
|
||||
* Type: ALfloat.
|
||||
* Range: ]0.0- ]
|
||||
* A value of 1.0 means un-attenuated/unchanged.
|
||||
* Each division by 2 equals an attenuation of -6dB.
|
||||
* Each multiplicaton with 2 equals an amplification of +6dB.
|
||||
* A value of 0.0 is meaningless with respect to a logarithmic
|
||||
* scale; it is interpreted as zero volume - the channel
|
||||
* is effectively disabled.
|
||||
*/
|
||||
public static final int AL_GAIN = 0x100A;
|
||||
|
||||
/**
|
||||
* Indicate minimum source attenuation.
|
||||
* Type: ALfloat
|
||||
* Range: [0.0 - 1.0]
|
||||
*/
|
||||
public static final int AL_MIN_GAIN = 0x100D;
|
||||
|
||||
/**
|
||||
* Indicate maximum source attenuation.
|
||||
* Type: ALfloat
|
||||
* Range: [0.0 - 1.0]
|
||||
*/
|
||||
public static final int AL_MAX_GAIN = 0x100E;
|
||||
|
||||
/**
|
||||
* Specify the current orientation.
|
||||
* Type: ALfv6 (at/up)
|
||||
* Range: N/A
|
||||
*/
|
||||
public static final int AL_ORIENTATION = 0x100F;
|
||||
|
||||
/* byte offset into source (in canon format). -1 if source
|
||||
* is not playing. Don't set this, get this.
|
||||
*
|
||||
* Type: ALfloat
|
||||
* Range: [0.0 - ]
|
||||
* Default: 1.0
|
||||
*/
|
||||
public static final int AL_REFERENCE_DISTANCE = 0x1020;
|
||||
|
||||
/**
|
||||
* Indicate the rolloff factor for the source.
|
||||
* Type: ALfloat
|
||||
* Range: [0.0 - ]
|
||||
* Default: 1.0
|
||||
*/
|
||||
public static final int AL_ROLLOFF_FACTOR = 0x1021;
|
||||
|
||||
/**
|
||||
* Indicate the gain (volume amplification) applied.
|
||||
* Type: ALfloat.
|
||||
* Range: ]0.0- ]
|
||||
* A value of 1.0 means un-attenuated/unchanged.
|
||||
* Each division by 2 equals an attenuation of -6dB.
|
||||
* Each multiplicaton with 2 equals an amplification of +6dB.
|
||||
* A value of 0.0 is meaningless with respect to a logarithmic
|
||||
* scale; it is interpreted as zero volume - the channel
|
||||
* is effectively disabled.
|
||||
*/
|
||||
public static final int AL_CONE_OUTER_GAIN = 0x1022;
|
||||
|
||||
/**
|
||||
* Specify the maximum distance.
|
||||
* Type: ALfloat
|
||||
* Range: [0.0 - ]
|
||||
*/
|
||||
public static final int AL_MAX_DISTANCE = 0x1023;
|
||||
|
||||
/**
|
||||
* Specify the channel mask. (Creative)
|
||||
* Type: ALuint
|
||||
* Range: [0 - 255]
|
||||
*/
|
||||
public static final int AL_CHANNEL_MASK = 0x3000;
|
||||
|
||||
/** Source state information */
|
||||
public static final int AL_SOURCE_STATE = 0x1010;
|
||||
|
||||
/** Source state information */
|
||||
public static final int AL_INITIAL = 0x1011;
|
||||
|
||||
/** Source state information */
|
||||
public static final int AL_PLAYING = 0x1012;
|
||||
|
||||
/** Source state information */
|
||||
public static final int AL_PAUSED = 0x1013;
|
||||
|
||||
/** Source state information */
|
||||
public static final int AL_STOPPED = 0x1014;
|
||||
|
||||
/** Buffer Queue params */
|
||||
public static final int AL_BUFFERS_QUEUED = 0x1015;
|
||||
|
||||
/** Buffer Queue params */
|
||||
public static final int AL_BUFFERS_PROCESSED = 0x1016;
|
||||
|
||||
/** Sound buffers: format specifier. */
|
||||
public static final int AL_FORMAT_MONO8 = 0x1100;
|
||||
|
||||
/** Sound buffers: format specifier. */
|
||||
public static final int AL_FORMAT_MONO16 = 0x1101;
|
||||
|
||||
/** Sound buffers: format specifier. */
|
||||
public static final int AL_FORMAT_STEREO8 = 0x1102;
|
||||
|
||||
/** Sound buffers: format specifier. */
|
||||
public static final int AL_FORMAT_STEREO16 = 0x1103;
|
||||
|
||||
/**
|
||||
* Sound buffers: frequency, in units of Hertz [Hz].
|
||||
* This is the number of samples per second. Half of the
|
||||
* sample frequency marks the maximum significant
|
||||
* frequency component.
|
||||
*/
|
||||
public static final int AL_FREQUENCY = 0x2001;
|
||||
|
||||
/**
|
||||
* Sound buffers: frequency, in units of Hertz [Hz].
|
||||
* This is the number of samples per second. Half of the
|
||||
* sample frequency marks the maximum significant
|
||||
* frequency component.
|
||||
*/
|
||||
public static final int AL_BITS = 0x2002;
|
||||
|
||||
/**
|
||||
* Sound buffers: frequency, in units of Hertz [Hz].
|
||||
* This is the number of samples per second. Half of the
|
||||
* sample frequency marks the maximum significant
|
||||
* frequency component.
|
||||
*/
|
||||
public static final int AL_CHANNELS = 0x2003;
|
||||
|
||||
/**
|
||||
* Sound buffers: frequency, in units of Hertz [Hz].
|
||||
* This is the number of samples per second. Half of the
|
||||
* sample frequency marks the maximum significant
|
||||
* frequency component.
|
||||
*/
|
||||
public static final int AL_SIZE = 0x2004;
|
||||
|
||||
/**
|
||||
* Sound buffers: frequency, in units of Hertz [Hz].
|
||||
* This is the number of samples per second. Half of the
|
||||
* sample frequency marks the maximum significant
|
||||
* frequency component.
|
||||
*/
|
||||
public static final int AL_DATA = 0x2005;
|
||||
|
||||
/**
|
||||
* Buffer state.
|
||||
*
|
||||
* Not supported for public use (yet).
|
||||
*/
|
||||
public static final int AL_UNUSED = 0x2010;
|
||||
|
||||
/**
|
||||
* Buffer state.
|
||||
*
|
||||
* Not supported for public use (yet).
|
||||
*/
|
||||
public static final int AL_PENDING = 0x2011;
|
||||
|
||||
/**
|
||||
* Buffer state.
|
||||
*
|
||||
* Not supported for public use (yet).
|
||||
*/
|
||||
public static final int AL_PROCESSED = 0x2012;
|
||||
|
||||
/** Errors: No Error. */
|
||||
public static final int AL_NO_ERROR = AL_FALSE;
|
||||
|
||||
/**
|
||||
* Illegal name passed as an argument to an AL call.
|
||||
*/
|
||||
public static final int AL_INVALID_NAME = 0xA001;
|
||||
|
||||
/**
|
||||
* Illegal enum passed as an argument to an AL call.
|
||||
*/
|
||||
public static final int AL_INVALID_ENUM = 0xA002;
|
||||
|
||||
/**
|
||||
* Illegal value passed as an argument to an AL call.
|
||||
* Applies to parameter values, but not to enumerations.
|
||||
*/
|
||||
public static final int AL_INVALID_VALUE = 0xA003;
|
||||
|
||||
/**
|
||||
* A function was called at inappropriate time,
|
||||
* or in an inappropriate way, causing an illegal state.
|
||||
* This can be an incompatible ALenum, object ID,
|
||||
* and/or function.
|
||||
*/
|
||||
public static final int AL_INVALID_OPERATION = 0xA004;
|
||||
|
||||
/**
|
||||
* A function could not be completed,
|
||||
* because there is not enough memory available.
|
||||
*/
|
||||
public static final int AL_OUT_OF_MEMORY = 0xA005;
|
||||
|
||||
/** Context strings: Vendor */
|
||||
public static final int AL_VENDOR = 0xB001;
|
||||
|
||||
/** Context strings: Version */
|
||||
public static final int AL_VERSION = 0xB002;
|
||||
|
||||
/** Context strings: Renderer */
|
||||
public static final int AL_RENDERER = 0xB003;
|
||||
|
||||
/** Context strings: Extensions */
|
||||
public static final int AL_EXTENSIONS = 0xB004;
|
||||
|
||||
/**
|
||||
* Doppler scale. Default 1.0
|
||||
*/
|
||||
public static final int AL_DOPPLER_FACTOR = 0xC000;
|
||||
|
||||
/**
|
||||
* Doppler velocity. Default 1.0
|
||||
*/
|
||||
public static final int AL_DOPPLER_VELOCITY = 0xC001;
|
||||
|
||||
/**
|
||||
* Distance model. Default AL_INVERSE_DISTANCE_CLAMPED
|
||||
*/
|
||||
public static final int AL_DISTANCE_MODEL = 0xD000;
|
||||
|
||||
/** Distance model */
|
||||
public static final int AL_INVERSE_DISTANCE = 0xD001;
|
||||
|
||||
/** Distance model */
|
||||
public static final int AL_INVERSE_DISTANCE_CLAMPED = 0xD002;
|
||||
|
||||
/** Bad value */
|
||||
public static final int INVALID = -1;
|
||||
|
||||
/** Disable value */
|
||||
public static final int NONE = 0;
|
||||
|
||||
/** Boolean False */
|
||||
public static final int FALSE = 0;
|
||||
|
||||
/** Boolean True */
|
||||
public static final int TRUE = 1;
|
||||
|
||||
/**
|
||||
* Indicate the type of SOURCE.
|
||||
* Sources can be spatialized
|
||||
*/
|
||||
public static final int SOURCE_TYPE = 0x200;
|
||||
|
||||
/** Indicate source has absolute coordinates */
|
||||
public static final int SOURCE_ABSOLUTE = 0x201;
|
||||
|
||||
/** Indicate Source has listener relative coordinates */
|
||||
public static final int SOURCE_RELATIVE = 0x202;
|
||||
|
||||
/**
|
||||
* Directional source, inner cone angle, in degrees
|
||||
* Range: [0-360]
|
||||
* Default: 360
|
||||
*/
|
||||
public static final int CONE_INNER_ANGLE = 0x1001;
|
||||
|
||||
/**
|
||||
* Directional source, outer cone angle, in degrees.
|
||||
* Range: [0-360]
|
||||
* Default: 360
|
||||
*/
|
||||
public static final int CONE_OUTER_ANGLE = 0x1002;
|
||||
|
||||
/**
|
||||
* Specify the pitch to be applied, either at source,
|
||||
* or on mixer results, at listener.
|
||||
* Range: [0.5-2.0]
|
||||
* Default: 1.0
|
||||
*/
|
||||
public static final int PITCH = 0x1003;
|
||||
|
||||
/**
|
||||
* Specify the current location in three dimensional space.
|
||||
* OpenAL, like OpenGL, uses a right handed coordinate system,
|
||||
* where in a frontal default view X (thumb) points right,
|
||||
* Y points up (index finger), and Z points towards the
|
||||
* viewer/camera (middle finger).
|
||||
* To switch from a left handed coordinate system, flip the
|
||||
* sign on the Z coordinate.
|
||||
* Listener position is always in the world coordinate system.
|
||||
*/
|
||||
public static final int POSITION = 0x1004;
|
||||
|
||||
/** Specify the current direction as forward vector. */
|
||||
public static final int DIRECTION = 0x1005;
|
||||
|
||||
/** Specify the current velocity in three dimensional space. */
|
||||
public static final int VELOCITY = 0x1006;
|
||||
|
||||
/**
|
||||
* Indicate whether source has to loop infinite.
|
||||
* Type: ALboolean
|
||||
* Range: [TRUE, FALSE]
|
||||
* Default: FALSE
|
||||
*/
|
||||
public static final int LOOPING = 0x1007;
|
||||
|
||||
/**
|
||||
* Indicate the buffer to provide sound samples.
|
||||
* Type: ALuint.
|
||||
* Range: any valid Buffer id.
|
||||
*/
|
||||
public static final int BUFFER = 0x1009;
|
||||
|
||||
/**
|
||||
* Indicate the gain (volume amplification) applied.
|
||||
* Type: ALfloat.
|
||||
* Range: ]0.0- ]
|
||||
* A value of 1.0 means un-attenuated/unchanged.
|
||||
* Each division by 2 equals an attenuation of -6dB.
|
||||
* Each multiplicaton with 2 equals an amplification of +6dB.
|
||||
* A value of 0.0 is meaningless with respect to a logarithmic
|
||||
* scale; it is interpreted as zero volume - the channel
|
||||
* is effectively disabled.
|
||||
*/
|
||||
public static final int GAIN = 0x100A;
|
||||
|
||||
/**
|
||||
* Indicate minimum source attenuation.
|
||||
* Type: ALfloat
|
||||
* Range: [0.0 - 1.0]
|
||||
*/
|
||||
public static final int MIN_GAIN = 0x100D;
|
||||
|
||||
/**
|
||||
* Indicate maximum source attenuation.
|
||||
* Type: ALfloat
|
||||
* Range: [0.0 - 1.0]
|
||||
*/
|
||||
public static final int MAX_GAIN = 0x100E;
|
||||
|
||||
/**
|
||||
* Specify the current orientation.
|
||||
* Type: ALfv6 (at/up)
|
||||
* Range: N/A
|
||||
*/
|
||||
public static final int ORIENTATION = 0x100F;
|
||||
|
||||
/* byte offset into source (in canon format). -1 if source
|
||||
* is not playing. Don't set this, get this.
|
||||
*
|
||||
* Type: ALfloat
|
||||
* Range: [0.0 - ]
|
||||
* Default: 1.0
|
||||
*/
|
||||
public static final int REFERENCE_DISTANCE = 0x1020;
|
||||
|
||||
/**
|
||||
* Indicate the rolloff factor for the source.
|
||||
* Type: ALfloat
|
||||
* Range: [0.0 - ]
|
||||
* Default: 1.0
|
||||
*/
|
||||
public static final int ROLLOFF_FACTOR = 0x1021;
|
||||
|
||||
/**
|
||||
* Indicate the gain (volume amplification) applied.
|
||||
* Type: ALfloat.
|
||||
* Range: ]0.0- ]
|
||||
* A value of 1.0 means un-attenuated/unchanged.
|
||||
* Each division by 2 equals an attenuation of -6dB.
|
||||
* Each multiplicaton with 2 equals an amplification of +6dB.
|
||||
* A value of 0.0 is meaningless with respect to a logarithmic
|
||||
* scale; it is interpreted as zero volume - the channel
|
||||
* is effectively disabled.
|
||||
*/
|
||||
public static final int CONE_OUTER_GAIN = 0x1022;
|
||||
|
||||
/**
|
||||
* Specify the maximum distance.
|
||||
* Type: ALfloat
|
||||
* Range: [0.0 - ]
|
||||
*/
|
||||
public static final int MAX_DISTANCE = 0x1023;
|
||||
|
||||
/**
|
||||
* Specify the channel mask. (Creative)
|
||||
* Type: ALuint
|
||||
* Range: [0 - 255]
|
||||
*/
|
||||
public static final int CHANNEL_MASK = 0x3000;
|
||||
|
||||
/** Source state information */
|
||||
public static final int SOURCE_STATE = 0x1010;
|
||||
|
||||
/** Source state information */
|
||||
public static final int INITIAL = 0x1011;
|
||||
|
||||
/** Source state information */
|
||||
public static final int PLAYING = 0x1012;
|
||||
|
||||
/** Source state information */
|
||||
public static final int PAUSED = 0x1013;
|
||||
|
||||
/** Source state information */
|
||||
public static final int STOPPED = 0x1014;
|
||||
|
||||
/** Buffer Queue params */
|
||||
public static final int BUFFERS_QUEUED = 0x1015;
|
||||
|
||||
/** Buffer Queue params */
|
||||
public static final int BUFFERS_PROCESSED = 0x1016;
|
||||
|
||||
/** Sound buffers: format specifier. */
|
||||
public static final int FORMAT_MONO8 = 0x1100;
|
||||
|
||||
/** Sound buffers: format specifier. */
|
||||
public static final int FORMAT_MONO16 = 0x1101;
|
||||
|
||||
/** Sound buffers: format specifier. */
|
||||
public static final int FORMAT_STEREO8 = 0x1102;
|
||||
|
||||
/** Sound buffers: format specifier. */
|
||||
public static final int FORMAT_STEREO16 = 0x1103;
|
||||
|
||||
/**
|
||||
* Sound buffers: frequency, in units of Hertz [Hz].
|
||||
* This is the number of samples per second. Half of the
|
||||
* sample frequency marks the maximum significant
|
||||
* frequency component.
|
||||
*/
|
||||
public static final int FREQUENCY = 0x2001;
|
||||
|
||||
/**
|
||||
* Sound buffers: frequency, in units of Hertz [Hz].
|
||||
* This is the number of samples per second. Half of the
|
||||
* sample frequency marks the maximum significant
|
||||
* frequency component.
|
||||
*/
|
||||
public static final int BITS = 0x2002;
|
||||
|
||||
/**
|
||||
* Sound buffers: frequency, in units of Hertz [Hz].
|
||||
* This is the number of samples per second. Half of the
|
||||
* sample frequency marks the maximum significant
|
||||
* frequency component.
|
||||
*/
|
||||
public static final int CHANNELS = 0x2003;
|
||||
|
||||
/**
|
||||
* Sound buffers: frequency, in units of Hertz [Hz].
|
||||
* This is the number of samples per second. Half of the
|
||||
* sample frequency marks the maximum significant
|
||||
* frequency component.
|
||||
*/
|
||||
public static final int SIZE = 0x2004;
|
||||
|
||||
/**
|
||||
* Sound buffers: frequency, in units of Hertz [Hz].
|
||||
* This is the number of samples per second. Half of the
|
||||
* sample frequency marks the maximum significant
|
||||
* frequency component.
|
||||
*/
|
||||
public static final int DATA = 0x2005;
|
||||
|
||||
/**
|
||||
* Buffer state.
|
||||
*
|
||||
* Not supported for public use (yet).
|
||||
*/
|
||||
public static final int UNUSED = 0x2010;
|
||||
|
||||
/**
|
||||
* Buffer state.
|
||||
*
|
||||
* Not supported for public use (yet).
|
||||
*/
|
||||
public static final int PENDING = 0x2011;
|
||||
|
||||
/**
|
||||
* Buffer state.
|
||||
*
|
||||
* Not supported for public use (yet).
|
||||
*/
|
||||
public static final int PROCESSED = 0x2012;
|
||||
|
||||
/** Errors: No Error. */
|
||||
public static final int NO_ERROR = FALSE;
|
||||
|
||||
/**
|
||||
* Illegal name passed as an argument to an AL call.
|
||||
*/
|
||||
public static final int INVALID_NAME = 0xA001;
|
||||
|
||||
/**
|
||||
* Illegal enum passed as an argument to an AL call.
|
||||
*/
|
||||
public static final int INVALID_ENUM = 0xA002;
|
||||
|
||||
/**
|
||||
* Illegal value passed as an argument to an AL call.
|
||||
* Applies to parameter values, but not to enumerations.
|
||||
*/
|
||||
public static final int INVALID_VALUE = 0xA003;
|
||||
|
||||
/**
|
||||
* A function was called at inappropriate time,
|
||||
* or in an inappropriate way, causing an illegal state.
|
||||
* This can be an incompatible ALenum, object ID,
|
||||
* and/or function.
|
||||
*/
|
||||
public static final int INVALID_OPERATION = 0xA004;
|
||||
|
||||
/**
|
||||
* A function could not be completed,
|
||||
* because there is not enough memory available.
|
||||
*/
|
||||
public static final int OUT_OF_MEMORY = 0xA005;
|
||||
|
||||
/** Context strings: Vendor */
|
||||
public static final int VENDOR = 0xB001;
|
||||
|
||||
/** Context strings: Version */
|
||||
public static final int VERSION = 0xB002;
|
||||
|
||||
/** Context strings: Renderer */
|
||||
public static final int RENDERER = 0xB003;
|
||||
|
||||
/** Context strings: Extensions */
|
||||
public static final int EXTENSIONS = 0xB004;
|
||||
|
||||
/**
|
||||
* Doppler scale. Default 1.0
|
||||
*/
|
||||
public static final int DOPPLER_FACTOR = 0xC000;
|
||||
|
||||
/**
|
||||
* Doppler velocity. Default 1.0
|
||||
*/
|
||||
public static final int DOPPLER_VELOCITY = 0xC001;
|
||||
|
||||
/**
|
||||
* Distance model. Default INVERSE_DISTANCE_CLAMPED
|
||||
*/
|
||||
public static final int DISTANCE_MODEL = 0xD000;
|
||||
|
||||
/** Distance model */
|
||||
public static final int INVERSE_DISTANCE = 0xD001;
|
||||
|
||||
/** Distance model */
|
||||
public static final int INVERSE_DISTANCE_CLAMPED = 0xD002;
|
||||
}
|
||||
|
|
@ -20,7 +20,7 @@ public class CoreAL extends BaseAL implements BaseALConstants {
|
|||
*
|
||||
* @return current error state
|
||||
*/
|
||||
public native int alGetError();
|
||||
public native int getError();
|
||||
|
||||
/**
|
||||
* Retrieve an OpenAL string property.
|
||||
|
|
@ -28,7 +28,7 @@ public class CoreAL extends BaseAL implements BaseALConstants {
|
|||
* @param param The property to be returned
|
||||
* @return OpenAL String property
|
||||
*/
|
||||
public native String alGetString(int param);
|
||||
public native String getString(int param);
|
||||
|
||||
/**
|
||||
* Generate one or more buffers.
|
||||
|
|
@ -36,7 +36,7 @@ public class CoreAL extends BaseAL implements BaseALConstants {
|
|||
* @param n number of buffers to generate
|
||||
* @param buffers array holding buffers
|
||||
*/
|
||||
public native void alGenBuffers(int n, int[] buffers);
|
||||
public native void genBuffers(int n, int[] buffers);
|
||||
|
||||
/**
|
||||
* Generate one or more sources.
|
||||
|
|
@ -44,7 +44,7 @@ public class CoreAL extends BaseAL implements BaseALConstants {
|
|||
* @param n number of sources to generate
|
||||
* @param sources array holding sources
|
||||
*/
|
||||
public native void alGenSources(int n, int[] sources);
|
||||
public native void genSources(int n, int[] sources);
|
||||
|
||||
/**
|
||||
* Fill a buffer with audio data.
|
||||
|
|
@ -55,7 +55,7 @@ public class CoreAL extends BaseAL implements BaseALConstants {
|
|||
* @param size size of data segment
|
||||
* @param freq frequency of data
|
||||
*/
|
||||
public native void alBufferData(int buffer, int format, int data, int size, int freq);
|
||||
public native void bufferData(int buffer, int format, int data, int size, int freq);
|
||||
|
||||
/**
|
||||
* Set an integer property of a source.
|
||||
|
|
@ -64,21 +64,21 @@ public class CoreAL extends BaseAL implements BaseALConstants {
|
|||
* @param param property to set
|
||||
* @param value value of property
|
||||
*/
|
||||
public native void alSourcei(int source, int param, int value);
|
||||
public native void sourcei(int source, int param, int value);
|
||||
|
||||
/**
|
||||
* Play a source.
|
||||
*
|
||||
* @param source Source to play
|
||||
*/
|
||||
public native void alSourcePlay(int source);
|
||||
public native void sourcePlay(int source);
|
||||
|
||||
/**
|
||||
* Stops a source.
|
||||
*
|
||||
* @param source Source to stop
|
||||
*/
|
||||
public native void alSourceStop(int source);
|
||||
public native void sourceStop(int source);
|
||||
|
||||
/**
|
||||
* Delete one or more sources.
|
||||
|
|
@ -86,7 +86,7 @@ public class CoreAL extends BaseAL implements BaseALConstants {
|
|||
* @param n Number of sources to delete
|
||||
* @param source Source array to delete from
|
||||
*/
|
||||
public native void alDeleteSources(int n, int[] source);
|
||||
public native void deleteSources(int n, int[] source);
|
||||
|
||||
|
||||
/**
|
||||
|
|
@ -95,5 +95,5 @@ public class CoreAL extends BaseAL implements BaseALConstants {
|
|||
* @param n Number of buffers to delete
|
||||
* @param buffers Buffer array to delete from
|
||||
*/
|
||||
public native void alDeleteBuffers(int n, int[] buffers);
|
||||
public native void deleteBuffers(int n, int[] buffers);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,29 +34,29 @@ public class OpenALTest {
|
|||
int[] sources = new int[1];
|
||||
|
||||
/* initialize */
|
||||
alut.alutInit(args);
|
||||
alut.init(args);
|
||||
|
||||
/* create buffers and sources */
|
||||
al.alGenBuffers(1, buffers);
|
||||
al.alGenSources(1, sources);
|
||||
al.genBuffers(1, buffers);
|
||||
al.genSources(1, sources);
|
||||
|
||||
/* load data */
|
||||
ALUTLoadWAVFile file = alut.alutLoadWAVFile("footsteps.wav");
|
||||
ALUTLoadWAVFile file = alut.loadWAVFile("footsteps.wav");
|
||||
|
||||
/* copy to buffers */
|
||||
al.alBufferData(buffers[0], file.format, file.data, file.size, file.freq);
|
||||
al.bufferData(buffers[0], file.format, file.data, file.size, file.freq);
|
||||
|
||||
/* unload file again */
|
||||
alut.alutUnloadWAV(file.format, file.data, file.size, file.freq);
|
||||
alut.unloadWAV(file.format, file.data, file.size, file.freq);
|
||||
|
||||
/* set up source input */
|
||||
al.alSourcei(sources[0], AL.AL_BUFFER, buffers[0]);
|
||||
al.sourcei(sources[0], AL.BUFFER, buffers[0]);
|
||||
|
||||
/* lets loop the sound */
|
||||
al.alSourcei(sources[0], AL.AL_LOOPING, AL.AL_TRUE);
|
||||
al.sourcei(sources[0], AL.LOOPING, AL.TRUE);
|
||||
|
||||
/* play source 0 */
|
||||
al.alSourcePlay(sources[0]);
|
||||
al.sourcePlay(sources[0]);
|
||||
|
||||
System.out.println("will exit in 5 seconds (so we don't crash if weird stuff has happened with file...)\n");
|
||||
for(int i=0; i<5; i++) {
|
||||
|
|
@ -68,13 +68,13 @@ public class OpenALTest {
|
|||
}
|
||||
|
||||
/* stop source 0 */
|
||||
al.alSourceStop(sources[0]);
|
||||
al.sourceStop(sources[0]);
|
||||
|
||||
/* delete buffers and sources */
|
||||
al.alDeleteSources(1, sources);
|
||||
al.alDeleteBuffers(1, buffers);
|
||||
al.deleteSources(1, sources);
|
||||
al.deleteBuffers(1, buffers);
|
||||
|
||||
/* shutdown */
|
||||
alut.alutExit();
|
||||
alut.exit();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue