aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/net
diff options
context:
space:
mode:
Diffstat (limited to 'src/java/net')
-rw-r--r--src/java/net/java/games/joal/ALC.java2
-rw-r--r--src/java/net/java/games/joal/ALCImpl.java11
-rw-r--r--src/java/net/java/games/joal/ALFactory.java4
3 files changed, 14 insertions, 3 deletions
diff --git a/src/java/net/java/games/joal/ALC.java b/src/java/net/java/games/joal/ALC.java
index 2da7f2d..36dfee1 100644
--- a/src/java/net/java/games/joal/ALC.java
+++ b/src/java/net/java/games/joal/ALC.java
@@ -130,7 +130,7 @@ public interface ALC extends ALCConstants {
* <pre>ALCEnum alcGetError(ALvoid);</pre>
* @return the current context error state
*/
- public int alcGetError();
+ public int alcGetError(Device device);
/**
* This method retrieves the current context. <br>
diff --git a/src/java/net/java/games/joal/ALCImpl.java b/src/java/net/java/games/joal/ALCImpl.java
index fab3a56..3edfd7e 100644
--- a/src/java/net/java/games/joal/ALCImpl.java
+++ b/src/java/net/java/games/joal/ALCImpl.java
@@ -124,7 +124,16 @@ final class ALCImpl implements ALC {
private native void destroyContextNative(int pointer);
- public native int alcGetError();
+ public int alcGetError(Device device) {
+ int result = 0;
+ int pointer = 0;
+ if(device != null) {
+ pointer = device.pointer;
+ }
+ result = alcGetErrorNative(pointer);
+ return result;
+ }
+ private native int alcGetErrorNative(int pointer);
public Context alcGetCurrentContext() {
Context result = null;
diff --git a/src/java/net/java/games/joal/ALFactory.java b/src/java/net/java/games/joal/ALFactory.java
index 04276ad..8d364e4 100644
--- a/src/java/net/java/games/joal/ALFactory.java
+++ b/src/java/net/java/games/joal/ALFactory.java
@@ -59,8 +59,10 @@ public class ALFactory {
String osProperty = System.getProperty("os.name");
if(osProperty.startsWith("Win")) {
isInitialized = init(new String[] { "OpenAL32.dll" });
+ } else if(osProperty.startsWith("Linux")) {
+ isInitialized = init(new String[] { "libopenal.so" });
} else {
- // Linux & OSX
+ // OSX
}
return isInitialized;
}