summaryrefslogtreecommitdiffstats
path: root/src/java/net
diff options
context:
space:
mode:
authorathomas <[email protected]>2003-07-08 21:14:25 +0000
committerathomas <[email protected]>2003-07-08 21:14:25 +0000
commitce70965ea04ae7d8bebd6aa44d872219670235c5 (patch)
tree1e20eea235ccdbe4ef3529dc922e1471a5d5d167 /src/java/net
parent4805d819e5b99ed2dd5ca4c7be757900c4d6b429 (diff)
added support for compiling under Linux
git-svn-id: file:///home/mbien/NetBeansProjects/JOGAMP/joal-sync/git-svn/../svn-server-sync/joal/trunk@46 03bf7f67-59de-4072-a415-9a990d468a3f
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;
}