aboutsummaryrefslogtreecommitdiffstats
path: root/src/jake2/sound/joal
diff options
context:
space:
mode:
Diffstat (limited to 'src/jake2/sound/joal')
-rw-r--r--src/jake2/sound/joal/JOALSoundImpl.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/jake2/sound/joal/JOALSoundImpl.java b/src/jake2/sound/joal/JOALSoundImpl.java
index 101814e..3072c6b 100644
--- a/src/jake2/sound/joal/JOALSoundImpl.java
+++ b/src/jake2/sound/joal/JOALSoundImpl.java
@@ -2,7 +2,7 @@
* JOALSoundImpl.java
* Copyright (C) 2004
*
- * $Id: JOALSoundImpl.java,v 1.3 2004-09-04 14:25:32 cawe Exp $
+ * $Id: JOALSoundImpl.java,v 1.4 2004-09-19 09:12:20 hzi Exp $
*/
package jake2.sound.joal;
@@ -55,6 +55,14 @@ public final class JOALSoundImpl implements Sound {
*/
public boolean Init() {
+ // preload OpenAL native library
+ String os = System.getProperty("os.name");
+ if (os.startsWith("Linux")) {
+ System.loadLibrary("openal");
+ } else if (os.startsWith("Windows")) {
+ System.loadLibrary("OpenAL32");
+ }
+
try {
initOpenAL();
al = ALFactory.getAL();