You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(134) |
Sep
(52) |
Oct
(13) |
Nov
(342) |
Dec
(163) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(44) |
Feb
(62) |
Mar
(158) |
Apr
(38) |
May
(70) |
Jun
(58) |
Jul
(104) |
Aug
(207) |
Sep
(83) |
Oct
(122) |
Nov
(23) |
Dec
(49) |
| 2004 |
Jan
(119) |
Feb
(132) |
Mar
(192) |
Apr
(140) |
May
(77) |
Jun
(74) |
Jul
(201) |
Aug
(63) |
Sep
(102) |
Oct
(70) |
Nov
(173) |
Dec
(78) |
| 2005 |
Jan
(174) |
Feb
(197) |
Mar
(105) |
Apr
(59) |
May
(77) |
Jun
(43) |
Jul
(21) |
Aug
(18) |
Sep
(47) |
Oct
(37) |
Nov
(74) |
Dec
(50) |
| 2006 |
Jan
(44) |
Feb
(19) |
Mar
(32) |
Apr
(24) |
May
(31) |
Jun
(55) |
Jul
(138) |
Aug
(28) |
Sep
(12) |
Oct
(41) |
Nov
(58) |
Dec
(24) |
| 2007 |
Jan
(28) |
Feb
(14) |
Mar
(10) |
Apr
(68) |
May
(30) |
Jun
(26) |
Jul
(18) |
Aug
(63) |
Sep
(19) |
Oct
(29) |
Nov
(20) |
Dec
(10) |
| 2008 |
Jan
(38) |
Feb
(7) |
Mar
(37) |
Apr
(120) |
May
(41) |
Jun
(36) |
Jul
(39) |
Aug
(24) |
Sep
(28) |
Oct
(30) |
Nov
(36) |
Dec
(75) |
| 2009 |
Jan
(46) |
Feb
(22) |
Mar
(50) |
Apr
(70) |
May
(134) |
Jun
(105) |
Jul
(75) |
Aug
(34) |
Sep
(38) |
Oct
(34) |
Nov
(19) |
Dec
(20) |
| 2010 |
Jan
(11) |
Feb
(20) |
Mar
(65) |
Apr
(83) |
May
(104) |
Jun
(73) |
Jul
(78) |
Aug
(57) |
Sep
(43) |
Oct
(35) |
Nov
(9) |
Dec
(4) |
| 2011 |
Jan
(21) |
Feb
(11) |
Mar
(18) |
Apr
(10) |
May
(18) |
Jun
(15) |
Jul
(48) |
Aug
(25) |
Sep
(17) |
Oct
(45) |
Nov
(15) |
Dec
(12) |
| 2012 |
Jan
(21) |
Feb
(9) |
Mar
(12) |
Apr
(9) |
May
(9) |
Jun
(5) |
Jul
(1) |
Aug
(10) |
Sep
(12) |
Oct
(1) |
Nov
(28) |
Dec
(5) |
| 2013 |
Jan
(4) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2014 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
| 2015 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
| 2016 |
Jan
(2) |
Feb
(1) |
Mar
(1) |
Apr
(1) |
May
(2) |
Jun
|
Jul
(1) |
Aug
(2) |
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
1
|
2
|
3
|
4
(1) |
5
|
6
|
7
|
|
8
|
9
|
10
|
11
(7) |
12
(5) |
13
|
14
(10) |
|
15
(5) |
16
|
17
(2) |
18
(12) |
19
(7) |
20
(19) |
21
(42) |
|
22
(19) |
23
(4) |
24
(1) |
25
|
26
|
27
|
28
(1) |
|
29
|
30
(28) |
31
|
|
|
|
|
|
From: Elias N. <eli...@us...> - 2002-12-14 15:23:56
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/win32 In directory sc8-pr-cvs1:/tmp/cvs-serv13855/win32 Modified Files: org_lwjgl_Display.cpp Log Message: Added a standard system error output Index: org_lwjgl_Display.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/win32/org_lwjgl_Display.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/win32/org_lwjgl_Display.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- org_lwjgl_Display.cpp 24 Nov 2002 17:12:36 -0000 1.7 +++ org_lwjgl_Display.cpp 14 Dec 2002 15:23:53 -0000 1.8 @@ -53,7 +53,24 @@ bool oneShotInitialised = false; HWND hwnd = NULL; // Handle to the window HDC hdc = NULL; // Device context -LPDIRECTINPUT lpdi = NULL; +LPDIRECTINPUT lpdi = NULL; + +void dumpLastError(void) { + LPVOID lpMsgBuf; + FormatMessage( + FORMAT_MESSAGE_ALLOCATE_BUFFER | + FORMAT_MESSAGE_FROM_SYSTEM | + FORMAT_MESSAGE_IGNORE_INSERTS, + NULL, + GetLastError(), + 0, // Default language + (LPTSTR) &lpMsgBuf, + 0, + NULL + ); + printf("System error: %s\n", lpMsgBuf); + LocalFree(lpMsgBuf); +} /* * A dummy WindowProc which does nothing. Used so we can have an invisible OpenGL window @@ -178,16 +195,14 @@ { #ifdef _DEBUG printf("Creating display: size %dx%d %dhz %dbpp...\n", width, height, freq, bpp); -#endif - +#endif if (fullscreen && SetDisplayMode(width, height, bpp, freq) != 1) return JNI_FALSE; /* Register a window. This window does nothing, it's just a requirement that we get a handle to it so we can do other things - */ - + */ if (!oneShotInitialised) { WNDCLASS windowClass; @@ -203,9 +218,10 @@ windowClass.lpszClassName = WINDOWCLASSNAME; if (RegisterClass(&windowClass) == 0) { + dumpLastError(); printf("Failed to register window class\n"); return JNI_FALSE; - } + } oneShotInitialised = true; } |
|
From: Elias N. <eli...@us...> - 2002-12-14 13:52:28
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common In directory sc8-pr-cvs1:/tmp/cvs-serv23384/common Modified Files: extal.h Log Message: Even more linux oal fixes Index: extal.h CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/extal.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/extal.h,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- extal.h 14 Dec 2002 13:44:55 -0000 1.11 +++ extal.h 14 Dec 2002 13:52:25 -0000 1.12 @@ -53,6 +53,9 @@ #define ALCAPI __declspec(dllimport) #endif + typedef struct ALCdevice_struct ALCdevice; + typedef struct ALCcontext_struct ALCcontext; + #define ALCAPIENTRY __cdecl #else #ifdef TARGET_OS_MAC @@ -62,6 +65,40 @@ #endif #define ALCAPI #define ALCAPIENTRY + +/** ALC boolean type. */ +typedef char ALCboolean; + +/** ALC 8bit signed byte. */ +typedef char ALCbyte; + +/** ALC 8bit unsigned byte. */ +typedef unsigned char ALCubyte; + +/** ALC 16bit signed short integer type. */ +typedef short ALCshort; + +/** ALC 16bit unsigned short integer type. */ +typedef unsigned short ALCushort; + +/** ALC 32bit unsigned integer type. */ +typedef unsigned ALCuint; + +/** ALC 32bit signed integer type. */ +typedef int ALCint; + +/** ALC 32bit floating point type. */ +typedef float ALCfloat; + +/** ALC 64bit double point type. */ +typedef double ALCdouble; + +/** ALC 32bit type. */ +typedef unsigned int ALCsizei; + +/** ALC void type */ +typedef void ALCvoid; + #endif #ifdef _WIN32 @@ -99,9 +136,6 @@ #define INITGUID #define OPENAL - - typedef struct ALCdevice_struct ALCdevice; - typedef struct ALCcontext_struct ALCcontext; int InitializeOpenAL(); void DeInitializeOpenAL(); |
|
From: Elias N. <eli...@us...> - 2002-12-14 13:44:57
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common In directory sc8-pr-cvs1:/tmp/cvs-serv21877/common Modified Files: extal.c extal.h Log Message: More oal linux fixes Index: extal.c CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/extal.c =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/extal.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- extal.c 14 Dec 2002 13:37:46 -0000 1.4 +++ extal.c 14 Dec 2002 13:44:55 -0000 1.5 @@ -33,6 +33,10 @@ #include <stdio.h> #include "extal.h" +#ifndef _WIN32 +#include <dlfcn.h> +#endif + /** * $Id$ * @@ -150,7 +154,7 @@ #ifdef _WIN32 return GetProcAddress(handleOAL, function); #else - return NULL; + return dlsym(handleOAL, function); #endif } @@ -161,7 +165,7 @@ #ifdef _WIN32 handleOAL = LoadLibrary("OpenAL32.dll"); #else - handleOAL = NULL; + handleOAL = dlopen("libopenal.so", RTLD_LAZY); #endif } Index: extal.h CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/extal.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/extal.h,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- extal.h 14 Dec 2002 13:37:46 -0000 1.10 +++ extal.h 14 Dec 2002 13:44:55 -0000 1.11 @@ -107,7 +107,7 @@ void DeInitializeOpenAL(); //alc -typedef ALCubyte* (/*ALCAPIENTRY*/ *alcGetStringPROC)(ALCdevice *device,ALCenum param); +typedef ALCubyte* (ALCAPIENTRY *alcGetStringPROC)(ALCdevice *device,ALCenum param); typedef ALCvoid (ALCAPIENTRY *alcGetIntegervPROC)(ALCdevice *device,ALCenum param,ALCsizei size,ALCint *data); typedef ALCdevice* (ALCAPIENTRY *alcOpenDevicePROC)(ALCubyte *deviceName); typedef ALCvoid (ALCAPIENTRY *alcCloseDevicePROC)(ALCdevice *device); |
|
From: Elias N. <eli...@us...> - 2002-12-14 13:37:50
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common In directory sc8-pr-cvs1:/tmp/cvs-serv20087/common Modified Files: extal.c extal.h org_lwjgl_openal_ALUT.cpp Log Message: Fixed oal dynamic loading on linux Index: extal.c CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/extal.c =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/extal.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- extal.c 14 Dec 2002 12:49:16 -0000 1.3 +++ extal.c 14 Dec 2002 13:37:46 -0000 1.4 @@ -30,6 +30,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include <stdio.h> #include "extal.h" /** @@ -111,11 +112,11 @@ alcGetProcAddressPROC alcGetProcAddress = NULL; alcGetEnumValuePROC alcGetEnumValue = NULL; +#ifdef _WIN32 EAXSet eaxSet; // EAXSet function, ret$ EAXGet eaxGet; // EAXGet function, ret$ /* Handle to OpenAL Library */ -#ifdef WIN32 HMODULE handleOAL; #else void* handleOAL; @@ -383,4 +384,4 @@ */ int LoadALExtensions() { return 1; -} \ No newline at end of file +} Index: extal.h CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/extal.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/extal.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- extal.h 14 Dec 2002 12:49:16 -0000 1.9 +++ extal.h 14 Dec 2002 13:37:46 -0000 1.10 @@ -33,7 +33,9 @@ #ifndef _AL_TEST_H #define _AL_TEST_H +#ifdef _WIN32 #include <windows.h> +#endif #include <AL/altypes.h> #include <AL/alctypes.h> @@ -51,9 +53,6 @@ #define ALCAPI __declspec(dllimport) #endif - typedef struct ALCdevice_struct ALCdevice; - typedef struct ALCcontext_struct ALCcontext; - #define ALCAPIENTRY __cdecl #else #ifdef TARGET_OS_MAC @@ -62,7 +61,7 @@ #endif #endif #define ALCAPI - #define ALCAPIENTRY __cdecl + #define ALCAPIENTRY #endif #ifdef _WIN32 @@ -80,10 +79,11 @@ #endif #endif #define ALAPI - #define ALAPIENTRY __cdecl + #define ALAPIENTRY #define AL_CALLBACK #endif +#ifdef _WIN32 DEFINE_GUID(DSPROPSETID_EAX20_ListenerProperties, 0x306a6a8, 0xb224, @@ -95,15 +95,19 @@ 0xb224, 0x11d2, 0x99, 0xe5, 0x0, 0x0, 0xe8, 0xd8, 0xc7, 0x22); +#endif #define INITGUID #define OPENAL + typedef struct ALCdevice_struct ALCdevice; + typedef struct ALCcontext_struct ALCcontext; + int InitializeOpenAL(); void DeInitializeOpenAL(); //alc -typedef ALCubyte* (ALCAPIENTRY *alcGetStringPROC)(ALCdevice *device,ALCenum param); +typedef ALCubyte* (/*ALCAPIENTRY*/ *alcGetStringPROC)(ALCdevice *device,ALCenum param); typedef ALCvoid (ALCAPIENTRY *alcGetIntegervPROC)(ALCdevice *device,ALCenum param,ALCsizei size,ALCint *data); typedef ALCdevice* (ALCAPIENTRY *alcOpenDevicePROC)(ALCubyte *deviceName); typedef ALCvoid (ALCAPIENTRY *alcCloseDevicePROC)(ALCdevice *device); @@ -252,14 +256,16 @@ extern alDopplerFactorPROC alDopplerFactor; extern alDopplerVelocityPROC alDopplerVelocity; +#ifdef _WIN32 typedef ALenum (*EAXSet)(const GUID*, ALuint, ALuint, ALvoid*, ALuint); typedef ALenum (*EAXGet)(const GUID*, ALuint, ALuint, ALvoid*, ALuint); extern EAXSet eaxSet; extern EAXGet eaxGet; +#endif #ifdef __cplusplus } #endif -#endif \ No newline at end of file +#endif Index: org_lwjgl_openal_ALUT.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/org_lwjgl_openal_ALUT.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/org_lwjgl_openal_ALUT.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- org_lwjgl_openal_ALUT.cpp 14 Dec 2002 12:54:25 -0000 1.5 +++ org_lwjgl_openal_ALUT.cpp 14 Dec 2002 13:37:46 -0000 1.6 @@ -42,7 +42,9 @@ #include "org_lwjgl_openal_ALUT.h" #include <stdlib.h> +#ifdef _WIN32 #include <windows.h> +#endif /* OpenAL includes */ #include "checkALerror.h" @@ -175,4 +177,4 @@ JNIEXPORT void JNICALL Java_org_lwjgl_openal_ALUT_unloadWAV (JNIEnv *env, jobject obj, jint format, jint data, jint size, jint freq) { alutUnloadWAV(format, (void**) data, size, freq); CHECK_AL_ERROR -} \ No newline at end of file +} |
|
From: Brian M. <ma...@us...> - 2002-12-14 12:54:28
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common In directory sc8-pr-cvs1:/tmp/cvs-serv22620 Modified Files: org_lwjgl_openal_ALUT.cpp org_lwjgl_openal_ALUT.h Log Message: removed dynamic loading, since alut is statically linked (doh!) Index: org_lwjgl_openal_ALUT.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/org_lwjgl_openal_ALUT.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/org_lwjgl_openal_ALUT.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- org_lwjgl_openal_ALUT.cpp 14 Dec 2002 12:49:16 -0000 1.4 +++ org_lwjgl_openal_ALUT.cpp 14 Dec 2002 12:54:25 -0000 1.5 @@ -54,7 +54,7 @@ * Signature: ()Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_openal_ALUT_nCreate (JNIEnv *env, jobject obj) { - return InitializeOpenAL(); + return true; } /* Index: org_lwjgl_openal_ALUT.h CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/org_lwjgl_openal_ALUT.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/org_lwjgl_openal_ALUT.h,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- org_lwjgl_openal_ALUT.h 14 Dec 2002 12:49:16 -0000 1.7 +++ org_lwjgl_openal_ALUT.h 14 Dec 2002 12:54:25 -0000 1.8 @@ -40,7 +40,6 @@ extern "C" { #endif -extern int InitializeOpenAL(); /* * Class: org_lwjgl_openal_ALUT * Method: nCreate |
|
From: Brian M. <ma...@us...> - 2002-12-14 12:49:20
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common In directory sc8-pr-cvs1:/tmp/cvs-serv18887 Modified Files: checkALerror.h extal.c extal.h org_lwjgl_openal_ALC.cpp org_lwjgl_openal_ALUT.cpp org_lwjgl_openal_ALUT.h org_lwjgl_openal_BaseAL.cpp org_lwjgl_openal_CoreAL.cpp org_lwjgl_openal_eax_CoreEAX.cpp Log Message: dynamic loading of openal Index: checkALerror.h CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/checkALerror.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/checkALerror.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- checkALerror.h 28 Nov 2002 22:06:37 -0000 1.5 +++ checkALerror.h 14 Dec 2002 12:49:16 -0000 1.6 @@ -13,7 +13,7 @@ #ifdef _DEBUG #include <jni.h> -#include <AL/al.h> +#include "extal.h" #define CHECK_AL_ERROR \ { \ Index: extal.c CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/extal.c =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/extal.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- extal.c 27 Nov 2002 02:34:58 -0000 1.2 +++ extal.c 14 Dec 2002 12:49:16 -0000 1.3 @@ -29,6 +29,7 @@ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + #include "extal.h" /** @@ -39,3 +40,347 @@ * @author Brian Matzon <br...@ma...> * @version $Revision$ */ +alEnablePROC alEnable = NULL; +alDisablePROC alDisable = NULL; +alIsEnabledPROC alIsEnabled = NULL; +alHintPROC alHint = NULL; +alGetBooleanPROC alGetBoolean = NULL; +alGetIntegerPROC alGetInteger = NULL; +alGetFloatPROC alGetFloat = NULL; +alGetDoublePROC alGetDouble = NULL; +alGetBooleanvPROC alGetBooleanv = NULL; +alGetIntegervPROC alGetIntegerv = NULL; +alGetFloatvPROC alGetFloatv = NULL; +alGetDoublevPROC alGetDoublev = NULL; +alGetStringPROC alGetString = NULL; +alGetErrorPROC alGetError = NULL; +alIsExtensionPresentPROC alIsExtensionPresent = NULL; +alGetProcAddressPROC alGetProcAddress = NULL; +alGetEnumValuePROC alGetEnumValue = NULL; +alListeneriPROC alListeneri = NULL; +alListenerfPROC alListenerf = NULL; +alListener3fPROC alListener3f = NULL; +alListenerfvPROC alListenerfv = NULL; +alGetListeneriPROC alGetListeneri = NULL; +alGetListenerfPROC alGetListenerf = NULL; +alGetListener3fPROC alGetListener3f = NULL; +alGetListenerfvPROC alGetListenerfv = NULL; +alGenSourcesPROC alGenSources = NULL; +alDeleteSourcesPROC alDeleteSources = NULL; +alIsSourcePROC alIsSource = NULL; +alSourceiPROC alSourcei = NULL; +alSourcefPROC alSourcef = NULL; +alSource3fPROC alSource3f = NULL; +alSourcefvPROC alSourcefv = NULL; +alGetSourceiPROC alGetSourcei = NULL; +alGetSourcefPROC alGetSourcef = NULL; +alGetSource3fPROC alGetSource3f = NULL; +alGetSourcefvPROC alGetSourcefv = NULL; +alSourcePlayvPROC alSourcePlayv = NULL; +alSourcePausevPROC alSourcePausev = NULL; +alSourceStopvPROC alSourceStopv = NULL; +alSourceRewindvPROC alSourceRewindv = NULL; +alSourcePlayPROC alSourcePlay = NULL; +alSourcePausePROC alSourcePause = NULL; +alSourceStopPROC alSourceStop = NULL; +alSourceRewindPROC alSourceRewind = NULL; +alGenBuffersPROC alGenBuffers = NULL; +alDeleteBuffersPROC alDeleteBuffers = NULL; +alIsBufferPROC alIsBuffer = NULL; +alBufferDataPROC alBufferData = NULL; +alGetBufferiPROC alGetBufferi = NULL; +alGetBufferfPROC alGetBufferf = NULL; +alSourceQueueBuffersPROC alSourceQueueBuffers = NULL; +alSourceUnqueueBuffersPROC alSourceUnqueueBuffers = NULL; +alDistanceModelPROC alDistanceModel = NULL; +alDopplerFactorPROC alDopplerFactor = NULL; +alDopplerVelocityPROC alDopplerVelocity = NULL; +alcGetStringPROC alcGetString = NULL; +alcGetIntegervPROC alcGetIntegerv = NULL; +alcOpenDevicePROC alcOpenDevice = NULL; +alcCloseDevicePROC alcCloseDevice = NULL; +alcCreateContextPROC alcCreateContext = NULL; +alcMakeContextCurrentPROC alcMakeContextCurrent = NULL; +alcProcessContextPROC alcProcessContext = NULL; +alcGetCurrentContextPROC alcGetCurrentContext = NULL; +alcGetContextsDevicePROC alcGetContextsDevice = NULL; +alcSuspendContextPROC alcSuspendContext = NULL; +alcDestroyContextPROC alcDestroyContext = NULL; +alcGetErrorPROC alcGetError = NULL; +alcIsExtensionPresentPROC alcIsExtensionPresent = NULL; +alcGetProcAddressPROC alcGetProcAddress = NULL; +alcGetEnumValuePROC alcGetEnumValue = NULL; + +EAXSet eaxSet; // EAXSet function, ret$ +EAXGet eaxGet; // EAXGet function, ret$ + +/* Handle to OpenAL Library */ +#ifdef WIN32 +HMODULE handleOAL; +#else +void* handleOAL; +#endif + +/* Loads OpenAL */ +void LoadOpenAL(); + +/* Unloads OpenAL */ +void UnLoadOpenAL(); + +/* Gets a pointer to the named function */ +void* GetFunctionPointer(const char* function); + +/* Loads OpenAL basic functions */ +int LoadAL(); + +/* Loads OpenAL ALC functions */ +int LoadALC(); + +/* Loads any extensions to OpenAL */ +int LoadALExtensions(); + +/** + * Retrieves a pointer to the named function + * + * @param function Name of function + * @return pointer to named function, or NULL if not found + */ +void* GetFunctionPointer(const char* function) { +#ifdef _WIN32 + return GetProcAddress(handleOAL, function); +#else + return NULL; +#endif +} + +/** + * Loads the OpenAL Library + */ +void LoadOpenAL() { +#ifdef _WIN32 + handleOAL = LoadLibrary("OpenAL32.dll"); +#else + handleOAL = NULL; +#endif +} + +/** + * Unloads the OpenAL Library + */ +void UnLoadOpenAL() { +#ifdef _WIN32 + FreeLibrary(handleOAL); +#else + dlclose(handleOAL); +#endif +} + +/** + * Initializes OpenAL by loading the library + */ +int InitializeOpenAL() { + if(handleOAL != 0) { + return 1; + } + + //load our library + LoadOpenAL(); + + // if we couldn't load the library, get out + if(handleOAL == 0) { + return 0; + } + + //load basic OpenAL functions + if(!LoadAL()) { + return 0; + } + + //load OpenAL context functions + if(!LoadALC()) { + return 0; + } + + //load OpenAL extensions + if(!LoadALExtensions()) { + return 0; + } + + return 1; +} + +/** + * Called to deinitialize OpenAL + */ +void DeInitializeOpenAL() { + UnLoadOpenAL(); +} + +/** + * Loads the basic OpenAL functions + * + * @return true if all methods were loaded, false if one of the methods could not be loaded + */ +int LoadAL() { + alEnable = (alEnablePROC) GetFunctionPointer("alEnable"); + alDisable = (alDisablePROC) GetFunctionPointer("alDisable"); + alIsEnabled = (alIsEnabledPROC) GetFunctionPointer("alIsEnabled"); + //alHint = (alHintPROC) GetFunctionPointer("alHint"); + alGetBoolean = (alGetBooleanPROC) GetFunctionPointer("alGetBoolean"); + alGetInteger = (alGetIntegerPROC) GetFunctionPointer("alGetInteger"); + alGetFloat = (alGetFloatPROC) GetFunctionPointer("alGetFloat"); + alGetDouble = (alGetDoublePROC) GetFunctionPointer("alGetDouble"); + alGetBooleanv = (alGetBooleanvPROC) GetFunctionPointer("alGetBooleanv"); + alGetIntegerv = (alGetIntegervPROC) GetFunctionPointer("alGetIntegerv"); + alGetFloatv = (alGetFloatvPROC) GetFunctionPointer("alGetFloatv"); + alGetDoublev = (alGetDoublevPROC) GetFunctionPointer("alGetDoublev"); + alGetString = (alGetStringPROC) GetFunctionPointer("alGetString"); + alGetError = (alGetErrorPROC) GetFunctionPointer("alGetError"); + alIsExtensionPresent = (alIsExtensionPresentPROC) GetFunctionPointer("alIsExtensionPresent"); + alGetProcAddress = (alGetProcAddressPROC) GetFunctionPointer("alGetProcAddress"); + alGetEnumValue = (alGetEnumValuePROC) GetFunctionPointer("alGetEnumValue"); + alListeneri = (alListeneriPROC) GetFunctionPointer("alListeneri"); + alListenerf = (alListenerfPROC) GetFunctionPointer("alListenerf"); + alListener3f = (alListener3fPROC) GetFunctionPointer("alListener3f"); + alListenerfv = (alListenerfvPROC) GetFunctionPointer("alListenerfv"); + alGetListeneri = (alGetListeneriPROC) GetFunctionPointer("alGetListeneri"); + alGetListenerf = (alGetListenerfPROC) GetFunctionPointer("alGetListenerf"); + alGetListener3f = (alGetListener3fPROC) GetFunctionPointer("alGetListener3f"); + alGetListenerfv = (alGetListenerfvPROC) GetFunctionPointer("alGetListenerfv"); + alGenSources = (alGenSourcesPROC) GetFunctionPointer("alGenSources"); + alDeleteSources = (alDeleteSourcesPROC) GetFunctionPointer("alDeleteSources"); + alIsSource = (alIsSourcePROC) GetFunctionPointer("alIsSource"); + alSourcei = (alSourceiPROC) GetFunctionPointer("alSourcei"); + alSourcef = (alSourcefPROC) GetFunctionPointer("alSourcef"); + alSource3f = (alSource3fPROC) GetFunctionPointer("alSource3f"); + alSourcefv = (alSourcefvPROC) GetFunctionPointer("alSourcefv"); + alGetSourcei = (alGetSourceiPROC) GetFunctionPointer("alGetSourcei"); + alGetSourcef = (alGetSourcefPROC) GetFunctionPointer("alGetSourcef"); + alGetSource3f = (alGetSource3fPROC) GetFunctionPointer("alGetSource3f"); + alGetSourcefv = (alGetSourcefvPROC) GetFunctionPointer("alGetSourcefv"); + alSourcePlayv = (alSourcePlayvPROC) GetFunctionPointer("alSourcePlayv"); + alSourcePausev = (alSourcePausevPROC) GetFunctionPointer("alSourcePausev"); + alSourceStopv = (alSourceStopvPROC) GetFunctionPointer("alSourceStopv"); + alSourceRewindv = (alSourceRewindvPROC) GetFunctionPointer("alSourceRewindv"); + alSourcePlay = (alSourcePlayPROC) GetFunctionPointer("alSourcePlay"); + alSourcePause = (alSourcePausePROC) GetFunctionPointer("alSourcePause"); + alSourceStop = (alSourceStopPROC) GetFunctionPointer("alSourceStop"); + alSourceRewind = (alSourceRewindPROC) GetFunctionPointer("alSourceRewind"); + alGenBuffers = (alGenBuffersPROC) GetFunctionPointer("alGenBuffers"); + alDeleteBuffers = (alDeleteBuffersPROC) GetFunctionPointer("alDeleteBuffers"); + alIsBuffer = (alIsBufferPROC) GetFunctionPointer("alIsBuffer"); + alBufferData = (alBufferDataPROC) GetFunctionPointer("alBufferData"); + alGetBufferi = (alGetBufferiPROC) GetFunctionPointer("alGetBufferi"); + alGetBufferf = (alGetBufferfPROC) GetFunctionPointer("alGetBufferf"); + alSourceQueueBuffers = (alSourceQueueBuffersPROC) GetFunctionPointer("alSourceQueueBuffers"); + alSourceUnqueueBuffers = (alSourceUnqueueBuffersPROC) GetFunctionPointer("alSourceUnqueueBuffers"); + alDistanceModel = (alDistanceModelPROC) GetFunctionPointer("alDistanceModel"); + alDopplerFactor = (alDopplerFactorPROC) GetFunctionPointer("alDopplerFactor"); + alDopplerVelocity = (alDopplerVelocityPROC) GetFunctionPointer("alDopplerVelocity"); + + return + alEnable != NULL && + alDisable != NULL && + alIsEnabled != NULL && + //alHint != NULL && + alGetBoolean != NULL && + alGetInteger != NULL && + alGetFloat != NULL && + alGetDouble != NULL && + alGetBooleanv != NULL && + alGetIntegerv != NULL && + alGetFloatv != NULL && + alGetDoublev != NULL && + alGetString != NULL && + alGetError != NULL && + alIsExtensionPresent != NULL && + alGetProcAddress != NULL && + alGetEnumValue != NULL && + alListeneri != NULL && + alListenerf != NULL && + alListener3f != NULL && + alListenerfv != NULL && + alGetListeneri != NULL && + alGetListenerf != NULL && + alGetListener3f != NULL && + alGetListenerfv != NULL && + alGenSources != NULL && + alDeleteSources != NULL && + alIsSource != NULL && + alSourcei != NULL && + alSourcef != NULL && + alSource3f != NULL && + alSourcefv != NULL && + alGetSourcei != NULL && + alGetSourcef != NULL && + alGetSource3f != NULL && + alGetSourcefv != NULL && + alSourcePlayv != NULL && + alSourcePausev != NULL && + alSourceStopv != NULL && + alSourceRewindv != NULL && + alSourcePlay != NULL && + alSourcePause != NULL && + alSourceStop != NULL && + alSourceRewind != NULL && + alGenBuffers != NULL && + alDeleteBuffers != NULL && + alIsBuffer != NULL && + alBufferData != NULL && + alGetBufferi != NULL && + alGetBufferf != NULL && + alSourceQueueBuffers != NULL && + alSourceUnqueueBuffers != NULL && + alDistanceModel != NULL && + alDopplerFactor != NULL && + alDopplerVelocity != NULL; +} + +/** + * Loads the context OpenAL functions + * + * @return true if all methods were loaded, false if one of the methods could not be loaded + */ +int LoadALC() { + alcGetString = (alcGetStringPROC) GetFunctionPointer("alcGetString"); + alcGetIntegerv = (alcGetIntegervPROC) GetFunctionPointer("alcGetIntegerv"); + alcOpenDevice = (alcOpenDevicePROC) GetFunctionPointer("alcOpenDevice"); + alcCloseDevice = (alcCloseDevicePROC) GetFunctionPointer("alcCloseDevice"); + alcCreateContext = (alcCreateContextPROC) GetFunctionPointer("alcCreateContext"); + alcMakeContextCurrent = (alcMakeContextCurrentPROC) GetFunctionPointer("alcMakeContextCurrent"); + alcProcessContext = (alcProcessContextPROC) GetFunctionPointer("alcProcessContext"); + alcGetCurrentContext = (alcGetCurrentContextPROC) GetFunctionPointer("alcGetCurrentContext"); + alcGetContextsDevice = (alcGetContextsDevicePROC) GetFunctionPointer("alcGetContextsDevice"); + alcSuspendContext = (alcSuspendContextPROC) GetFunctionPointer("alcSuspendContext"); + alcDestroyContext = (alcDestroyContextPROC) GetFunctionPointer("alcDestroyContext"); + alcGetError = (alcGetErrorPROC) GetFunctionPointer("alcGetError"); + alcIsExtensionPresent = (alcIsExtensionPresentPROC) GetFunctionPointer("alcIsExtensionPresent"); + alcGetProcAddress = (alcGetProcAddressPROC) GetFunctionPointer("alcGetProcAddress"); + alcGetEnumValue = (alcGetEnumValuePROC) GetFunctionPointer("alcGetEnumValue"); + + return + alcGetString != NULL && + alcGetIntegerv != NULL && + alcOpenDevice != NULL && + alcCloseDevice != NULL && + alcCreateContext != NULL && + alcMakeContextCurrent != NULL && + alcProcessContext != NULL && + alcGetCurrentContext != NULL && + alcGetContextsDevice != NULL && + alcSuspendContext != NULL && + alcDestroyContext != NULL && + alcGetError != NULL && + alcIsExtensionPresent != NULL && + alcGetProcAddress != NULL && + alcGetEnumValue != NULL; +} + +/** + * Loads the OpenAL extensions functions + * + * @return true if all methods were loaded, false if one of the methods could not be loaded + */ +int LoadALExtensions() { + return 1; +} \ No newline at end of file Index: extal.h CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/extal.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/extal.h,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- extal.h 28 Nov 2002 19:36:09 -0000 1.8 +++ extal.h 14 Dec 2002 12:49:16 -0000 1.9 @@ -32,21 +32,234 @@ #ifndef _AL_TEST_H #define _AL_TEST_H -#ifdef _WIN32 -#define INITGUID -#define OPENAL #include <windows.h> -#include <AL/al.h> -#include <AL/alc.h> -#include <AL/alut.h> -#include <eax.h> +#include <AL/altypes.h> +#include <AL/alctypes.h> -EAXSet eaxSet; // EAXSet function, ret$ -EAXGet eaxGet; // EAXGet function, ret$ +#ifdef __cplusplus +extern "C" { +#endif + +#define ALUTAPI +#define ALUTAPIENTRY __cdecl + +#ifdef _WIN32 + #ifdef _OPENAL32LIB + #define ALCAPI __declspec(dllexport) + #else + #define ALCAPI __declspec(dllimport) + #endif + + typedef struct ALCdevice_struct ALCdevice; + typedef struct ALCcontext_struct ALCcontext; + + #define ALCAPIENTRY __cdecl #else -#include <AL/al.h> -#include <AL/alc.h> -#include <AL/alut.h> + #ifdef TARGET_OS_MAC + #if TARGET_OS_MAC + #pragma export on + #endif + #endif + #define ALCAPI + #define ALCAPIENTRY __cdecl #endif + +#ifdef _WIN32 + #ifdef _OPENAL32LIB + #define ALAPI __declspec(dllexport) + #else + #define ALAPI __declspec(dllimport) + #endif + #define ALAPIENTRY __cdecl + #define AL_CALLBACK +#else + #ifdef TARGET_OS_MAC + #if TARGET_OS_MAC + #pragma export on + #endif + #endif + #define ALAPI + #define ALAPIENTRY __cdecl + #define AL_CALLBACK #endif + +DEFINE_GUID(DSPROPSETID_EAX20_ListenerProperties, + 0x306a6a8, + 0xb224, + 0x11d2, + 0x99, 0xe5, 0x0, 0x0, 0xe8, 0xd8, 0xc7, 0x22); + +DEFINE_GUID(DSPROPSETID_EAX20_BufferProperties, + 0x306a6a7, + 0xb224, + 0x11d2, + 0x99, 0xe5, 0x0, 0x0, 0xe8, 0xd8, 0xc7, 0x22); + +#define INITGUID +#define OPENAL + +int InitializeOpenAL(); +void DeInitializeOpenAL(); + +//alc +typedef ALCubyte* (ALCAPIENTRY *alcGetStringPROC)(ALCdevice *device,ALCenum param); +typedef ALCvoid (ALCAPIENTRY *alcGetIntegervPROC)(ALCdevice *device,ALCenum param,ALCsizei size,ALCint *data); +typedef ALCdevice* (ALCAPIENTRY *alcOpenDevicePROC)(ALCubyte *deviceName); +typedef ALCvoid (ALCAPIENTRY *alcCloseDevicePROC)(ALCdevice *device); +typedef ALCcontext* (ALCAPIENTRY *alcCreateContextPROC)(ALCdevice *device,ALCint *attrList); +typedef ALCboolean (ALCAPIENTRY *alcMakeContextCurrentPROC)(ALCcontext *context); +typedef ALCvoid (ALCAPIENTRY *alcProcessContextPROC)(ALCcontext *context); +typedef ALCcontext* (ALCAPIENTRY *alcGetCurrentContextPROC)(ALCvoid); +typedef ALCdevice* (ALCAPIENTRY *alcGetContextsDevicePROC)(ALCcontext *context); +typedef ALCvoid (ALCAPIENTRY *alcSuspendContextPROC)(ALCcontext *context); +typedef ALCvoid (ALCAPIENTRY *alcDestroyContextPROC)(ALCcontext *context); +typedef ALCenum (ALCAPIENTRY *alcGetErrorPROC)(ALCdevice *device); +typedef ALCboolean (ALCAPIENTRY *alcIsExtensionPresentPROC)(ALCdevice *device,ALCubyte *extName); +typedef ALCvoid* (ALCAPIENTRY *alcGetProcAddressPROC)(ALCdevice *device,ALCubyte *funcName); +typedef ALCenum (ALCAPIENTRY *alcGetEnumValuePROC)(ALCdevice *device,ALCubyte *enumName); + +//al +typedef ALvoid (ALAPIENTRY *alEnablePROC)( ALenum capability ); +typedef ALvoid (ALAPIENTRY *alDisablePROC)( ALenum capability ); +typedef ALboolean (ALAPIENTRY *alIsEnabledPROC)( ALenum capability ); +typedef ALvoid (ALAPIENTRY *alHintPROC)( ALenum target, ALenum mode ); +typedef ALboolean (ALAPIENTRY *alGetBooleanPROC)( ALenum param ); +typedef ALint (ALAPIENTRY *alGetIntegerPROC)( ALenum param ); +typedef ALfloat (ALAPIENTRY *alGetFloatPROC)( ALenum param ); +typedef ALdouble (ALAPIENTRY *alGetDoublePROC)( ALenum param ); +typedef ALvoid (ALAPIENTRY *alGetBooleanvPROC)( ALenum param, ALboolean* data ); +typedef ALvoid (ALAPIENTRY *alGetIntegervPROC)( ALenum param, ALint* data ); +typedef ALvoid (ALAPIENTRY *alGetFloatvPROC)( ALenum param, ALfloat* data ); +typedef ALvoid (ALAPIENTRY *alGetDoublevPROC)( ALenum param, ALdouble* data ); +typedef ALubyte* (ALAPIENTRY *alGetStringPROC)( ALenum param ); +typedef ALenum (ALAPIENTRY *alGetErrorPROC)( ALvoid ); +typedef ALboolean (ALAPIENTRY *alIsExtensionPresentPROC)( ALubyte* fname ); +typedef ALvoid* (ALAPIENTRY *alGetProcAddressPROC)( ALubyte* fname ); +typedef ALenum (ALAPIENTRY *alGetEnumValuePROC)( ALubyte* ename ); +typedef ALvoid (ALAPIENTRY *alListeneriPROC)( ALenum param, ALint value ); +typedef ALvoid (ALAPIENTRY *alListenerfPROC)( ALenum param, ALfloat value ); +typedef ALvoid (ALAPIENTRY *alListener3fPROC)( ALenum param, ALfloat v1, ALfloat v2, ALfloat v3 ); +typedef ALvoid (ALAPIENTRY *alListenerfvPROC)( ALenum param, ALfloat* values ); +typedef ALvoid (ALAPIENTRY *alGetListeneriPROC)( ALenum param, ALint* value ); +typedef ALvoid (ALAPIENTRY *alGetListenerfPROC)( ALenum param, ALfloat* value ); +typedef ALvoid (ALAPIENTRY *alGetListener3fPROC)( ALenum param, ALfloat* v1, ALfloat* v2, ALfloat* v3 ); +typedef ALvoid (ALAPIENTRY *alGetListenerfvPROC)( ALenum param, ALfloat* values ); +typedef ALvoid (ALAPIENTRY *alGenSourcesPROC)( ALsizei n, ALuint* sources ); +typedef ALvoid (ALAPIENTRY *alDeleteSourcesPROC)( ALsizei n, ALuint* sources ); +typedef ALboolean (ALAPIENTRY *alIsSourcePROC)( ALuint id ); +typedef ALvoid (ALAPIENTRY *alSourceiPROC)( ALuint source, ALenum param, ALint value ); +typedef ALvoid (ALAPIENTRY *alSourcefPROC)( ALuint source, ALenum param, ALfloat value ); +typedef ALvoid (ALAPIENTRY *alSource3fPROC)( ALuint source, ALenum param, ALfloat v1, ALfloat v2, ALfloat v3 ); +typedef ALvoid (ALAPIENTRY *alSourcefvPROC)( ALuint source, ALenum param, ALfloat* values ); +typedef ALvoid (ALAPIENTRY *alGetSourceiPROC)( ALuint source, ALenum param, ALint* value ); +typedef ALvoid (ALAPIENTRY *alGetSourcefPROC)( ALuint source, ALenum param, ALfloat* value ); +typedef ALvoid (ALAPIENTRY *alGetSource3fPROC)( ALuint source, ALenum param, ALfloat* v1, ALfloat* v2, ALfloat* v3 ); +typedef ALvoid (ALAPIENTRY *alGetSourcefvPROC)( ALuint source, ALenum param, ALfloat* values ); +typedef ALvoid (ALAPIENTRY *alSourcePlayvPROC)( ALsizei n, ALuint *sources ); +typedef ALvoid (ALAPIENTRY *alSourcePausevPROC)( ALsizei n, ALuint *sources ); +typedef ALvoid (ALAPIENTRY *alSourceStopvPROC)( ALsizei n, ALuint *sources ); +typedef ALvoid (ALAPIENTRY *alSourceRewindvPROC)(ALsizei n,ALuint *sources); +typedef ALvoid (ALAPIENTRY *alSourcePlayPROC)( ALuint source ); +typedef ALvoid (ALAPIENTRY *alSourcePausePROC)( ALuint source ); +typedef ALvoid (ALAPIENTRY *alSourceStopPROC)( ALuint source ); +typedef ALvoid (ALAPIENTRY *alSourceRewindPROC)( ALuint source ); +typedef ALvoid (ALAPIENTRY *alGenBuffersPROC)( ALsizei n, ALuint* buffers ); +typedef ALvoid (ALAPIENTRY *alDeleteBuffersPROC)( ALsizei n, ALuint* buffers ); +typedef ALboolean (ALAPIENTRY *alIsBufferPROC)( ALuint buffer ); +typedef ALvoid (ALAPIENTRY *alBufferDataPROC)( ALuint buffer, + ALenum format, + ALvoid* data, + ALsizei size, + ALsizei freq ); +typedef ALvoid (ALAPIENTRY *alGetBufferiPROC)( ALuint buffer, ALenum param, ALint* value ); +typedef ALvoid (ALAPIENTRY *alGetBufferfPROC)( ALuint buffer, ALenum param, ALfloat* value ); +typedef ALvoid (ALAPIENTRY *alSourceQueueBuffersPROC)( ALuint source, ALsizei n, ALuint* buffers ); +typedef ALvoid (ALAPIENTRY *alSourceUnqueueBuffersPROC)( ALuint source, ALsizei n, ALuint* buffers ); +typedef ALvoid (ALAPIENTRY *alDistanceModelPROC)( ALenum value ); +typedef ALvoid (ALAPIENTRY *alDopplerFactorPROC)( ALfloat value ); +typedef ALvoid (ALAPIENTRY *alDopplerVelocityPROC)( ALfloat value ); + +extern alcGetStringPROC alcGetString; +extern alcGetIntegervPROC alcGetIntegerv; +extern alcOpenDevicePROC alcOpenDevice; +extern alcCloseDevicePROC alcCloseDevice; +extern alcCreateContextPROC alcCreateContext; +extern alcMakeContextCurrentPROC alcMakeContextCurrent; +extern alcProcessContextPROC alcProcessContext; +extern alcGetCurrentContextPROC alcGetCurrentContext; +extern alcGetContextsDevicePROC alcGetContextsDevice; +extern alcSuspendContextPROC alcSuspendContext; +extern alcDestroyContextPROC alcDestroyContext; +extern alcGetErrorPROC alcGetError; +extern alcIsExtensionPresentPROC alcIsExtensionPresent; +extern alcGetProcAddressPROC alcGetProcAddress; +extern alcGetEnumValuePROC alcGetEnumValue; + +extern alEnablePROC alEnable; +extern alDisablePROC alDisable; +extern alIsEnabledPROC alIsEnabled; +extern alHintPROC alHint; +extern alGetBooleanPROC alGetBoolean; +extern alGetIntegerPROC alGetInteger; +extern alGetFloatPROC alGetFloat; +extern alGetDoublePROC alGetDouble; +extern alGetBooleanvPROC alGetBooleanv; +extern alGetIntegervPROC alGetIntegerv; +extern alGetFloatvPROC alGetFloatv; +extern alGetDoublevPROC alGetDoublev; +extern alGetStringPROC alGetString; +extern alGetErrorPROC alGetError; +extern alIsExtensionPresentPROC alIsExtensionPresent; +extern alGetProcAddressPROC alGetProcAddress; +extern alGetEnumValuePROC alGetEnumValue; +extern alListeneriPROC alListeneri; +extern alListenerfPROC alListenerf; +extern alListener3fPROC alListener3f; +extern alListenerfvPROC alListenerfv; +extern alGetListeneriPROC alGetListeneri; +extern alGetListenerfPROC alGetListenerf; +extern alGetListener3fPROC alGetListener3f; +extern alGetListenerfvPROC alGetListenerfv; +extern alGenSourcesPROC alGenSources; +extern alDeleteSourcesPROC alDeleteSources; +extern alIsSourcePROC alIsSource; +extern alSourceiPROC alSourcei; +extern alSourcefPROC alSourcef; +extern alSource3fPROC alSource3f; +extern alSourcefvPROC alSourcefv; +extern alGetSourceiPROC alGetSourcei; +extern alGetSourcefPROC alGetSourcef; +extern alGetSource3fPROC alGetSource3f; +extern alGetSourcefvPROC alGetSourcefv; +extern alSourcePlayvPROC alSourcePlayv; +extern alSourcePausevPROC alSourcePausev; +extern alSourceStopvPROC alSourceStopv; +extern alSourceRewindvPROC alSourceRewindv; +extern alSourcePlayPROC alSourcePlay; +extern alSourcePausePROC alSourcePause; +extern alSourceStopPROC alSourceStop; +extern alSourceRewindPROC alSourceRewind; +extern alGenBuffersPROC alGenBuffers; +extern alDeleteBuffersPROC alDeleteBuffers; +extern alIsBufferPROC alIsBuffer; +extern alBufferDataPROC alBufferData; +extern alGetBufferiPROC alGetBufferi; +extern alGetBufferfPROC alGetBufferf; +extern alSourceQueueBuffersPROC alSourceQueueBuffers; +extern alSourceUnqueueBuffersPROC alSourceUnqueueBuffers; +extern alDistanceModelPROC alDistanceModel; +extern alDopplerFactorPROC alDopplerFactor; +extern alDopplerVelocityPROC alDopplerVelocity; + +typedef ALenum (*EAXSet)(const GUID*, ALuint, ALuint, ALvoid*, ALuint); +typedef ALenum (*EAXGet)(const GUID*, ALuint, ALuint, ALvoid*, ALuint); + +extern EAXSet eaxSet; +extern EAXGet eaxGet; + +#ifdef __cplusplus +} +#endif + +#endif \ No newline at end of file Index: org_lwjgl_openal_ALC.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/org_lwjgl_openal_ALC.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/org_lwjgl_openal_ALC.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- org_lwjgl_openal_ALC.cpp 28 Nov 2002 20:25:10 -0000 1.3 +++ org_lwjgl_openal_ALC.cpp 14 Dec 2002 12:49:16 -0000 1.4 @@ -42,7 +42,7 @@ /* OpenAL includes */ #include "checkALerror.h" -#include <AL/alc.h> +#include "extal.h" /* * Class: org_lwjgl_openal_ALC @@ -50,7 +50,14 @@ * Signature: ()Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_openal_ALC_nCreate (JNIEnv *env, jobject obj) { - return true; + //check that our methods have been loaded + if(alEnable == NULL) { + jclass cls = env->FindClass("org/lwjgl/openal/OpenALException"); + env->ThrowNew(cls, (const char*) "Unable to loacate OpenAL Methods. Please assert that AL was created successfully."); + env->DeleteLocalRef(cls); + return false; + } + return true; } /* @@ -378,4 +385,4 @@ CHECK_ALC_ERROR return result; -} +} \ No newline at end of file Index: org_lwjgl_openal_ALUT.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/org_lwjgl_openal_ALUT.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/org_lwjgl_openal_ALUT.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- org_lwjgl_openal_ALUT.cpp 28 Nov 2002 20:25:10 -0000 1.3 +++ org_lwjgl_openal_ALUT.cpp 14 Dec 2002 12:49:16 -0000 1.4 @@ -42,10 +42,11 @@ #include "org_lwjgl_openal_ALUT.h" #include <stdlib.h> +#include <windows.h> /* OpenAL includes */ #include "checkALerror.h" -#include <AL/alut.h> +#include "AL/alut.h" /* * Class: org_lwjgl_openal_ALUT @@ -53,7 +54,7 @@ * Signature: ()Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_openal_ALUT_nCreate (JNIEnv *env, jobject obj) { - return true; + return InitializeOpenAL(); } /* @@ -64,41 +65,6 @@ JNIEXPORT void JNICALL Java_org_lwjgl_openal_ALUT_nDestroy (JNIEnv *env, jobject obj) { } -/** - * This function initializes OpenAL. - * - * C Specification: - * void alutInit(int *argc, char *argv[]); - */ -JNIEXPORT void JNICALL Java_org_lwjgl_openal_ALUT_init (JNIEnv *env, jobject obj, jobjectArray jargv) { - /* obtain the size the array */ - jsize argc = env->GetArrayLength(jargv); - - /* Declare a char array for argv */ - const char* argv[128]; - int i; - - for (i=0;i<argc;i++) { - /* obtain the current object from the object array */ - jstring string = (jstring) env->GetObjectArrayElement(jargv, i); - - /* Convert the object just obtained into a String */ - const char *str = env->GetStringUTFChars(string, 0); - - /* Build the argv array */ - argv[i] = str; - - /* Free up memory to prevent memory leaks */ - env->ReleaseStringUTFChars(string, str); - } - - /* Increment argc to adjust the difference between Java and C arguments */ - argc++; - - /* call the actual implementation */ - alutInit((ALint*) &argc,(char**) argv); - CHECK_AL_ERROR -} /* * This function loads a WAV file into memory from a file. * @@ -209,14 +175,4 @@ JNIEXPORT void JNICALL Java_org_lwjgl_openal_ALUT_unloadWAV (JNIEnv *env, jobject obj, jint format, jint data, jint size, jint freq) { alutUnloadWAV(format, (void**) data, size, freq); CHECK_AL_ERROR -} - -/** - * This function exits OpenAL. - * - * C Specification: - * void alutExit(ALvoid); - */ -JNIEXPORT void JNICALL Java_org_lwjgl_openal_ALUT_exit (JNIEnv *env, jobject obj) { - alutExit(); -} +} \ No newline at end of file Index: org_lwjgl_openal_ALUT.h CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/org_lwjgl_openal_ALUT.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/org_lwjgl_openal_ALUT.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- org_lwjgl_openal_ALUT.h 3 Sep 2002 19:24:10 -0000 1.6 +++ org_lwjgl_openal_ALUT.h 14 Dec 2002 12:49:16 -0000 1.7 @@ -39,6 +39,8 @@ #ifdef __cplusplus extern "C" { #endif + +extern int InitializeOpenAL(); /* * Class: org_lwjgl_openal_ALUT * Method: nCreate @@ -54,13 +56,6 @@ */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_ALUT_nDestroy (JNIEnv *, jobject); -/* - * Class: org_lwjgl_openal_ALUT - * Method: init - * Signature: ([Ljava/lang/String;)V - */ -JNIEXPORT void JNICALL Java_org_lwjgl_openal_ALUT_init - (JNIEnv *, jobject, jobjectArray); /* * Class: org_lwjgl_openal_ALUT @@ -85,14 +80,6 @@ */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_ALUT_unloadWAV (JNIEnv *, jobject, jint, jint, jint, jint); - -/* - * Class: org_lwjgl_openal_ALUT - * Method: exit - * Signature: ()V - */ -JNIEXPORT void JNICALL Java_org_lwjgl_openal_ALUT_exit - (JNIEnv *, jobject); #ifdef __cplusplus } Index: org_lwjgl_openal_BaseAL.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/org_lwjgl_openal_BaseAL.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/org_lwjgl_openal_BaseAL.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- org_lwjgl_openal_BaseAL.cpp 25 Nov 2002 13:52:23 -0000 1.1 +++ org_lwjgl_openal_BaseAL.cpp 14 Dec 2002 12:49:16 -0000 1.2 @@ -29,16 +29,19 @@ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - #include "org_lwjgl_openal_BaseAL.h" +/* OpenAL includes */ +#include "checkALerror.h" +#include "extal.h" + /* * Class: org_lwjgl_openal_BaseAL * Method: nCreate * Signature: ()Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_openal_BaseAL_nCreate (JNIEnv *env, jobject obj) { - return true; + return InitializeOpenAL(); } /* @@ -47,4 +50,5 @@ * Signature: ()V */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_BaseAL_nDestroy(JNIEnv *env, jobject obj) { + DeInitializeOpenAL(); } Index: org_lwjgl_openal_CoreAL.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/org_lwjgl_openal_CoreAL.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/org_lwjgl_openal_CoreAL.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- org_lwjgl_openal_CoreAL.cpp 28 Nov 2002 20:25:10 -0000 1.3 +++ org_lwjgl_openal_CoreAL.cpp 14 Dec 2002 12:49:16 -0000 1.4 @@ -43,7 +43,7 @@ /* OpenAL includes */ #include "checkALerror.h" -#include <AL/al.h> +#include "extal.h" /** * This function enables a feature of the OpenAL driver. Index: org_lwjgl_openal_eax_CoreEAX.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/org_lwjgl_openal_eax_CoreEAX.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/org_lwjgl_openal_eax_CoreEAX.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- org_lwjgl_openal_eax_CoreEAX.cpp 28 Nov 2002 20:25:10 -0000 1.3 +++ org_lwjgl_openal_eax_CoreEAX.cpp 14 Dec 2002 12:49:16 -0000 1.4 @@ -41,9 +41,8 @@ #include "org_lwjgl_openal_eax_CoreEAX.h" /* OpenAL includes */ -#include "extal.h" #include "checkALerror.h" -#include <AL/alc.h> +#include "extal.h" /** * Throws an OAL exception with the specified message @@ -130,4 +129,4 @@ #else ThrowException(env, "EAX extensions not supported"); #endif -} +} \ No newline at end of file |
|
From: Brian M. <ma...@us...> - 2002-12-14 12:44:20
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/openal In directory sc8-pr-cvs1:/tmp/cvs-serv15807 Modified Files: ALCTest.java ALUTTest.java EAXTest.java PlayTest.java PlayTestMemory.java Log Message: fix: no more using alutInit or alutExit Index: ALCTest.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/test/openal/ALCTest.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/openal/ALCTest.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- ALCTest.java 21 Nov 2002 22:36:03 -0000 1.2 +++ ALCTest.java 14 Dec 2002 12:44:17 -0000 1.3 @@ -133,11 +133,7 @@ //get an enumerstion value System.out.println("Value of ALC_MAJOR_VERSION: " + alc.getEnumValue(device, "ALC_MAJOR_VERSION")); - //close context again - alc.destroyContext(context); - - //close it - alc.closeDevice(device); + alExit(); } /** Index: ALUTTest.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/test/openal/ALUTTest.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/openal/ALUTTest.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ALUTTest.java 19 Nov 2002 16:48:25 -0000 1.1 +++ ALUTTest.java 14 Dec 2002 12:44:17 -0000 1.2 @@ -67,8 +67,8 @@ int lastError; - //initialize AL, using ALUT - alut.init(args); + //initialize AL + alInitialize(); //create 1 buffer and 1 source ByteBuffer buffers = ByteBuffer.allocateDirect(4); @@ -149,8 +149,8 @@ exit(lastError); } - //shutdown using ALUT - alut.exit(); + //shutdown + alExit(); } /** Index: EAXTest.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/test/openal/EAXTest.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/openal/EAXTest.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- EAXTest.java 21 Nov 2002 22:36:36 -0000 1.2 +++ EAXTest.java 14 Dec 2002 12:44:17 -0000 1.3 @@ -67,9 +67,7 @@ //no errorchecking from now on, since our context is gone. //shutdown - alc.makeContextCurrent(null); - alc.destroyContext(context); - alc.closeDevice(device); + alExit(); System.out.println("test done."); } Index: PlayTest.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/test/openal/PlayTest.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/openal/PlayTest.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- PlayTest.java 19 Nov 2002 16:48:25 -0000 1.1 +++ PlayTest.java 14 Dec 2002 12:44:17 -0000 1.2 @@ -147,9 +147,7 @@ //no errorchecking from now on, since our context is gone. //shutdown - alc.makeContextCurrent(null); - alc.destroyContext(context); - alc.closeDevice(device); + alExit(); } /** Index: PlayTestMemory.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/test/openal/PlayTestMemory.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/openal/PlayTestMemory.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- PlayTestMemory.java 19 Nov 2002 16:48:25 -0000 1.1 +++ PlayTestMemory.java 14 Dec 2002 12:44:17 -0000 1.2 @@ -159,9 +159,7 @@ //no errorchecking from now on, since our context is gone. //shutdown - alc.makeContextCurrent(null); - alc.destroyContext(context); - alc.closeDevice(device); + alExit(); } /** |
|
From: Brian M. <ma...@us...> - 2002-12-14 12:43:48
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/openal In directory sc8-pr-cvs1:/tmp/cvs-serv15478 Modified Files: BasicTest.java Log Message: add: new alExit method alutExit, which has been removed Index: BasicTest.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/test/openal/BasicTest.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/openal/BasicTest.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- BasicTest.java 19 Nov 2002 16:48:25 -0000 1.1 +++ BasicTest.java 14 Dec 2002 12:43:45 -0000 1.2 @@ -120,6 +120,27 @@ } /** + * Shutdowns OpenAL + */ + protected void alExit() { + + //Get active context + context = alc.getCurrentContext(); + + //Get device for active context + device = alc.getContextsDevice(context); + + //Disable context + alc.makeContextCurrent(null); + + //Release context(s) + alc.destroyContext(context); + + //Close device + alc.closeDevice(device); + } + + /** * Creates an integer buffer to hold specified ints * - strictly a utility method * @@ -140,7 +161,7 @@ */ protected void exit(int error) { System.out.println("OpenAL Error: " + al.getString(error)); - alut.exit(); + alExit(); System.exit(-1); } } |
|
From: Brian M. <ma...@us...> - 2002-12-14 12:42:22
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/openal In directory sc8-pr-cvs1:/tmp/cvs-serv14612 Modified Files: ALUT.java Log Message: rem: alutInit and exit gone Index: ALUT.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/openal/ALUT.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/openal/ALUT.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- ALUT.java 14 Dec 2002 12:38:39 -0000 1.8 +++ ALUT.java 14 Dec 2002 12:42:19 -0000 1.9 @@ -54,8 +54,8 @@ } /** - * Override to provide any initialization code after creation. - */ + * Override to provide any initialization code after creation. + */ protected void init() { } @@ -107,13 +107,6 @@ protected native void nDestroy(); /** - * Initializes the OpenAL engine - * - * @param args String array of arguments to engine - */ - public native void init(String[] args); - - /** * Loads a wave file into memory * * @param file name of file to load (in current working directory) @@ -138,9 +131,4 @@ * @param freq frequency of the data */ public native void unloadWAV(int format, int data, int size, int freq); - - /** - * Deinitializes the OpenAL engine - */ - public native void exit(); } |
|
From: Brian M. <ma...@us...> - 2002-12-14 12:38:43
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/openal In directory sc8-pr-cvs1:/tmp/cvs-serv11791 Modified Files: ALUT.java Log Message: no message Index: ALUT.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/openal/ALUT.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/openal/ALUT.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- ALUT.java 3 Sep 2002 18:54:40 -0000 1.7 +++ ALUT.java 14 Dec 2002 12:38:39 -0000 1.8 @@ -29,7 +29,7 @@ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - package org.lwjgl.openal; +package org.lwjgl.openal; /** * $Id$ @@ -41,106 +41,106 @@ * @version $Revision$ */ public class ALUT { - + /** Has the ALUT object been created? */ - protected static boolean created; - + protected static boolean created; + static { initialize(); } - - /** Creates a new instance of ALUT */ - public ALUT() { - } - - /** - * Override to provide any initialization code after creation. - */ + + /** Creates a new instance of ALUT */ + public ALUT() { + } + + /** + * Override to provide any initialization code after creation. + */ protected void init() { } - + /** * Static initialization */ private static void initialize() { System.loadLibrary(org.lwjgl.Sys.getLibraryName()); } - - /** - * Creates the ALUT instance - * - * @throws Exception if a failiure occured in the ALUT creation process - */ + + /** + * Creates the ALUT instance + * + * @throws Exception if a failiure occured in the ALUT creation process + */ public void create() throws Exception { if (created) { return; - } - + } + if (!nCreate()) { throw new Exception("ALUT instance could not be created."); - } + } created = true; - init(); + init(); } - + /** * Native method to create ALUT instance * * @return true if the ALUT creation process succeeded */ protected native boolean nCreate(); - + /** * Calls whatever destruction rutines that are needed */ public void destroy() { if (!created) { return; - } - created = false; - nDestroy(); + } + created = false; + nDestroy(); } - + /** * Native method the destroy the ALUT */ - protected native void nDestroy(); - - /** - * Initializes the OpenAL engine - * - * @param args String array of arguments to engine - */ - public native void init(String[] args); - - /** - * Loads a wave file into memory - * - * @param file name of file to load (in current working directory) - * @return ALUTLoadWAVData object containing information regarding wave data loaded - */ - public native ALUTLoadWAVData loadWAVFile(String file); - - /** - * Loads a byte buffer into memory - * - * @param buffer buffer address containing file - * @return ALUTLoadWAVData object containing information regarding wave data loaded - */ - public native ALUTLoadWAVData loadWAVMemory(int buffer); - - /** - * Unloads the specified file from memory - * - * @param format OpenAL format specifier - * @param data address of data (pointer) - * @param size size of the data in bytes - * @param freq frequency of the data - */ - public native void unloadWAV(int format, int data, int size, int freq); - - /** - * Deinitializes the OpenAL engine - */ - public native void exit(); + protected native void nDestroy(); + + /** + * Initializes the OpenAL engine + * + * @param args String array of arguments to engine + */ + public native void init(String[] args); + + /** + * Loads a wave file into memory + * + * @param file name of file to load (in current working directory) + * @return ALUTLoadWAVData object containing information regarding wave data loaded + */ + public native ALUTLoadWAVData loadWAVFile(String file); + + /** + * Loads a byte buffer into memory + * + * @param buffer buffer address containing file + * @return ALUTLoadWAVData object containing information regarding wave data loaded + */ + public native ALUTLoadWAVData loadWAVMemory(int buffer); + + /** + * Unloads the specified file from memory + * + * @param format OpenAL format specifier + * @param data address of data (pointer) + * @param size size of the data in bytes + * @param freq frequency of the data + */ + public native void unloadWAV(int format, int data, int size, int freq); + + /** + * Deinitializes the OpenAL engine + */ + public native void exit(); } |