diff options
author | Sven Gothel <[email protected]> | 2014-06-17 01:37:26 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2014-06-17 01:37:26 +0200 |
commit | 05d236515d37561a66b1e239984916e95a193cc8 (patch) | |
tree | 9f0acbe861f607ad423914591fd54a91bba53097 | |
parent | 0ad86c6c50a10bb3a53cac6fff1b857bae9c6192 (diff) |
Adapt to GlueGen commit c3054a01990e55ab35756ea23ab7d7c05f24dd37 (compount call-by-value extension)
-rw-r--r-- | make/config/joal-al-CustomJavaCode.java (renamed from make/config/joal-common-CustomJavaCode.java) | 3 | ||||
-rwxr-xr-x | make/config/joal-alc.cfg | 1 | ||||
-rwxr-xr-x | make/config/joal-alcabstract-CustomJavaCode.java | 3 | ||||
-rw-r--r-- | make/config/joal-alext.cfg | 1 | ||||
-rw-r--r-- | make/config/joal-alextabstract-CustomJavaCode.java | 3 | ||||
-rwxr-xr-x | make/config/joal.cfg | 3 | ||||
-rw-r--r-- | src/java/jogamp/openal/ALDynamicLibraryBundleInfo.java | 30 |
7 files changed, 28 insertions, 16 deletions
diff --git a/make/config/joal-common-CustomJavaCode.java b/make/config/joal-al-CustomJavaCode.java index 5df6cfd..551e51a 100644 --- a/make/config/joal-common-CustomJavaCode.java +++ b/make/config/joal-al-CustomJavaCode.java @@ -20,6 +20,9 @@ static { throw new RuntimeException("Couln't load native AL/JNI glue library"); } alProcAddressTable.reset(bundle); + if( !initializeImpl() ) { + throw new RuntimeException("Initialization failure"); + } return bundle; } } ); } diff --git a/make/config/joal-alc.cfg b/make/config/joal-alc.cfg index efba5a6..be27733 100755 --- a/make/config/joal-alc.cfg +++ b/make/config/joal-alc.cfg @@ -42,6 +42,7 @@ ManuallyImplement alcGetString # going to wrap it in another method IncludeAs CustomJavaCode ALC joal-alc-CustomJavaCode.java IncludeAs CustomJavaCode ALCAbstractImpl joal-alcabstract-CustomJavaCode.java +ManualStaticInit ALCAbstractImpl # These routines use strings ArgumentIsString alcIsExtensionPresent 1 diff --git a/make/config/joal-alcabstract-CustomJavaCode.java b/make/config/joal-alcabstract-CustomJavaCode.java index debadad..f0a7173 100755 --- a/make/config/joal-alcabstract-CustomJavaCode.java +++ b/make/config/joal-alcabstract-CustomJavaCode.java @@ -8,6 +8,9 @@ static { throw new RuntimeException("Couldn't instantiate ALCProcAddressTable"); } alcProcAddressTable.reset(ALImpl.alDynamicLookupHelper); + if( !initializeImpl() ) { + throw new RuntimeException("Initialization failure"); + } return alcProcAddressTable; } } ); } diff --git a/make/config/joal-alext.cfg b/make/config/joal-alext.cfg index da63612..a775c4b 100644 --- a/make/config/joal-alext.cfg +++ b/make/config/joal-alext.cfg @@ -39,6 +39,7 @@ Ignore ^AL_.+ Ignore ^ALC_.+ IncludeAs CustomJavaCode ALExtAbstractImpl joal-alextabstract-CustomJavaCode.java +ManualStaticInit ALExtAbstractImpl # These routines use or return strings ArgumentIsString alcLoopbackOpenDeviceSOFT 0 diff --git a/make/config/joal-alextabstract-CustomJavaCode.java b/make/config/joal-alextabstract-CustomJavaCode.java index e467fc7..6648620 100644 --- a/make/config/joal-alextabstract-CustomJavaCode.java +++ b/make/config/joal-alextabstract-CustomJavaCode.java @@ -8,6 +8,9 @@ static { throw new RuntimeException("Couldn't instantiate ALExtProcAddressTable"); } alExtProcAddressTable.reset(ALImpl.alDynamicLookupHelper); + if( !initializeImpl() ) { + throw new RuntimeException("Initialization failure"); + } return alExtProcAddressTable; } } ); } diff --git a/make/config/joal.cfg b/make/config/joal.cfg index 661b84e..0128dd9 100755 --- a/make/config/joal.cfg +++ b/make/config/joal.cfg @@ -29,7 +29,8 @@ Import java.security.PrivilegedAction # Factor out the OpenAL constants into their own interface Ignore ^AL_.+ -IncludeAs CustomJavaCode ALImpl joal-common-CustomJavaCode.java +IncludeAs CustomJavaCode ALImpl joal-al-CustomJavaCode.java +ManualStaticInit ALImpl # Provide #includes to native code CustomCCode #include "al.h" diff --git a/src/java/jogamp/openal/ALDynamicLibraryBundleInfo.java b/src/java/jogamp/openal/ALDynamicLibraryBundleInfo.java index efb88d1..0859be1 100644 --- a/src/java/jogamp/openal/ALDynamicLibraryBundleInfo.java +++ b/src/java/jogamp/openal/ALDynamicLibraryBundleInfo.java @@ -3,14 +3,14 @@ * * Redistribution and use in source and binary forms, with or without modification, are * permitted provided that the following conditions are met: - * + * * 1. Redistributions of source code must retain the above copyright notice, this list of * conditions and the following disclaimer. - * + * * 2. 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. - * + * * THIS SOFTWARE IS PROVIDED BY JogAmp Community ``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 JogAmp Community OR @@ -20,12 +20,12 @@ * 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. - * + * * The views and conclusions contained in the software and documentation are those of the * authors and should not be interpreted as representing official policies, either expressed * or implied, of JogAmp Community. */ - + package jogamp.openal; import com.jogamp.common.jvm.JNILibLoaderBase; @@ -46,7 +46,7 @@ public final class ALDynamicLibraryBundleInfo implements DynamicLibraryBundleInf AccessController.doPrivileged(new PrivilegedAction<Object>() { public Object run() { Platform.initSingleton(); - + if(TempJarCache.isInitialized()) { // only: joal.jar -> joal-natives-<os.and.arch>.jar JNILibLoaderBase.addNativeJarLibs(new Class<?>[] { ALDynamicLibraryBundleInfo.class }, null, null ); @@ -54,7 +54,7 @@ public final class ALDynamicLibraryBundleInfo implements DynamicLibraryBundleInf return null; } }); - + glueLibNames = new ArrayList<String>(); glueLibNames.add("joal"); } @@ -62,7 +62,7 @@ public final class ALDynamicLibraryBundleInfo implements DynamicLibraryBundleInf protected ALDynamicLibraryBundleInfo() { } - /** + /** * <p> * Returns <code>true</code>, * since we might load the library and allow symbol access to subsequent libs. @@ -75,11 +75,11 @@ public final class ALDynamicLibraryBundleInfo implements DynamicLibraryBundleInf * {@inheritDoc} * <p> * Returns <code>false</code>. - * </p> + * </p> */ @Override public final boolean shallLookupGlobal() { return false; } - + @Override public final List<String> getGlueLibNames() { return glueLibNames; @@ -95,7 +95,7 @@ public final class ALDynamicLibraryBundleInfo implements DynamicLibraryBundleInf alSystemLibNames.add("libopenal.so.1"); // unix alSystemLibNames.add("OpenAL32"); // windows alSystemLibNames.add("OpenAL"); // OSX - + // try this one as well, if spec fails alSystemLibNames.add("libOpenAL.so.1"); alSystemLibNames.add("libopenal.so"); @@ -107,11 +107,11 @@ public final class ALDynamicLibraryBundleInfo implements DynamicLibraryBundleInf alSoftLibNames.add("soft_oal"); // These names are in use by the bundled OpenAL-soft alSoftLibNames.add("openal"); - alSoftLibNames.add("OpenAL"); + alSoftLibNames.add("OpenAL"); } final List<String> alLibNames = new ArrayList<String>(); - + if( ALFactory.PREFER_SYSTEM_OPENAL ) { // First test the System OpenAL alLibNames.addAll(alSystemLibNames); @@ -121,7 +121,7 @@ public final class ALDynamicLibraryBundleInfo implements DynamicLibraryBundleInf } else { // First test use of the bundled OpenAL-soft alLibNames.addAll(alSoftLibNames); - + // Then try the System OpenAL alLibNames.addAll(alSystemLibNames); } @@ -155,7 +155,7 @@ public final class ALDynamicLibraryBundleInfo implements DynamicLibraryBundleInf @Override public final RunnableExecutor getLibLoaderExecutor() { return DynamicLibraryBundle.getDefaultRunnableExecutor(); - } + } } |