case LWJGLUtil.PLATFORM_MACOSX:
libname = "openal";
library_names = new String[]{"openal.dylib"};
break;
default:
throw new LWJGLException("Unknown platform: " + LWJGLUtil.getPlatform());
}
String[] oalPaths = LWJGLUtil.getLibraryPaths(libname, library_names, AL.class.getClassLoader());
LWJGLUtil.log("Found " + oalPaths.length + " OpenAL paths");
for ( String oalPath : oalPaths ) {
try {
nCreate(oalPath);
created = true;
init(deviceArguments, contextFrequency, contextRefresh, contextSynchronized, openDevice);
break;
} catch (LWJGLException e) {
LWJGLUtil.log("Failed to load " + oalPath + ": " + e.getMessage());
}
}
if (!created && LWJGLUtil.getPlatform() == LWJGLUtil.PLATFORM_MACOSX) {
// Try to load OpenAL from the framework instead
nCreateDefault();
created = true;
init(deviceArguments, contextFrequency, contextRefresh, contextSynchronized, openDevice);
}
if (!created)
throw new LWJGLException("Could not locate OpenAL library.");
}