summaryrefslogtreecommitdiffstats
path: root/src/java/com/jogamp/openal/eax
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2010-12-13 12:28:06 +0100
committerSven Gothel <[email protected]>2010-12-13 12:28:06 +0100
commit70b648f9c8fa9c9cb302b9bbb06820a3cf23d71f (patch)
treece9f711cce66a93d9562402107e5d11b247445d4 /src/java/com/jogamp/openal/eax
parent57ef6b5648cc3f95a490477627c5a350251a09bf (diff)
Window Support added ; Win64 libs & license files
- plays on linux/window now - ant build files fixed -> Windows support - windows OpenAL 32/64 bit: see make/lib/FILES.txt make/lib/oalinst-license.txt) - linux libs: added .1 to suffix - added Debug impl - catch EAX init exception (ie unsatisfied link error) - EAX proper blocked init TODO: - check on osx - joal-demos
Diffstat (limited to 'src/java/com/jogamp/openal/eax')
-rw-r--r--src/java/com/jogamp/openal/eax/EAXFactory.java23
1 files changed, 18 insertions, 5 deletions
diff --git a/src/java/com/jogamp/openal/eax/EAXFactory.java b/src/java/com/jogamp/openal/eax/EAXFactory.java
index 0e305a5..01d336c 100644
--- a/src/java/com/jogamp/openal/eax/EAXFactory.java
+++ b/src/java/com/jogamp/openal/eax/EAXFactory.java
@@ -39,20 +39,33 @@ import com.jogamp.openal.ALFactory;
*
*/
public final class EAXFactory {
+ public static final boolean DEBUG;
static {
//initializes JOAL
ALFactory.getAL();
+ DEBUG = ALFactory.DEBUG;
}
- private static EAX eax;
+ private static EAX eax = null;
+ private static boolean eaxTried = false;
private static native void init();
- public static EAX getEAX() {
- if (eax == null) {
- init();
- eax = new EAX(EAX.SOURCE, EAX.LISTENER);
+ public static synchronized EAX getEAX() {
+ try {
+ if (!eaxTried) {
+ eaxTried = true;
+ init();
+ eax = new EAX(EAX.SOURCE, EAX.LISTENER);
+ if(DEBUG) {
+ System.err.println("EAX initialized");
+ }
+ }
+ } catch (UnsatisfiedLinkError e) {
+ if(DEBUG) {
+ e.printStackTrace();
+ }
}
return eax;
}