diff options
author | Holger Zickner <[email protected]> | 2004-09-19 09:12:20 +0000 |
---|---|---|
committer | Holger Zickner <[email protected]> | 2004-09-19 09:12:20 +0000 |
commit | 6c0b5e613634160d524e19eadde48323d34fdf42 (patch) | |
tree | 6ce07a3701474a654a4c2389b8b0f774d1316304 /src/jake2/sound/joal/JOALSoundImpl.java | |
parent | f5a4bce9b83bab5947b0eb527e51bed3871baba5 (diff) |
preload OpenAL native library, installation in
LD_LIBRARY_PATH isn't required anymore
Diffstat (limited to 'src/jake2/sound/joal/JOALSoundImpl.java')
-rw-r--r-- | src/jake2/sound/joal/JOALSoundImpl.java | 10 |
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(); |