34package com.jogamp.openal;
36import jogamp.openal.ALCImpl;
37import jogamp.openal.ALExtImpl;
38import jogamp.openal.ALImpl;
39import jogamp.openal.Debug;
41import com.jogamp.common.os.Platform;
42import com.jogamp.common.util.PropertyAccess;
63 public static final boolean DEBUG = Debug.debug(
"Factory");
68 Platform.initSingleton();
69 final String choice = PropertyAccess.getProperty(
"joal.openal.lib",
true);
70 boolean useSystem =
false;
71 if(
null != choice ) {
72 if( choice.equals(
"system") ) {
74 }
else if( choice.equals(
"soft") ) {
81 private static boolean initialized =
false;
83 private static ALC alc;
84 private static ALExt alext;
88 private static synchronized void initialize() throws ALException {
91 if(
null == ALImpl.getALProcAddressTable()) {
92 throw new ALException(
"AL not initialized (ProcAddressTable null)");
96 System.err.println(
"AL initialized");
99 }
catch (
final UnsatisfiedLinkError e) {
100 throw new ALException(e);
101 }
catch (
final ExceptionInInitializerError er) {
102 throw new ALException(er);
153 alext =
new ALExtImpl();
A generic exception for OpenAL errors used throughout the binding as a substitute for RuntimeExceptio...
This class provides factory methods for generating AL and ALC objects.
static AL getAL()
Get the default AL object.
static boolean getPreferSystemOpenAL()
If the system property joal.SystemOpenAL is set.
static ALExt getALExt()
Get the default ALExt object.
static final boolean PREFER_SYSTEM_OPENAL
If true, prefer System-OpenAL, otherwise bundled Soft-OpenAL (default).
static final boolean DEBUG
static ALC getALC()
Get the default ALC object.