mirror of
https://github.com/shadowfacts/lwjgl2-arm64.git
synced 2026-04-05 14:35:58 +00:00
OpenAL: Split platform dependent code from extal.c into platform subdirs. Made nCreate take a path instead of an array of paths.
This commit is contained in:
parent
c7f671d062
commit
c26ebafa62
7 changed files with 272 additions and 258 deletions
|
|
@ -65,7 +65,7 @@ public final class AL {
|
|||
*
|
||||
* @param oalPaths Array of strings containing paths to search for OpenAL library
|
||||
*/
|
||||
private static native void nCreate(String[] oalPaths) throws LWJGLException;
|
||||
private static native void nCreate(String oalPath) throws LWJGLException;
|
||||
|
||||
/**
|
||||
* Native method the destroy the AL
|
||||
|
|
@ -99,8 +99,17 @@ public final class AL {
|
|||
"openal", "libopenal.so",
|
||||
"openal", "openal.dylib"}, AL.class.getClassLoader());
|
||||
LWJGLUtil.log("Found " + oalPaths.length + " OpenAL paths");
|
||||
nCreate(oalPaths);
|
||||
created = true;
|
||||
for (int i = 0; i < oalPaths.length; i++) {
|
||||
try {
|
||||
nCreate(oalPaths[i]);
|
||||
created = true;
|
||||
break;
|
||||
} catch (LWJGLException e) {
|
||||
LWJGLUtil.log("Failed to load " + oalPaths[i] + ": " + e.getMessage());
|
||||
}
|
||||
}
|
||||
if (!created)
|
||||
throw new LWJGLException("Could not locate OpenAL library.");
|
||||
|
||||
try {
|
||||
AL10.initNativeStubs();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue