diff options
author | athomas <[email protected]> | 2003-11-22 08:13:37 +0000 |
---|---|---|
committer | athomas <[email protected]> | 2003-11-22 08:13:37 +0000 |
commit | 83f203ef182647aa69c549b1e6b720f5af8739d0 (patch) | |
tree | 12e4120363e3b662f59eda5822f44e443981f4fb | |
parent | 5c9159edaa04a772df6a43afb4892649d203d367 (diff) |
updated navbar
git-svn-id: file:///home/mbien/NetBeansProjects/JOGAMP/joal-sync/git-svn/../svn-server-sync/joal/trunk@63 03bf7f67-59de-4072-a415-9a990d468a3f
-rw-r--r-- | src/java/net/java/games/joal/util/ALut.java | 4 | ||||
-rw-r--r-- | src/native/alcbind.c | 9 | ||||
-rw-r--r-- | src/native/alfactory.c | 6 | ||||
-rw-r--r-- | src/native/extal.c | 45 | ||||
-rw-r--r-- | www/index.html | 21 |
5 files changed, 55 insertions, 30 deletions
diff --git a/src/java/net/java/games/joal/util/ALut.java b/src/java/net/java/games/joal/util/ALut.java index 5bb13f9..62b04c8 100644 --- a/src/java/net/java/games/joal/util/ALut.java +++ b/src/java/net/java/games/joal/util/ALut.java @@ -55,10 +55,12 @@ public final class ALut { private ALut() { } public static void alutInit() { + System.out.println("Go TEAM!"); System.out.println("Entering alutInit()"); ALFactory.initialize(); alc = ALFactory.getALC(); - String deviceName = null; + //String deviceName = null; + String deviceName = "MMSYSTEM"; /* String os = System.getProperty("os.name"); if (os.startsWith("Windows")) { diff --git a/src/native/alcbind.c b/src/native/alcbind.c index c34e72f..48c1404 100644 --- a/src/native/alcbind.c +++ b/src/native/alcbind.c @@ -49,13 +49,16 @@ JNIEXPORT jint JNICALL Java_net_java_games_joal_ALCImpl_openDeviceNative ALubyte *str; ALCdevice *device; if(deviceName != NULL) { + printf("In openDeviceNative() test 2a.1\n"); str = (ALubyte*)(*env)->GetStringUTFChars(env,deviceName,NULL); + printf("In openDeviceNative() test 2a.2 -- %i\n", *alcOpenDevice); device = alcOpenDevice(str); - printf("In openDeviceNative() test 2a -- %s - %i\n", str, (jint)device); + printf("In openDeviceNative() test 2a.3 -- %s - %i\n", str, (jint)device); (*env)->ReleaseStringUTFChars(env,deviceName,str); } else { - device = alcOpenDevice(NULL); - printf("In openDeviceNative() test 2b -- NULL - %i\n", (jint)device); + printf("In openDeviceNative() test 2b.1\n"); + device = alcOpenDevice(NULL); + printf("In openDeviceNative() test 2b.2 -- NULL - %i\n", (jint)device); } result = (jint)device; printf("In openDeviceNative() test 3\n"); diff --git a/src/native/alfactory.c b/src/native/alfactory.c index f38f358..d989580 100644 --- a/src/native/alfactory.c +++ b/src/native/alfactory.c @@ -37,7 +37,11 @@ JNIEXPORT jboolean JNICALL Java_net_java_games_joal_ALFactory_init (JNIEnv *env , jclass clazz, jobjectArray oalPaths) { - return InitializeOpenAL(env,oalPaths); + printf("ALFactory.init - Native: Enter\n"); + jboolean result = InitializeOpenAL(env,oalPaths); + printf("ALFactory.init - Native: Test 1 result = %i\n",result); + printf("ALFactory.init - Native: Exit\n"); + return result; } JNIEXPORT jboolean JNICALL Java_net_java_games_joal_ALFactory_deinitialize diff --git a/src/native/extal.c b/src/native/extal.c index f7998cc..e264db2 100644 --- a/src/native/extal.c +++ b/src/native/extal.c @@ -164,17 +164,18 @@ void* GetFunctionPointer(const char* function) { * Loads the OpenAL Library */ void LoadOpenAL(JNIEnv *env, jobjectArray oalPaths) { + printf("LoadOpenAL: Enter\n"); jsize pathcount = (*env)->GetArrayLength(env,oalPaths); -#ifdef _DEBUG - printf("Found %d OpenAL paths\n", pathcount); -#endif +//#ifdef _DEBUG + printf("LoadOpenAL: test 1 Found %d OpenAL paths\n", pathcount); +//#endif int i; for(i=0;i<pathcount;i++) { jstring path = (jstring) (*env)->GetObjectArrayElement(env,oalPaths, i); const char *path_str = (*env)->GetStringUTFChars(env,path, NULL); -#ifdef _DEBUG - printf("Testing '%s'\n", path_str); -#endif +//#ifdef _DEBUG + printf("LoadOpenAL: Test 2 loading '%s'\n", path_str); +//#endif #ifdef _WIN32 handleOAL = LoadLibrary(path_str); #endif @@ -182,9 +183,9 @@ void LoadOpenAL(JNIEnv *env, jobjectArray oalPaths) { handleOAL = dlopen(path_str, RTLD_LAZY); #endif if (handleOAL != NULL) { -#ifdef _DEBUG - printf("Found OpenAL at '%s'\n", path_str); -#endif +//#ifdef _DEBUG + printf("loadOpenAL: Test 3 Found OpenAL at '%s'\n", path_str); +//#endif break; } (*env)->ReleaseStringUTFChars(env, path, path_str); @@ -207,33 +208,36 @@ void UnLoadOpenAL() { * Initializes OpenAL by loading the library */ int InitializeOpenAL(JNIEnv *env, jobjectArray oalPaths) { + printf("InitializeOpenAL: Enter\n"); if(handleOAL != 0) { return JNI_TRUE; } - + printf("InitializeOpenAL: test 1\n"); //load our library LoadOpenAL(env, oalPaths); - + printf("InitializeOpenAL: test 2 handleOAL = %i\n",(int)handleOAL); // if we couldn't load the library, get out if(handleOAL == 0) { return JNI_FALSE; } + printf("InitializeOpenAL: test 3\n"); //load basic OpenAL functions if(!LoadAL()) { return JNI_FALSE; } + printf("InitializeOpenAL: test 4\n"); //load OpenAL context functions if(!LoadALC()) { return JNI_FALSE; } - + printf("InitializeOpenAL: test 5\n"); //load OpenAL extensions if(!LoadALExtensions()) { return JNI_FALSE; } - + printf("InitializeOpenAL: Exit\n"); return JNI_TRUE; } @@ -251,6 +255,8 @@ void DeInitializeOpenAL() { * @return true if all methods were loaded, false if one of the methods could not be loaded */ int LoadAL() { + printf("LoadAL: Enter\n"); + alEnable = (alEnablePROC) GetFunctionPointer("alEnable"); alDisable = (alDisablePROC) GetFunctionPointer("alDisable"); alIsEnabled = (alIsEnabledPROC) GetFunctionPointer("alIsEnabled"); @@ -307,7 +313,7 @@ int LoadAL() { alDopplerFactor = (alDopplerFactorPROC) GetFunctionPointer("alDopplerFactor"); alDopplerVelocity = (alDopplerVelocityPROC) GetFunctionPointer("alDopplerVelocity"); - return + int result = alEnable != NULL && alDisable != NULL && alIsEnabled != NULL && @@ -363,6 +369,9 @@ int LoadAL() { alDistanceModel != NULL && alDopplerFactor != NULL && alDopplerVelocity != NULL; + printf("LoadAL: test 1 result = %i\n",result); + printf("LoadAL: Exit\n"); + return result; } /** @@ -371,6 +380,8 @@ int LoadAL() { * @return true if all methods were loaded, false if one of the methods could not be loaded */ int LoadALC() { + printf("LoadALC: Enter\n"); + alcGetString = (alcGetStringPROC) GetFunctionPointer("alcGetString"); alcGetIntegerv = (alcGetIntegervPROC) GetFunctionPointer("alcGetIntegerv"); alcOpenDevice = (alcOpenDevicePROC) GetFunctionPointer("alcOpenDevice"); @@ -387,7 +398,7 @@ int LoadALC() { alcGetProcAddress = (alcGetProcAddressPROC) GetFunctionPointer("alcGetProcAddress"); alcGetEnumValue = (alcGetEnumValuePROC) GetFunctionPointer("alcGetEnumValue"); - return + int result = alcGetString != NULL && alcGetIntegerv != NULL && alcOpenDevice != NULL && @@ -403,6 +414,10 @@ int LoadALC() { alcIsExtensionPresent != NULL && alcGetProcAddress != NULL && alcGetEnumValue != NULL; + + printf("LoadALC: test1 result = %i\n",result); + printf("LoadALC: Exit\n"); + return result; } /** diff --git a/www/index.html b/www/index.html index 5e7b51b..a31d261 100644 --- a/www/index.html +++ b/www/index.html @@ -1,16 +1,17 @@ <html> <body bgcolor="#f5f5f5"> <div Align=center> - <img ID="NavBar" WIDTH=800 HEIGHT=66 SRC="http://games.dev.java.net/images/navbar2.gif" VSPACE=0 HSPACE=0 ALIGN="TOP" BORDER=0 USEMAP="#NavBar_MAP" NOFINSIDE="~! ~!" > - <p><img src="openal_c.gif" width="123" height="67"></p> - <MAP NAME="NavBar_Map"><AREA SHAPE="rect" ALT="Projects" COORDS="347,15,452,46" HREF="http://games.dev.java.net" TARGET="_self"> - <AREA SHAPE="rect" ALT="Wiki" COORDS="641,15,706,47" HREF="http://wiki.java.net/bin/view/Games"> - <AREA SHAPE="rect" ALT="Weblogs" COORDS="564,15,630,46" HREF="http://weblogs.java.net/weblogs/project/games"> - <AREA SHAPE="rect" COORDS="463,15,548,45" HREF="http://www.javagaming.org/cgi-bin/JGNetForums/YaBB.cgi" target="_top" ALT="Forums"> - <AREA SHAPE="rect" ALT="JavaGames Home" COORDS="136,15,334,48" HREF="http://community.java.net/games"> - <AREA SHAPE="rect" ALT="Java.net" COORDS="21,15,126,46" HREF="http://www.java.net" TARGET="_self"> - </MAP> -</div> + <img ID="NavBar" WIDTH=800 HEIGHT=64 SRC="http://games.dev.java.net/images/navbar2p.gif" VSPACE=0 HSPACE=0 ALIGN="TOP" BORDER=0 USEMAP="#NavBar_MAP" NOFINSIDE="~! ~!" > </div> + +<MAP NAME="NavBar_Map"> + <AREA SHAPE="rect" ALT="Projects" COORDS="308,16,392,48" HREF="http://games.dev.java.net" TARGET="_self"> + <AREA SHAPE="rect" ALT="Wiki" COORDS="561,15,613,47" HREF="http://wiki.java.net/bin/view/Games"> + <AREA SHAPE="rect" ALT="Weblogs" COORDS="489,16,551,47" HREF="http://weblogs.java.net/weblogs/project/games"> + <AREA SHAPE="rect" COORDS="402,17,480,46" HREF="http://www.javagaming.org/cgi-bin/JGNetForums/YaBB.cgi" target="_top" ALT="Forums"> + <AREA SHAPE="rect" ALT="JavaGames Home" COORDS="128,15,295,46" HREF="http://community.java.net/games"> + <AREA SHAPE="rect" ALT="Java.net" COORDS="21,15,118,45" HREF="http://www.java.net" TARGET="_self"> +</MAP> + <p align="center"><img src="openal_c.gif" width="123" height="67"></p> <div align="center"><font color="#005177" size="+2">Welcome to the Java Bindings for OpenAL / Sound3D Toolkit Project! </font> </div> |