summaryrefslogtreecommitdiffstats
path: root/src/java/com/jogamp/openal/ALFactory.java
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/ALFactory.java
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/ALFactory.java')
-rw-r--r--src/java/com/jogamp/openal/ALFactory.java11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/java/com/jogamp/openal/ALFactory.java b/src/java/com/jogamp/openal/ALFactory.java
index 64da325..e7ec774 100644
--- a/src/java/com/jogamp/openal/ALFactory.java
+++ b/src/java/com/jogamp/openal/ALFactory.java
@@ -44,6 +44,8 @@ import com.jogamp.openal.impl.*;
* @author Kenneth Russell
*/
public class ALFactory {
+ public static final boolean DEBUG = Debug.debug("Factory");
+
private static boolean initialized = false;
private static AL al;
private static ALC alc;
@@ -54,9 +56,12 @@ public class ALFactory {
try {
if (!initialized) {
if(null == ALImpl.getALProcAddressTable()) {
- throw new RuntimeException("AL not initialized (ProcAddressTable null)");
+ throw new ALException("AL not initialized (ProcAddressTable null)");
}
initialized = true;
+ if(DEBUG) {
+ System.err.println("AL initialized");
+ }
}
} catch (UnsatisfiedLinkError e) {
throw new ALException(e);
@@ -72,7 +77,7 @@ public class ALFactory {
public static AL getAL() throws ALException {
initialize();
if (al == null) {
- al = new ALImpl();
+ al = new ALImpl();
}
return al;
}
@@ -86,7 +91,7 @@ public class ALFactory {
public static ALC getALC() throws ALException{
initialize();
if (alc == null) {
- alc = new ALCImpl();
+ alc = new ALCImpl();
}
return alc;
}