diff options
Diffstat (limited to 'src/java')
-rw-r--r-- | src/java/build.xml | 4 | ||||
-rw-r--r-- | src/java/net/java/games/joal/ALC.java | 2 | ||||
-rw-r--r-- | src/java/net/java/games/joal/ALCImpl.java | 11 | ||||
-rw-r--r-- | src/java/net/java/games/joal/ALFactory.java | 4 |
4 files changed, 16 insertions, 5 deletions
diff --git a/src/java/build.xml b/src/java/build.xml index 7a1a68c..9e6eca7 100644 --- a/src/java/build.xml +++ b/src/java/build.xml @@ -1,4 +1,4 @@ -<?xml version="1.0"?> +<?xml version="1.0" encoding="iso-8859-1"?> <!-- * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved. @@ -73,7 +73,7 @@ <target name="clean"> <delete dir="../../apidocs"/> <delete dir="../../classes/net"/> - <delete file="../../bin/joal.jar"/> + <delete file="../../lib/joal.jar"/> </target> </project>
\ No newline at end of file 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; } |