From eb7e231172be0f7766f428f2705dafd1ce86bf06 Mon Sep 17 00:00:00 2001 From: Caspian Rychlik-Prince Date: Mon, 11 Aug 2003 19:58:12 +0000 Subject: [PATCH] New buffer code --- src/java/org/lwjgl/openal/ALC.java | 294 +++++++++--------- src/java/org/lwjgl/openal/ALCcontext.java | 20 +- src/java/org/lwjgl/openal/BaseAL.java | 2 +- src/java/org/lwjgl/openal/CoreAL.java | 205 ++++++------ src/native/common/org_lwjgl_openal_ALC.cpp | 4 +- src/native/common/org_lwjgl_openal_ALC.h | 38 +-- src/native/common/org_lwjgl_openal_CoreAL.cpp | 161 ++++------ src/native/common/org_lwjgl_openal_CoreAL.h | 240 ++++++-------- 8 files changed, 398 insertions(+), 566 deletions(-) diff --git a/src/java/org/lwjgl/openal/ALC.java b/src/java/org/lwjgl/openal/ALC.java index cb60ff43..1a6a59bc 100644 --- a/src/java/org/lwjgl/openal/ALC.java +++ b/src/java/org/lwjgl/openal/ALC.java @@ -32,6 +32,7 @@ package org.lwjgl.openal; import java.nio.Buffer; +import java.nio.IntBuffer; /** * $Id$ @@ -65,7 +66,7 @@ import java.nio.Buffer; public class ALC { /** Has the ALC object been created? */ protected static boolean created; - + /** Bad value */ public static final int ALC_INVALID = -1; @@ -78,39 +79,39 @@ public class ALC { /** Errors: No Error */ public static final int ALC_NO_ERROR = ALC_FALSE; - /** Major version query. */ + /** Major version query. */ public static final int ALC_MAJOR_VERSION = 0x1000; - - /** Minor version query. */ + + /** Minor version query. */ public static final int ALC_MINOR_VERSION = 0x1001; - - /** - * The size required for the zero-terminated attributes list, for the current context. - **/ + + /** + * The size required for the zero-terminated attributes list, for the current context. + **/ public static final int ALC_ATTRIBUTES_SIZE = 0x1002; - - /** - * Expects a destination of ALC_CURRENT_ATTRIBUTES_SIZE, - * and provides the attribute list for the current context of the specified device. - */ + + /** + * Expects a destination of ALC_CURRENT_ATTRIBUTES_SIZE, + * and provides the attribute list for the current context of the specified device. + */ public static final int ALC_ALL_ATTRIBUTES = 0x1003; - /** The specifier string for the default device */ + /** The specifier string for the default device */ public static final int ALC_DEFAULT_DEVICE_SPECIFIER = 0x1004; - - /** The specifier string for the device */ + + /** The specifier string for the device */ public static final int ALC_DEVICE_SPECIFIER = 0x1005; - - /** The extensions string for diagnostics and printing */ + + /** The extensions string for diagnostics and printing */ public static final int ALC_EXTENSIONS = 0x1006; - /** Frequency for mixing output buffer, in units of Hz. */ + /** Frequency for mixing output buffer, in units of Hz. */ public static final int ALC_FREQUENCY = 0x1007; - - /** Refresh intervalls, in units of Hz. */ + + /** Refresh intervalls, in units of Hz. */ public static final int ALC_REFRESH = 0x1008; - - /** Flag, indicating a synchronous context. */ + + /** Flag, indicating a synchronous context. */ public static final int ALC_SYNC = 0x1009; /** The device argument does not name a valid device */ @@ -143,8 +144,8 @@ public class ALC { } /** Creates a new instance of ALC */ - protected ALC() { - } + protected ALC() { + } /** * Override to provide any initialization code after creation. @@ -164,7 +165,7 @@ public class ALC { * * @throws Exception if a failiure occured in the ALC creation process */ - protected static void create() throws OpenALException { + protected static void create() throws OpenALException { if (created) { return; } @@ -173,7 +174,7 @@ public class ALC { throw new OpenALException("ALC instance could not be created."); } init(); - created = true; + created = true; } /** @@ -186,7 +187,7 @@ public class ALC { /** * Calls whatever destruction rutines that are needed */ - protected static void destroy() { + protected static void destroy() { if (!created) { return; } @@ -199,61 +200,60 @@ public class ALC { */ protected static native void nDestroy(); - /** - * The application can obtain certain strings from ALC. - * - * ALC_DEFAULT_DEVICE_SPECIFIER - The specifer string for the default device - * ALC_DEVICE_SPECIFIER - The specifer string for the device - * ALC_EXTENSIONS - The extensions string for diagnostics and printing. - * - * In addition, printable error message strings are provided for all valid error tokens, - * including ALC_NO_ERROR,ALC_INVALID_DEVICE, ALC_INVALID_CONTEXT, - * ALC_INVALID_ENUM, ALC_INVALID_VALUE. - * - * @param pname Property to get - * @return String property from device - */ + /** + * The application can obtain certain strings from ALC. + * + * ALC_DEFAULT_DEVICE_SPECIFIER - The specifer string for the default device + * ALC_DEVICE_SPECIFIER - The specifer string for the device + * ALC_EXTENSIONS - The extensions string for diagnostics and printing. + * + * In addition, printable error message strings are provided for all valid error tokens, + * including ALC_NO_ERROR,ALC_INVALID_DEVICE, ALC_INVALID_CONTEXT, + * ALC_INVALID_ENUM, ALC_INVALID_VALUE. + * + * @param pname Property to get + * @return String property from device + */ public static String alcGetString(int pname) { - return nGetString(AL.device.device, pname); + return nGetString(AL.device.device, pname); } - - native static String nGetString(int device, int pname); + + native static String nGetString(int device, int pname); /** * The application can query ALC for information using an integer query function. - * For some tokens, null is a legal deviceHandle. In other cases, specifying a null - * device will generate an ALC_INVALID_DEVICE error. The application has to - * specify the size of the destination buffer provided. A null destination or a zero - * size parameter will cause ALC to ignore the query. - * - * ALC_MAJOR_VERSION - Major version query. - * ALC_MINOR_VERSION - Minor version query. - * ALC_ATTRIBUTES_SIZE - The size required for the zero-terminated attributes list, - * for the current context. null is an invalid device. null (no current context - * for the specified device) is legal. - * ALC_ALL_ATTRIBUTES - Expects a destination of ALC_CURRENT_ATTRIBUTES_SIZE, - * and provides the attribute list for the current context of the specified device. - * null is an invalid device. null (no current context for the specified device) - * will return the default attributes defined by the specified device. + * For some tokens, null is a legal deviceHandle. In other cases, specifying a null + * device will generate an ALC_INVALID_DEVICE error. The application has to + * specify the size of the destination buffer provided. A null destination or a zero + * size parameter will cause ALC to ignore the query. + * + * ALC_MAJOR_VERSION - Major version query. + * ALC_MINOR_VERSION - Minor version query. + * ALC_ATTRIBUTES_SIZE - The size required for the zero-terminated attributes list, + * for the current context. null is an invalid device. null (no current context + * for the specified device) is legal. + * ALC_ALL_ATTRIBUTES - Expects a destination of ALC_CURRENT_ATTRIBUTES_SIZE, + * and provides the attribute list for the current context of the specified device. + * null is an invalid device. null (no current context for the specified device) + * will return the default attributes defined by the specified device. * * @param pname Property to get - * @param size Size of destination buffer provided * @param integerdata ByteBuffer to write integers to */ - public static void alcGetIntegerv(int pname, int size, Buffer integerdata) { - nGetIntegerv(AL.device.device, pname, size, integerdata); - } - - native static void nGetIntegerv(int device, int pname, int size, Buffer integerdata); + public static void alcGetInteger(int pname, IntBuffer integerdata) { + nGetIntegerv(AL.device.device, pname, integerdata.remaining(), integerdata, integerdata.position()); + } + + native static void nGetIntegerv(int device, int pname, int size, Buffer integerdata, int offset); /** * The alcOpenDevice function allows the application (i.e. the client program) to - * connect to a device (i.e. the server). - * - * If the function returns null, then no sound driver/device has been found. The - * argument is a null terminated string that requests a certain device or device - * configuration. If null is specified, the implementation will provide an - * implementation specific default. + * connect to a device (i.e. the server). + * + * If the function returns null, then no sound driver/device has been found. The + * argument is a null terminated string that requests a certain device or device + * configuration. If null is specified, the implementation will provide an + * implementation specific default. * * @param devicename name of device to open * @return opened device, or null @@ -262,10 +262,10 @@ public class ALC { /** * The alcCloseDevice function allows the application (i.e. the client program) to - * disconnect from a device (i.e. the server). - * - * If deviceHandle is null or invalid, an ALC_INVALID_DEVICE error will be - * generated. Once closed, a deviceHandle is invalid. + * disconnect from a device (i.e. the server). + * + * If deviceHandle is null or invalid, an ALC_INVALID_DEVICE error will be + * generated. Once closed, a deviceHandle is invalid. * * @param device address of native device to close */ @@ -273,57 +273,57 @@ public class ALC { /** * A context is created using alcCreateContext. The device parameter has to be a valid - * device. The attribute list can be null, or a zero terminated list of integer pairs - * composed of valid ALC attribute tokens and requested values. - * - * Context creation will fail if the application requests attributes that, by themselves, - * can not be provided. Context creation will fail if the combination of specified - * attributes can not be provided. Context creation will fail if a specified attribute, or - * the combination of attributes, does not match the default values for unspecified - * attributes. + * device. The attribute list can be null, or a zero terminated list of integer pairs + * composed of valid ALC attribute tokens and requested values. + * + * Context creation will fail if the application requests attributes that, by themselves, + * can not be provided. Context creation will fail if the combination of specified + * attributes can not be provided. Context creation will fail if a specified attribute, or + * the combination of attributes, does not match the default values for unspecified + * attributes. * * @param device address of device to associate context to * @param attrList Buffer to read attributes from * @return New context, or null if creation failed */ - native static ALCcontext alcCreateContext(int device, Buffer attrList); + native static ALCcontext alcCreateContext(int device, IntBuffer attrList); /** * To make a Context current with respect to AL Operation (state changes by issueing - * commands), alcMakeContextCurrent is used. The context parameter can be null - * or a valid context pointer. The operation will apply to the device that the context - * was created for. - * - * For each OS process (usually this means for each application), only one context can - * be current at any given time. All AL commands apply to the current context. - * Commands that affect objects shared among contexts (e.g. buffers) have side effects - * on other contexts. + * commands), alcMakeContextCurrent is used. The context parameter can be null + * or a valid context pointer. The operation will apply to the device that the context + * was created for. + * + * For each OS process (usually this means for each application), only one context can + * be current at any given time. All AL commands apply to the current context. + * Commands that affect objects shared among contexts (e.g. buffers) have side effects + * on other contexts. * * @param context address of context to make current * @return true if successfull, false if not */ native static boolean alcMakeContextCurrent(int context); - /** - * The current context is the only context accessible to state changes by AL commands - * (aside from state changes affecting shared objects). However, multiple contexts can - * be processed at the same time. To indicate that a context should be processed (i.e. - * that internal execution state like offset increments are supposed to be performed), - * the application has to use alcProcessContext. - * - * Repeated calls to alcProcessContext are legal, and do not affect a context that is - * already marked as processing. The default state of a context created by - * alcCreateContext is that it is not marked as processing. - */ - public static void alcProcessContext() { - nProcessContext(AL.context.context); - } - - native static void nProcessContext(int context); + /** + * The current context is the only context accessible to state changes by AL commands + * (aside from state changes affecting shared objects). However, multiple contexts can + * be processed at the same time. To indicate that a context should be processed (i.e. + * that internal execution state like offset increments are supposed to be performed), + * the application has to use alcProcessContext. + * + * Repeated calls to alcProcessContext are legal, and do not affect a context that is + * already marked as processing. The default state of a context created by + * alcCreateContext is that it is not marked as processing. + */ + public static void alcProcessContext() { + nProcessContext(AL.context.context); + } + + native static void nProcessContext(int context); /** * The application can query for, and obtain an handle to, the current context for the - * application. If there is no current context, null is returned. + * application. If there is no current context, null is returned. * * @return Current ALCcontext */ @@ -339,13 +339,13 @@ public class ALC { /** * The application can suspend any context from processing (including the current - * one). To indicate that a context should be suspended from processing (i.e. that - * internal execution state like offset increments is not supposed to be changed), the - * application has to use alcSuspendContext. - * - * Repeated calls to alcSuspendContext are legal, and do not affect a context that is - * already marked as suspended. The default state of a context created by - * alcCreateContext is that it is marked as suspended. + * one). To indicate that a context should be suspended from processing (i.e. that + * internal execution state like offset increments is not supposed to be changed), the + * application has to use alcSuspendContext. + * + * Repeated calls to alcSuspendContext are legal, and do not affect a context that is + * already marked as suspended. The default state of a context created by + * alcCreateContext is that it is marked as suspended. * * @param context address of context to suspend */ @@ -353,7 +353,7 @@ public class ALC { /** * The correct way to destroy a context is to first release it using alcMakeCurrent and - * null. Applications should not attempt to destroy a current context. + * null. Applications should not attempt to destroy a current context. * * @param context address of context to Destroy */ @@ -361,53 +361,53 @@ public class ALC { /** * ALC uses the same conventions and mechanisms as AL for error handling. In - * particular, ALC does not use conventions derived from X11 (GLX) or Windows - * (WGL). The alcGetError function can be used to query ALC errors. - * - * Error conditions are specific to the device. - * - * ALC_NO_ERROR - The device handle or specifier does name an accessible driver/server. - * ALC_INVALID_DEVICE - The Context argument does not name a valid context. - * ALC_INVALID_CONTEXT - The Context argument does not name a valid context. - * ALC_INVALID_ENUM - A token used is not valid, or not applicable. - * ALC_INVALID_VALUE - An value (e.g. attribute) is not valid, or not applicable. + * particular, ALC does not use conventions derived from X11 (GLX) or Windows + * (WGL). The alcGetError function can be used to query ALC errors. + * + * Error conditions are specific to the device. + * + * ALC_NO_ERROR - The device handle or specifier does name an accessible driver/server. + * ALC_INVALID_DEVICE - The Context argument does not name a valid context. + * ALC_INVALID_CONTEXT - The Context argument does not name a valid context. + * ALC_INVALID_ENUM - A token used is not valid, or not applicable. + * ALC_INVALID_VALUE - An value (e.g. attribute) is not valid, or not applicable. * * @return Errorcode from ALC statemachine */ - public static int alcGetError() { - return nGetError(AL.device.device); - } - + public static int alcGetError() { + return nGetError(AL.device.device); + } + native static int nGetError(int device); /** - * Verify that a given extension is available for the current context and the device it - * is associated with. - * A null name argument returns ALC_FALSE, as do invalid and unsupported string - * tokens. + * Verify that a given extension is available for the current context and the device it + * is associated with. + * A null name argument returns ALC_FALSE, as do invalid and unsupported string + * tokens. * * @param extName name of extension to find * @return true if extension is available, false if not */ - public static boolean alcIsExtensionPresent(String extName) { - return nIsExtensionPresent(AL.device.device, extName); - } - + public static boolean alcIsExtensionPresent(String extName) { + return nIsExtensionPresent(AL.device.device, extName); + } + native static boolean nIsExtensionPresent(int device, String extName); /** * Enumeration/token values are device independend, but tokens defined for - * extensions might not be present for a given device. But only the tokens defined - * by the AL core are guaranteed. Availability of extension tokens dependends on the ALC extension. - * - * Specifying a null name parameter will cause an ALC_INVALID_VALUE error. + * extensions might not be present for a given device. But only the tokens defined + * by the AL core are guaranteed. Availability of extension tokens dependends on the ALC extension. + * + * Specifying a null name parameter will cause an ALC_INVALID_VALUE error. * * @param enumName name of enum to find * @return value of enumeration */ - public static int alcGetEnumValue(String enumName) { - return nGetEnumValue(AL.device.device, enumName); - } - + public static int alcGetEnumValue(String enumName) { + return nGetEnumValue(AL.device.device, enumName); + } + native static int nGetEnumValue(int device, String enumName); } \ No newline at end of file diff --git a/src/java/org/lwjgl/openal/ALCcontext.java b/src/java/org/lwjgl/openal/ALCcontext.java index af2207e3..d7782539 100644 --- a/src/java/org/lwjgl/openal/ALCcontext.java +++ b/src/java/org/lwjgl/openal/ALCcontext.java @@ -31,7 +31,7 @@ */ package org.lwjgl.openal; -import java.nio.Buffer; +import java.nio.*; import java.nio.ByteBuffer; import java.nio.ByteOrder; @@ -57,16 +57,16 @@ final class ALCcontext { this.context = context; } - static Buffer createAttributeList(int contextFrequency, int contextRefresh, int contextSynchronized) { - ByteBuffer attribList = ByteBuffer.allocateDirect(7*4).order(ByteOrder.nativeOrder()); + static IntBuffer createAttributeList(int contextFrequency, int contextRefresh, int contextSynchronized) { + IntBuffer attribList = ByteBuffer.allocateDirect(7*4).order(ByteOrder.nativeOrder()).asIntBuffer(); - attribList.putInt(ALC.ALC_FREQUENCY); - attribList.putInt(contextFrequency); - attribList.putInt(ALC.ALC_REFRESH); - attribList.putInt(contextRefresh); - attribList.putInt(ALC.ALC_SYNC); - attribList.putInt(contextSynchronized); - attribList.putInt(0); //terminating int + attribList.put(ALC.ALC_FREQUENCY); + attribList.put(contextFrequency); + attribList.put(ALC.ALC_REFRESH); + attribList.put(contextRefresh); + attribList.put(ALC.ALC_SYNC); + attribList.put(contextSynchronized); + attribList.put(0); //terminating int return attribList; } diff --git a/src/java/org/lwjgl/openal/BaseAL.java b/src/java/org/lwjgl/openal/BaseAL.java index 31e918c8..641c3c46 100644 --- a/src/java/org/lwjgl/openal/BaseAL.java +++ b/src/java/org/lwjgl/openal/BaseAL.java @@ -95,7 +95,7 @@ public abstract class BaseAL { String jwsLibname = (System.getProperty("os.name").toLowerCase().indexOf("windows") == -1) ? "openal" - : "OpenAL32"; + : "lwjglaudio"; String jwsPath = getPathFromJWS(jwsLibname); if (jwsPath != null) { diff --git a/src/java/org/lwjgl/openal/CoreAL.java b/src/java/org/lwjgl/openal/CoreAL.java index 739aae3a..f8327514 100644 --- a/src/java/org/lwjgl/openal/CoreAL.java +++ b/src/java/org/lwjgl/openal/CoreAL.java @@ -34,9 +34,6 @@ package org.lwjgl.openal; import java.nio.ByteBuffer; import java.nio.IntBuffer; import java.nio.FloatBuffer; -import java.nio.DoubleBuffer; - - /** * $Id$ *
@@ -136,36 +133,7 @@ public abstract class CoreAL extends BaseAL implements BaseALConstants { */ public static native float alGetFloat(int pname); - /** - * Like OpenGL, AL uses a simplified interface for querying global state. - * - * Legal values are e.g. AL_DOPPLER_FACTOR, AL_DOPPLER_VELOCITY, - * AL_DISTANCE_MODEL. - *

- * null destinations are quietly ignored. AL_INVALID_ENUM is the response to errors - * in specifying pName. The amount of memory required in the destination - * depends on the actual state requested. - *

- * - * @return double state described by pname will be returned. - */ - public static native double alGetDouble(int pname); - - /** - * Like OpenGL, AL uses a simplified interface for querying global state. - * - * Legal values are e.g. AL_DOPPLER_FACTOR, AL_DOPPLER_VELOCITY, - * AL_DISTANCE_MODEL. - *

- * null destinations are quietly ignored. AL_INVALID_ENUM is the response to errors - * in specifying pName. The amount of memory required in the destination - * depends on the actual state requested. - *

- * - * @param pname state to be queried - * @param data Buffer to place the booleans in - */ - public static native void alGetBooleanv(int pname, ByteBuffer data); + private static native void nalGetBooleanv(int pname, ByteBuffer data, int offset); /** * Like OpenGL, AL uses a simplified interface for querying global state. @@ -181,7 +149,11 @@ public abstract class CoreAL extends BaseAL implements BaseALConstants { * @param pname state to be queried * @param data Buffer to place the integers in */ - public static native void alGetIntegerv(int pname, IntBuffer data); + public static void alGetInteger(int pname, IntBuffer data) { + assert data.remaining() > 0; + nalGetIntegerv(pname, data, data.position()); + } + private static native void nalGetIntegerv(int pname, IntBuffer data, int offset); /** * Like OpenGL, AL uses a simplified interface for querying global state. @@ -197,23 +169,11 @@ public abstract class CoreAL extends BaseAL implements BaseALConstants { * @param pname state to be queried * @param data Buffer to place the floats in */ - public static native void alGetFloatv(int pname, FloatBuffer data); - - /** - * Like OpenGL, AL uses a simplified interface for querying global state. - * - * Legal values are e.g. AL_DOPPLER_FACTOR, AL_DOPPLER_VELOCITY, - * AL_DISTANCE_MODEL. - *

- * null destinations are quietly ignored. AL_INVALID_ENUM is the response to errors - * in specifying pName. The amount of memory required in the destination - * depends on the actual state requested. - *

- * - * @param pname state to be queried - * @param data Buffer to place the floats in - */ - public static native void alGetDoublev(int pname, DoubleBuffer data); + public static void alGetFloat(int pname, FloatBuffer data) { + assert data.remaining() > 0; + nalGetFloatv(pname, data, data.position()); + } + private static native void nalGetFloatv(int pname, FloatBuffer data, int position); /** * The application can retrieve state information global to the current AL Context. @@ -367,30 +327,22 @@ public abstract class CoreAL extends BaseAL implements BaseALConstants { /** - * Listener attributes are changed using the Listener group of commands. + * Listener state is maintained inside the AL implementation and can be queried in + * full. * - * @param pname name of the attribute to be set - * @param floatdata Buffer to read floats from + * @param pname name of the attribute to be retrieved + * @return int */ - public static native void alListenerfv(int pname, FloatBuffer floatdata); + public static native int alGetListeneri(int pname); /** * Listener state is maintained inside the AL implementation and can be queried in * full. * * @param pname name of the attribute to be retrieved - * @param integerdata Buffer to write integer to + * @return float */ - public static native void alGetListeneri(int pname, IntBuffer integerdata); - - /** - * Listener state is maintained inside the AL implementation and can be queried in - * full. - * - * @param pname name of the attribute to be retrieved - * @param floatdata Buffer to write float to - */ - public static native void alGetListenerf(int pname, FloatBuffer floatdata); + public static native float alGetListenerf(int pname); /** * Listener state is maintained inside the AL implementation and can be queried in @@ -399,23 +351,30 @@ public abstract class CoreAL extends BaseAL implements BaseALConstants { * @param pname name of the attribute to be retrieved * @param floatdata Buffer to write floats to */ - public static native void alGetListenerfv(int pname, FloatBuffer floatdata); + public static void alGetListener(int pname, FloatBuffer floatdata) { + nalGetListenerfv(pname, floatdata, floatdata.position()); + } + private static native void nalGetListenerfv(int pname, FloatBuffer floatdata, int offset); /** * The application requests a number of Sources using GenSources. * - * @param n number of sources to generate * @param sources array holding sources */ - public static native void alGenSources(int n, IntBuffer sources); + public static void alGenSources(IntBuffer sources) { + nalGenSources(sources.remaining(), sources, sources.position()); + } + private static native void nalGenSources(int n, IntBuffer sources, int offset); /** * The application requests deletion of a number of Sources by DeleteSources. * - * @param n Number of sources to delete * @param source Source array to delete from */ - public static native void alDeleteSources(int n, IntBuffer source); + public static void alDeleteSources(IntBuffer source) { + nalDeleteSources(source.remaining(), source, source.position()); + } + private static native void nalDeleteSources(int n, IntBuffer source, int offset); /** * The application can verify whether a source name is valid using the IsSource query. @@ -464,14 +423,15 @@ public abstract class CoreAL extends BaseAL implements BaseALConstants { /** - * Specifies the position and other properties as taken into account during - * sound processing. + * Source state is maintained inside the AL implementation, and the current attributes + * can be queried. The performance of such queries is implementation dependent, no + * performance guarantees are made. * - * @param source source whichs attribute is being set - * @param pname name of the attribute being set - * @param floatdata Buffer to read floats from + * @param source source to get property from + * @param pname name of property + * @return int */ - public static native void alSourcefv(int source, int pname, FloatBuffer floatdata); + public static native int alGetSourcei(int source, int pname); /** * Source state is maintained inside the AL implementation, and the current attributes @@ -480,20 +440,9 @@ public abstract class CoreAL extends BaseAL implements BaseALConstants { * * @param source source to get property from * @param pname name of property - * @param integerdata Buffer to write integer to + * @return float */ - public static native void alGetSourcei(int source, int pname, IntBuffer integerdata); - - /** - * Source state is maintained inside the AL implementation, and the current attributes - * can be queried. The performance of such queries is implementation dependent, no - * performance guarantees are made. - * - * @param source source to get property from - * @param pname name of property - * @param floatdata Buffer to write float to - */ - public static native void alGetSourcef(int source, int pname, FloatBuffer floatdata); + public static native float alGetSourcef(int source, int pname); /** * Source state is maintained inside the AL implementation, and the current attributes @@ -504,7 +453,11 @@ public abstract class CoreAL extends BaseAL implements BaseALConstants { * @param pname property to get * @param floatdata Buffer to write floats to */ - public static native void alGetSourcefv(int source, int pname, FloatBuffer floatdata); + public static void alGetSource(int source, int pname, FloatBuffer floatdata) { + assert floatdata.remaining() > 0; + nalGetSourcefv(source, pname, floatdata, floatdata.position()); + } + private static native void nalGetSourcefv(int source, int pname, FloatBuffer floatdata, int position); /** * Play() applied to an AL_INITIAL Source will promote the Source to AL_PLAYING, thus @@ -516,10 +469,12 @@ public abstract class CoreAL extends BaseAL implements BaseALConstants { * Pause() operation. Play() applied to a AL_STOPPED Source will propagate it to * AL_INITIAL then to AL_PLAYING immediately. * - * @param n number of sources to play * @param sources array of sources to play */ - public static native void alSourcePlayv(int n, IntBuffer sources); + public static void alSourcePlay(int n, IntBuffer sources) { + nalSourcePlayv(sources.remaining(), sources, sources.position()); + } + private static native void nalSourcePlayv(int n, IntBuffer sources, int offset); /** * Pause() applied to an AL_INITIAL Source is a legal NOP. Pause() applied to a @@ -527,10 +482,12 @@ public abstract class CoreAL extends BaseAL implements BaseALConstants { * processing, its current state is preserved. Pause() applied to a AL_PAUSED Source is a * legal NOP. Pause() applied to a AL_STOPPED Source is a legal NOP. * - * @param n number of sources to pause * @param sources array of sources to pause */ - public static native void alSourcePausev(int n, IntBuffer sources); + public static void alSourcePause(IntBuffer sources) { + nalSourcePausev(sources.remaining(), sources, sources.position()); + } + private static native void nalSourcePausev(int n, IntBuffer sources, int offset); /** * Stop() applied to an AL_INITIAL Source is a legal NOP. Stop() applied to a AL_PLAYING @@ -539,10 +496,12 @@ public abstract class CoreAL extends BaseAL implements BaseALConstants { * state to AL_STOPPED, with the same consequences as on a AL_PLAYING Source. Stop() * applied to a AL_STOPPED Source is a legal NOP. * - * @param n number of sources to stop * @param sources array of sources to stop */ - public static native void alSourceStopv(int n, IntBuffer sources); + public static void alSourceStop(IntBuffer sources) { + nalSourceStopv(sources.remaining(), sources, sources.position()); + } + private static native void nalSourceStopv(int n, IntBuffer sources, int offset); /** * Rewind() applied to an AL_INITIAL Source is a legal NOP. Rewind() applied to a @@ -556,7 +515,10 @@ public abstract class CoreAL extends BaseAL implements BaseALConstants { * @param n number of sources to rewind * @param sources array of sources to rewind */ - public static native void alSourceRewindv(int n, IntBuffer sources); + public static void alSourceRewind(IntBuffer sources) { + nalSourceRewindv(sources.remaining(), sources, sources.position()); + } + private static native void nalSourceRewindv(int n, IntBuffer sources, int offset); /** * Play() applied to an AL_INITIAL Source will promote the Source to AL_PLAYING, thus @@ -609,10 +571,12 @@ public abstract class CoreAL extends BaseAL implements BaseALConstants { /** * The application requests a number of Buffers using GenBuffers. * - * @param n number of buffers to generate * @param buffers holding buffers */ - public static native void alGenBuffers(int n, IntBuffer buffers); + public static void alGenBuffers(IntBuffer buffers) { + nalGenBuffers(buffers.remaining(), buffers, buffers.position()); + } + private static native void nalGenBuffers(int n, IntBuffer buffers, int offset); /** *

@@ -628,10 +592,12 @@ public abstract class CoreAL extends BaseAL implements BaseALConstants { * a legal NOP in both scalar and vector forms of the command. The same is true for * unused buffer names, e.g. such as not allocated yet, or as released already. * - * @param n Number of buffers to delete * @param buffers Buffer to delete from */ - public static native void alDeleteBuffers(int n, IntBuffer buffers); + public static void alDeleteBuffers(int n, IntBuffer buffers) { + nalDeleteBuffers(buffers.remaining(), buffers, buffers.position()); + } + private static native void nalDeleteBuffers(int n, IntBuffer buffers, int offset); /** * The application can verify whether a buffer Name is valid using the IsBuffer query. @@ -666,13 +632,22 @@ public abstract class CoreAL extends BaseAL implements BaseALConstants { * @param buffer Buffer to fill * @param format format sound data is in * @param data location of data - * @param size size of data segment * @param freq frequency of data */ - public static native void alBufferData( + public static void alBufferData( int buffer, int format, - ByteBuffer data, + ByteBuffer data, + int size, + int freq) { + // TODO: add an assertion here? + nalBufferData(buffer, format, data, data.position(), data.remaining(), freq); + } + private static native void nalBufferData( + int buffer, + int format, + ByteBuffer data, + int offset, int size, int freq); @@ -683,9 +658,9 @@ public abstract class CoreAL extends BaseAL implements BaseALConstants { * * @param buffer buffer to get property from * @param pname name of property to retrieve - * @param integerdata Buffer to write integer to + * @param int */ - public static native void alGetBufferi(int buffer, int pname, IntBuffer integerdata); + public static native int alGetBufferi(int buffer, int pname); /** * Buffer state is maintained inside the AL implementation and can be queried in full.
@@ -694,9 +669,9 @@ public abstract class CoreAL extends BaseAL implements BaseALConstants { * * @param buffer buffer to get property from * @param pname name of property to retrieve - * @param floatdata Buffer to write float to + * @return float */ - public static native void alGetBufferf(int buffer, int pname, FloatBuffer floatdata); + public static native float alGetBufferf(int buffer, int pname); /** *

@@ -711,10 +686,12 @@ public abstract class CoreAL extends BaseAL implements BaseALConstants { *

* * @param source source to queue buffers onto - * @param n number of buffers to be queued * @param buffers buffers to be queued */ - public static native void alSourceQueueBuffers(int source, int n, IntBuffer buffers); + public static void alSourceQueueBuffers(int source, IntBuffer buffers) { + nalSourceQueueBuffers(source, buffers.remaining(), buffers, buffers.position()); + } + private static native void nalSourceQueueBuffers(int source, int n, IntBuffer buffers, int offset); /** *

@@ -733,10 +710,12 @@ public abstract class CoreAL extends BaseAL implements BaseALConstants { *

* * @param source source to unqueue buffers from - * @param n number of buffers to be unqueued * @param buffers buffers to be unqueued */ - public static native void alSourceUnqueueBuffers(int source, int n, IntBuffer buffers); + public static void alSourceUnqueueBuffers(int source, IntBuffer buffers) { + nalSourceUnqueueBuffers(source, buffers.remaining(), buffers, buffers.position()); + } + private static native void nalSourceUnqueueBuffers(int source, int n, IntBuffer buffers, int offset); /** *

diff --git a/src/native/common/org_lwjgl_openal_ALC.cpp b/src/native/common/org_lwjgl_openal_ALC.cpp index d9b41625..7d8af52a 100644 --- a/src/native/common/org_lwjgl_openal_ALC.cpp +++ b/src/native/common/org_lwjgl_openal_ALC.cpp @@ -92,10 +92,10 @@ JNIEXPORT jstring JNICALL Java_org_lwjgl_openal_ALC_nGetString (JNIEnv *env, jcl * C Specification: * ALvoid alcGetIntegerv(ALCdevice *device, ALenum token, ALsizei size, ALint *dest); */ -JNIEXPORT void JNICALL Java_org_lwjgl_openal_ALC_nGetIntegerv (JNIEnv *env, jclass clazz, jint deviceaddress, jint token, jint size, jobject dest) { +JNIEXPORT void JNICALL Java_org_lwjgl_openal_ALC_nGetIntegerv (JNIEnv *env, jclass clazz, jint deviceaddress, jint token, jint size, jobject dest, int offset) { ALint* address = NULL; if (dest != NULL) { - address = (ALint*) env->GetDirectBufferAddress(dest); + address = offset + (ALint*) env->GetDirectBufferAddress(dest); } alcGetIntegerv((ALCdevice*) deviceaddress, (ALenum) token, (ALsizei) size, address); CHECK_ALC_ERROR diff --git a/src/native/common/org_lwjgl_openal_ALC.h b/src/native/common/org_lwjgl_openal_ALC.h index e955b1c9..6515b359 100644 --- a/src/native/common/org_lwjgl_openal_ALC.h +++ b/src/native/common/org_lwjgl_openal_ALC.h @@ -1,35 +1,3 @@ -/* - * Copyright (c) 2002 Lightweight Java Game Library Project - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * * Neither the name of 'Lightweight Java Game Library' nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - /* DO NOT EDIT THIS FILE - it is machine generated */ #include /* Header for class org_lwjgl_openal_ALC */ @@ -105,10 +73,10 @@ JNIEXPORT jstring JNICALL Java_org_lwjgl_openal_ALC_nGetString /* * Class: org_lwjgl_openal_ALC * Method: nGetIntegerv - * Signature: (IIILjava/nio/Buffer;)V + * Signature: (IIILjava/nio/Buffer;I)V */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_ALC_nGetIntegerv - (JNIEnv *, jclass, jint, jint, jint, jobject); + (JNIEnv *, jclass, jint, jint, jint, jobject, jint); /* * Class: org_lwjgl_openal_ALC @@ -129,7 +97,7 @@ JNIEXPORT void JNICALL Java_org_lwjgl_openal_ALC_alcCloseDevice /* * Class: org_lwjgl_openal_ALC * Method: alcCreateContext - * Signature: (ILjava/nio/Buffer;)Lorg/lwjgl/openal/ALCcontext; + * Signature: (ILjava/nio/IntBuffer;)Lorg/lwjgl/openal/ALCcontext; */ JNIEXPORT jobject JNICALL Java_org_lwjgl_openal_ALC_alcCreateContext (JNIEnv *, jclass, jint, jobject); diff --git a/src/native/common/org_lwjgl_openal_CoreAL.cpp b/src/native/common/org_lwjgl_openal_CoreAL.cpp index 50c13345..d7802efc 100644 --- a/src/native/common/org_lwjgl_openal_CoreAL.cpp +++ b/src/native/common/org_lwjgl_openal_CoreAL.cpp @@ -132,60 +132,14 @@ JNIEXPORT jfloat JNICALL Java_org_lwjgl_openal_CoreAL_alGetFloat (JNIEnv *env, j return result; } -/** - * This function returns a double precision floating point OpenAL state. - * - * C Specification: - * Aldouble alGetDouble(ALenum pname); - */ -JNIEXPORT jdouble JNICALL Java_org_lwjgl_openal_CoreAL_alGetDouble (JNIEnv *env, jclass clazz, jint pname) { - jdouble result = (jdouble) alGetDouble((ALenum) pname); - - CHECK_AL_ERROR - return result; -} - -/** - * This function retrieves a boolean OpenAL state. - * - * C Specification: - * ALvoid alGetBooleanv(ALenum pname,ALboolean *data); - */ -JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_alGetBooleanv (JNIEnv *env, jclass clazz, jint pname, jobject data) { - alGetBooleanv((ALenum) pname, (ALboolean*) env->GetDirectBufferAddress(data)); - CHECK_AL_ERROR -} - -/** - * This function retrieves an integer OpenAL state. - * - * C Specification: - * ALvoid alGetIntegerv(ALenum pname,ALint *data); - */ -JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_alGetIntegerv (JNIEnv *env, jclass clazz, jint pname, jobject data) { - alGetIntegerv((ALenum) pname, (ALint*) env->GetDirectBufferAddress(data)); - CHECK_AL_ERROR -} - /** * This function retrieves a floating point OpenAL state. * * C Specification: * ALvoid alGetFloatv(ALenum pname,ALfloat *data); */ -JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_alGetFloatv (JNIEnv *env, jclass clazz, jint pname, jobject data) { - alGetFloatv((ALenum) pname, (ALfloat*) env->GetDirectBufferAddress(data)); - CHECK_AL_ERROR -} - -/** - * This function retrieves a double precision floating point OpenAL state. - * - * C Specification: - * ALvoid alGetDoublev(ALenum pname,ALdouble *data); - */ -JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_alGetDoublev (JNIEnv *env, jclass clazz, jint pname, jobject data) { - alGetDoublev((ALenum) pname, (ALdouble*) env->GetDirectBufferAddress(data)); +JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_nalGetFloatv (JNIEnv *env, jclass clazz, jint pname, jobject data, int offset) { + alGetFloatv((ALenum) pname, offset + (ALfloat*) env->GetDirectBufferAddress(data)); CHECK_AL_ERROR } @@ -210,7 +164,8 @@ JNIEXPORT jstring JNICALL Java_org_lwjgl_openal_CoreAL_alGetString (JNIEnv *env, JNIEXPORT jint JNICALL Java_org_lwjgl_openal_CoreAL_alGetError (JNIEnv *env, jclass clazz) { jint result = (jint) alGetError(); - CHECK_AL_ERROR + // Don't think we should be checking for errors here..? +// CHECK_AL_ERROR return result; } @@ -277,16 +232,6 @@ JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_alListener3f (JNIEnv *env, j CHECK_AL_ERROR } -/** - * This function sets a floating point-vector property of the listener. - * - * C Specification: - * ALvoid alListenerfv(ALenum pname,ALfloat *values); - */ -JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_alListenerfv (JNIEnv *env, jclass clazz, jint pname, jobject values) { - alListenerfv((ALenum) pname, (ALfloat*) env->GetDirectBufferAddress(values)); - CHECK_AL_ERROR -} /** * This function retrieves an integer property of the listener. @@ -294,9 +239,11 @@ JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_alListenerfv (JNIEnv *env, j * C Specification: * ALvoid alGetListeneri(ALenum pname,ALint *value); */ -JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_alGetListeneri (JNIEnv *env, jclass clazz, jint pname, jobject value) { - alGetListeneri((ALenum) pname, (ALint*) env->GetDirectBufferAddress(value)); +JNIEXPORT jint JNICALL Java_org_lwjgl_openal_CoreAL_alGetListeneri (JNIEnv *env, jclass clazz, jint pname) { + ALint value = 0; + alGetListeneri((ALenum) pname, &value); CHECK_AL_ERROR + return value; } /** @@ -305,9 +252,11 @@ JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_alGetListeneri (JNIEnv *env, * C Specification: * ALvoid alGetListenerf(ALenum pname,ALfloat *value); */ -JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_alGetListenerf (JNIEnv *env, jclass clazz, jint pname, jobject value) { - alGetListenerf((ALenum) pname, (ALfloat*) env->GetDirectBufferAddress(value)); +JNIEXPORT jfloat JNICALL Java_org_lwjgl_openal_CoreAL_alGetListenerf (JNIEnv *env, jclass clazz, jint pname) { + ALfloat value = 0.0f; + alGetListenerf((ALenum) pname, &value); CHECK_AL_ERROR + return value; } /** @@ -316,8 +265,8 @@ JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_alGetListenerf (JNIEnv *env, * C Specification: * ALvoid alGetListenerfv(ALenum pname,ALfloat *values); */ -JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_alGetListenerfv (JNIEnv *env, jclass clazz, jint pname, jobject values) { - alGetListenerfv((ALenum) pname, (ALfloat*) env->GetDirectBufferAddress(values)); +JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_nalGetListenerfv (JNIEnv *env, jclass clazz, jint pname, jobject values, jint offset) { + alGetListenerfv((ALenum) pname, offset + (ALfloat*) env->GetDirectBufferAddress(values)); CHECK_AL_ERROR } @@ -327,8 +276,8 @@ JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_alGetListenerfv (JNIEnv *env * C Specification: * ALvoid alGenSources(ALsizei n,ALuint *sources); */ -JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_alGenSources (JNIEnv *env, jclass clazz, jint n, jobject sources) { - alGenSources(n, (ALuint*) env->GetDirectBufferAddress(sources)); +JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_nalGenSources (JNIEnv *env, jclass clazz, jint n, jobject sources, int offset) { + alGenSources(n, offset + (ALuint*) env->GetDirectBufferAddress(sources)); CHECK_AL_ERROR } @@ -338,8 +287,8 @@ JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_alGenSources (JNIEnv *env, j * C Specification: * ALvoid alDeleteSources(ALsizei n,ALuint *sources); */ -JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_alDeleteSources (JNIEnv *env, jclass clazz, jint n, jobject sources) { - alDeleteSources(n, (ALuint*) env->GetDirectBufferAddress(sources)); +JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_nalDeleteSources (JNIEnv *env, jclass clazz, jint n, jobject sources, int offset) { + alDeleteSources(n, offset + (ALuint*) env->GetDirectBufferAddress(sources)); CHECK_AL_ERROR } @@ -388,25 +337,17 @@ JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_alSource3f (JNIEnv *env, jcl CHECK_AL_ERROR } -/** - * This function sets a floating point-vector property of a source. - * - * C Specification: - * ALvoid alSourcefv(ALuint source,ALenum pname,ALfloat *values); - */ -JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_alSourcefv (JNIEnv *env, jclass clazz, jint source, jint pname, jobject values) { - alSourcefv((ALuint) source, (ALenum) pname, (ALfloat*) env->GetDirectBufferAddress(values)); - CHECK_AL_ERROR -} /** * This function retrieves an integer property of a source. * C Specification: * ALvoid alGetSourcei(ALuint source,ALenum pname,ALint *value); */ -JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_alGetSourcei (JNIEnv *env, jclass clazz, jint source, jint pname, jobject value) { - alGetSourcei((ALuint) source, (ALenum) pname, (ALint*) env->GetDirectBufferAddress(value)); +JNIEXPORT jint JNICALL Java_org_lwjgl_openal_CoreAL_alGetSourcei (JNIEnv *env, jclass clazz, jint source, jint pname) { + ALint value = 0; + alGetSourcei((ALuint) source, (ALenum) pname, &value); CHECK_AL_ERROR + return value; } /** @@ -415,9 +356,11 @@ JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_alGetSourcei (JNIEnv *env, j * C Specification: * ALvoid alGetSourcef(ALuint source,ALenum pname,ALfloat *value); */ -JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_alGetSourcef (JNIEnv *env, jclass clazz, jint source, jint pname, jobject value) { - alGetSourcef((ALuint) source, (ALenum) pname, (ALfloat*) env->GetDirectBufferAddress(value)); +JNIEXPORT jfloat JNICALL Java_org_lwjgl_openal_CoreAL_alGetSourcef (JNIEnv *env, jclass clazz, jint source, jint pname) { + ALfloat value = 0.0f; + alGetSourcef((ALuint) source, (ALenum) pname, &value); CHECK_AL_ERROR + return value; } /** @@ -426,8 +369,8 @@ JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_alGetSourcef (JNIEnv *env, j * C Specification: * ALvoid alGetSourcefv(ALuint source,ALenum pname,ALfloat *values); */ -JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_alGetSourcefv (JNIEnv *env, jclass clazz, jint source, jint pname, jobject values) { - alGetSourcefv((ALuint) source, (ALenum) pname, (ALfloat*) env->GetDirectBufferAddress(values)); +JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_nalGetSourcefv (JNIEnv *env, jclass clazz, jint source, jint pname, jobject values, jint offset) { + alGetSourcefv((ALuint) source, (ALenum) pname, offset + (ALfloat*) env->GetDirectBufferAddress(values)); CHECK_AL_ERROR } @@ -437,8 +380,8 @@ JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_alGetSourcefv (JNIEnv *env, * C Specification: * ALvoid alSourcePlayv(ALsizei n,ALuint *sources); */ -JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_alSourcePlayv (JNIEnv *env, jclass clazz, jint n, jobject sources) { - alSourcePlayv(n, (ALuint*) env->GetDirectBufferAddress(sources)); +JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_nalSourcePlayv (JNIEnv *env, jclass clazz, jint n, jobject sources, jint offset) { + alSourcePlayv(n, offset + (ALuint*) env->GetDirectBufferAddress(sources)); CHECK_AL_ERROR } @@ -448,8 +391,8 @@ JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_alSourcePlayv (JNIEnv *env, * C Specification: * ALvoid alSourcePausev(ALsizei n,ALuint *sources); */ -JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_alSourcePausev (JNIEnv *env, jclass clazz, jint n, jobject sources) { - alSourcePausev(n, (ALuint*) env->GetDirectBufferAddress(sources)); +JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_nalSourcePausev (JNIEnv *env, jclass clazz, jint n, jobject sources, jint offset) { + alSourcePausev(n, offset + (ALuint*) env->GetDirectBufferAddress(sources)); CHECK_AL_ERROR } @@ -459,8 +402,8 @@ JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_alSourcePausev (JNIEnv *env, * C Specification: * ALvoid alSourceStopv(ALsizei n,ALuint *sources); */ -JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_alSourceStopv (JNIEnv *env, jclass clazz, jint n, jobject sources) { - alSourceStopv(n, (ALuint*) env->GetDirectBufferAddress(sources)); +JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_nalSourceStopv (JNIEnv *env, jclass clazz, jint n, jobject sources, jint offset) { + alSourceStopv(n, offset + (ALuint*) env->GetDirectBufferAddress(sources)); CHECK_AL_ERROR } @@ -470,8 +413,8 @@ JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_alSourceStopv (JNIEnv *env, * C Specification: * ALvoid alSourceRewindv(ALsizei n,ALuint *sources); */ -JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_alSourceRewindv (JNIEnv *env, jclass clazz, jint n, jobject sources) { - alSourceRewindv(n, (ALuint*) env->GetDirectBufferAddress(sources)); +JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_nalSourceRewindv (JNIEnv *env, jclass clazz, jint n, jobject sources, jint offset) { + alSourceRewindv(n, offset + (ALuint*) env->GetDirectBufferAddress(sources)); CHECK_AL_ERROR } @@ -525,8 +468,8 @@ JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_alSourceRewind (JNIEnv *env, * C Specification: * ALvoid alGenBuffers(ALsizei n,ALuint *buffers); */ -JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_alGenBuffers (JNIEnv *env, jclass clazz, jint n, jobject buffers) { - alGenBuffers(n, (ALuint*) env->GetDirectBufferAddress(buffers)); +JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_nalGenBuffers (JNIEnv *env, jclass clazz, jint n, jobject buffers, jint offset) { + alGenBuffers(n, offset + (ALuint*) env->GetDirectBufferAddress(buffers)); CHECK_AL_ERROR } @@ -536,8 +479,8 @@ JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_alGenBuffers (JNIEnv *env, j * C Specification: * ALvoid alDeleteBuffers(ALsizei n,ALuint *buffers); */ -JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_alDeleteBuffers (JNIEnv *env, jclass clazz, jint n, jobject buffers) { - alDeleteBuffers(n, (ALuint*) env->GetDirectBufferAddress(buffers)); +JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_nalDeleteBuffers (JNIEnv *env, jclass clazz, jint n, jobject buffers, jint offset) { + alDeleteBuffers(n, offset + (ALuint*) env->GetDirectBufferAddress(buffers)); CHECK_AL_ERROR } @@ -560,8 +503,8 @@ JNIEXPORT jboolean JNICALL Java_org_lwjgl_openal_CoreAL_alIsBuffer (JNIEnv *env, * C Specification: * ALvoid alBufferData(ALuint buffer,ALenum format,ALvoid *data,ALsizei size,ALsizei freq); */ -JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_alBufferData (JNIEnv *env, jclass clazz, jint buffer, jint format, jobject data, jint size, jint freq) { - alBufferData(buffer, format, (void**) env->GetDirectBufferAddress(data), size, freq); +JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_alBufferData (JNIEnv *env, jclass clazz, jint buffer, jint format, jobject data, int offset, jint size, jint freq) { + alBufferData(buffer, format, (void*) (offset + (ALubyte *)env->GetDirectBufferAddress(data)), size, freq); CHECK_AL_ERROR } @@ -571,9 +514,11 @@ JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_alBufferData (JNIEnv *env, j * C Specification: * ALvoid alGetBufferi(ALuint buffer,ALenum pname,ALint *value); */ -JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_alGetBufferi (JNIEnv *env, jclass clazz, jint buffer, jint pname, jobject value) { - alGetBufferi((ALuint) buffer, (ALenum) pname, (ALint*) env->GetDirectBufferAddress(value)); +JNIEXPORT jint JNICALL Java_org_lwjgl_openal_CoreAL_alGetBufferi (JNIEnv *env, jclass clazz, jint buffer, jint pname) { + ALint value = 0; + alGetBufferi((ALuint) buffer, (ALenum) pname, &value); CHECK_AL_ERROR + return value; } /** @@ -582,9 +527,11 @@ JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_alGetBufferi (JNIEnv *env, j * C Specification: * ALvoid alGetBufferf(ALuint buffer,ALenum pname,ALfloat *value); */ -JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_alGetBufferf (JNIEnv *env, jclass clazz, jint buffer, jint pname, jobject value) { - alGetBufferf((ALuint) buffer, (ALenum) pname, (ALfloat*) env->GetDirectBufferAddress(value)); +JNIEXPORT jfloat JNICALL Java_org_lwjgl_openal_CoreAL_alGetBufferf (JNIEnv *env, jclass clazz, jint buffer, jint pname) { + ALfloat value = 0.0f; + alGetBufferf((ALuint) buffer, (ALenum) pname, &value); CHECK_AL_ERROR + return value; } /** @@ -593,8 +540,8 @@ JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_alGetBufferf (JNIEnv *env, j * C Specification: * ALvoid alSourceQueueBuffers( ALuint source, ALsizei n, ALuint* buffers ); */ -JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_alSourceQueueBuffers (JNIEnv *env, jclass clazz, jint source, jint n, jobject buffers) { - alSourceQueueBuffers((ALuint) source, (ALsizei) n, (ALuint*) env->GetDirectBufferAddress(buffers)); +JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_nalSourceQueueBuffers (JNIEnv *env, jclass clazz, jint source, jint n, jobject buffers, jint offset) { + alSourceQueueBuffers((ALuint) source, (ALsizei) n, offset + (ALuint*) env->GetDirectBufferAddress(buffers)); CHECK_AL_ERROR } @@ -604,8 +551,8 @@ JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_alSourceQueueBuffers (JNIEnv * C Specification: * ALvoid alSourceUnqueueBuffers( ALuint source, ALsizei n, ALuint* buffers ); */ -JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_alSourceUnqueueBuffers (JNIEnv *env, jclass clazz, jint source, jint n, jobject buffers) { - alSourceUnqueueBuffers((ALuint) source, (ALsizei) n, (ALuint*) env->GetDirectBufferAddress(buffers)); +JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_nalSourceUnqueueBuffers (JNIEnv *env, jclass clazz, jint source, jint n, jobject buffers, jint offset) { + alSourceUnqueueBuffers((ALuint) source, (ALsizei) n, offset + (ALuint*) env->GetDirectBufferAddress(buffers)); CHECK_AL_ERROR } diff --git a/src/native/common/org_lwjgl_openal_CoreAL.h b/src/native/common/org_lwjgl_openal_CoreAL.h index 9e21150c..77f93ddd 100644 --- a/src/native/common/org_lwjgl_openal_CoreAL.h +++ b/src/native/common/org_lwjgl_openal_CoreAL.h @@ -1,35 +1,3 @@ -/* - * Copyright (c) 2002 Lightweight Java Game Library Project - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * * Neither the name of 'Lightweight Java Game Library' nor the names of - * its contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED - * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - /* DO NOT EDIT THIS FILE - it is machine generated */ #include /* Header for class org_lwjgl_openal_CoreAL */ @@ -42,6 +10,8 @@ extern "C" { /* Inaccessible static: created */ /* Inaccessible static: class_000240 */ /* Inaccessible static: class_000241 */ +/* Inaccessible static: _00024assertionsDisabled */ +/* Inaccessible static: class_000240 */ /* * Class: org_lwjgl_openal_CoreAL * Method: alEnable @@ -100,43 +70,27 @@ JNIEXPORT jfloat JNICALL Java_org_lwjgl_openal_CoreAL_alGetFloat /* * Class: org_lwjgl_openal_CoreAL - * Method: alGetDouble - * Signature: (I)D + * Method: nalGetBooleanv + * Signature: (ILjava/nio/ByteBuffer;I)V */ -JNIEXPORT jdouble JNICALL Java_org_lwjgl_openal_CoreAL_alGetDouble - (JNIEnv *, jclass, jint); +JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_nalGetBooleanv + (JNIEnv *, jclass, jint, jobject, jint); /* * Class: org_lwjgl_openal_CoreAL - * Method: alGetBooleanv - * Signature: (ILjava/nio/Buffer;)V + * Method: nalGetIntegerv + * Signature: (ILjava/nio/IntBuffer;I)V */ -JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_alGetBooleanv - (JNIEnv *, jclass, jint, jobject); +JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_nalGetIntegerv + (JNIEnv *, jclass, jint, jobject, jint); /* * Class: org_lwjgl_openal_CoreAL - * Method: alGetIntegerv - * Signature: (ILjava/nio/Buffer;)V + * Method: nalGetFloatv + * Signature: (ILjava/nio/FloatBuffer;I)V */ -JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_alGetIntegerv - (JNIEnv *, jclass, jint, jobject); - -/* - * Class: org_lwjgl_openal_CoreAL - * Method: alGetFloatv - * Signature: (ILjava/nio/Buffer;)V - */ -JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_alGetFloatv - (JNIEnv *, jclass, jint, jobject); - -/* - * Class: org_lwjgl_openal_CoreAL - * Method: alGetDoublev - * Signature: (ILjava/nio/Buffer;)V - */ -JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_alGetDoublev - (JNIEnv *, jclass, jint, jobject); +JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_nalGetFloatv + (JNIEnv *, jclass, jint, jobject, jint); /* * Class: org_lwjgl_openal_CoreAL @@ -188,59 +142,51 @@ JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_alListenerf /* * Class: org_lwjgl_openal_CoreAL - * Method: listener3f + * Method: alListener3f * Signature: (IFFF)V */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_alListener3f (JNIEnv *, jclass, jint, jfloat, jfloat, jfloat); -/* - * Class: org_lwjgl_openal_CoreAL - * Method: alListenerfv - * Signature: (ILjava/nio/Buffer;)V - */ -JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_alListenerfv - (JNIEnv *, jclass, jint, jobject); - /* * Class: org_lwjgl_openal_CoreAL * Method: alGetListeneri - * Signature: (ILjava/nio/Buffer;)V + * Signature: (I)I */ -JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_alGetListeneri - (JNIEnv *, jclass, jint, jobject); +JNIEXPORT jint JNICALL Java_org_lwjgl_openal_CoreAL_alGetListeneri + (JNIEnv *, jclass, jint); /* * Class: org_lwjgl_openal_CoreAL * Method: alGetListenerf - * Signature: (ILjava/nio/Buffer;)V + * Signature: (I)F */ -JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_alGetListenerf - (JNIEnv *, jclass, jint, jobject); +JNIEXPORT jfloat JNICALL Java_org_lwjgl_openal_CoreAL_alGetListenerf + (JNIEnv *, jclass, jint); /* * Class: org_lwjgl_openal_CoreAL - * Method: alGetListenerfv - * Signature: (ILjava/nio/Buffer;)V + * Method: nalGetListenerfv + * Signature: (ILjava/nio/FloatBuffer;I)V */ -JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_alGetListenerfv - (JNIEnv *, jclass, jint, jobject); +JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_nalGetListenerfv + (JNIEnv *, jclass, jint, jobject, jint); /* * Class: org_lwjgl_openal_CoreAL - * Method: alGenSources - * Signature: (ILjava/nio/Buffer;)V + * Method: nalGenSources + * Signature: (ILjava/nio/IntBuffer;I)V */ -JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_alGenSources - (JNIEnv *, jclass, jint, jobject); +JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_nalGenSources + (JNIEnv *, jclass, jint, jobject, jint); /* * Class: org_lwjgl_openal_CoreAL - * Method: alDeleteSources - * Signature: (ILjava/nio/Buffer;)V + * Method: nalDeleteSources + * Signature: (ILjava/nio/IntBuffer;I)V */ -JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_alDeleteSources - (JNIEnv *, jclass, jint, jobject); +JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_nalDeleteSources + (JNIEnv *, jclass, jint, jobject, jint); /* * Class: org_lwjgl_openal_CoreAL @@ -265,78 +211,70 @@ JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_alSourcei */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_alSourcef (JNIEnv *, jclass, jint, jint, jfloat); - -/* - * Class: org_lwjgl_openal_CoreAL - * Method: source3f - * Signature: (IIFFF)V - */ -JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_alSource3f - (JNIEnv *, jclass, jint, jint, jfloat, jfloat, jfloat); /* * Class: org_lwjgl_openal_CoreAL - * Method: alSourcefv - * Signature: (IILjava/nio/Buffer;)V + * Method: alSource3f + * Signature: (IIFFF)V */ -JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_alSourcefv - (JNIEnv *, jclass, jint, jint, jobject); +JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_alSource3f + (JNIEnv *, jclass, jint, jint, jfloat, jfloat, jfloat); /* * Class: org_lwjgl_openal_CoreAL * Method: alGetSourcei - * Signature: (IILjava/nio/Buffer;)V + * Signature: (II)I */ -JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_alGetSourcei - (JNIEnv *, jclass, jint, jint, jobject); +JNIEXPORT jint JNICALL Java_org_lwjgl_openal_CoreAL_alGetSourcei + (JNIEnv *, jclass, jint, jint); /* * Class: org_lwjgl_openal_CoreAL * Method: alGetSourcef - * Signature: (IILjava/nio/Buffer;)V + * Signature: (II)F */ -JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_alGetSourcef - (JNIEnv *, jclass, jint, jint, jobject); +JNIEXPORT jfloat JNICALL Java_org_lwjgl_openal_CoreAL_alGetSourcef + (JNIEnv *, jclass, jint, jint); /* * Class: org_lwjgl_openal_CoreAL - * Method: alGetSourcefv - * Signature: (IILjava/nio/Buffer;)V + * Method: nalGetSourcefv + * Signature: (IILjava/nio/FloatBuffer;I)V */ -JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_alGetSourcefv - (JNIEnv *, jclass, jint, jint, jobject); +JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_nalGetSourcefv + (JNIEnv *, jclass, jint, jint, jobject, jint); /* * Class: org_lwjgl_openal_CoreAL - * Method: alSourcePlayv - * Signature: (ILjava/nio/Buffer;)V + * Method: nalSourcePlayv + * Signature: (ILjava/nio/IntBuffer;I)V */ -JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_alSourcePlayv - (JNIEnv *, jclass, jint, jobject); +JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_nalSourcePlayv + (JNIEnv *, jclass, jint, jobject, jint); /* * Class: org_lwjgl_openal_CoreAL - * Method: alSourcePausev - * Signature: (ILjava/nio/Buffer;)V + * Method: nalSourcePausev + * Signature: (ILjava/nio/IntBuffer;I)V */ -JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_alSourcePausev - (JNIEnv *, jclass, jint, jobject); +JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_nalSourcePausev + (JNIEnv *, jclass, jint, jobject, jint); /* * Class: org_lwjgl_openal_CoreAL - * Method: alSourceStopv - * Signature: (ILjava/nio/Buffer;)V + * Method: nalSourceStopv + * Signature: (ILjava/nio/IntBuffer;I)V */ -JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_alSourceStopv - (JNIEnv *, jclass, jint, jobject); +JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_nalSourceStopv + (JNIEnv *, jclass, jint, jobject, jint); /* * Class: org_lwjgl_openal_CoreAL - * Method: alSourceRewindv - * Signature: (ILjava/nio/Buffer;)V + * Method: nalSourceRewindv + * Signature: (ILjava/nio/IntBuffer;I)V */ -JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_alSourceRewindv - (JNIEnv *, jclass, jint, jobject); +JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_nalSourceRewindv + (JNIEnv *, jclass, jint, jobject, jint); /* * Class: org_lwjgl_openal_CoreAL @@ -372,19 +310,19 @@ JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_alSourceRewind /* * Class: org_lwjgl_openal_CoreAL - * Method: alGenBuffers - * Signature: (ILjava/nio/Buffer;)V + * Method: nalGenBuffers + * Signature: (ILjava/nio/IntBuffer;I)V */ -JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_alGenBuffers - (JNIEnv *, jclass, jint, jobject); +JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_nalGenBuffers + (JNIEnv *, jclass, jint, jobject, jint); /* * Class: org_lwjgl_openal_CoreAL - * Method: alDeleteBuffers - * Signature: (ILjava/nio/Buffer;)V + * Method: nalDeleteBuffers + * Signature: (ILjava/nio/IntBuffer;I)V */ -JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_alDeleteBuffers - (JNIEnv *, jclass, jint, jobject); +JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_nalDeleteBuffers + (JNIEnv *, jclass, jint, jobject, jint); /* * Class: org_lwjgl_openal_CoreAL @@ -396,43 +334,43 @@ JNIEXPORT jboolean JNICALL Java_org_lwjgl_openal_CoreAL_alIsBuffer /* * Class: org_lwjgl_openal_CoreAL - * Method: alBufferData - * Signature: (IILjava/nio/Buffer;II)V + * Method: nalBufferData + * Signature: (IILjava/nio/ByteBuffer;III)V */ -JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_alBufferData - (JNIEnv *, jclass, jint, jint, jobject, jint, jint); +JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_nalBufferData + (JNIEnv *, jclass, jint, jint, jobject, jint, jint, jint); /* * Class: org_lwjgl_openal_CoreAL * Method: alGetBufferi - * Signature: (IILjava/nio/Buffer;)V + * Signature: (II)I */ -JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_alGetBufferi - (JNIEnv *, jclass, jint, jint, jobject); +JNIEXPORT jint JNICALL Java_org_lwjgl_openal_CoreAL_alGetBufferi + (JNIEnv *, jclass, jint, jint); /* * Class: org_lwjgl_openal_CoreAL * Method: alGetBufferf - * Signature: (IILjava/nio/Buffer;)V + * Signature: (II)F */ -JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_alGetBufferf - (JNIEnv *, jclass, jint, jint, jobject); +JNIEXPORT jfloat JNICALL Java_org_lwjgl_openal_CoreAL_alGetBufferf + (JNIEnv *, jclass, jint, jint); /* * Class: org_lwjgl_openal_CoreAL - * Method: alSourceQueueBuffers - * Signature: (IILjava/nio/Buffer;)V + * Method: nalSourceQueueBuffers + * Signature: (IILjava/nio/IntBuffer;I)V */ -JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_alSourceQueueBuffers - (JNIEnv *, jclass, jint, jint, jobject); +JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_nalSourceQueueBuffers + (JNIEnv *, jclass, jint, jint, jobject, jint); /* * Class: org_lwjgl_openal_CoreAL - * Method: alSourceUnqueueBuffers - * Signature: (IILjava/nio/Buffer;)V + * Method: nalSourceUnqueueBuffers + * Signature: (IILjava/nio/IntBuffer;I)V */ -JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_alSourceUnqueueBuffers - (JNIEnv *, jclass, jint, jint, jobject); +JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_nalSourceUnqueueBuffers + (JNIEnv *, jclass, jint, jint, jobject, jint); /* * Class: org_lwjgl_openal_CoreAL