diff options
author | Carsten Weisse <[email protected]> | 2005-01-11 20:57:50 +0000 |
---|---|---|
committer | Carsten Weisse <[email protected]> | 2005-01-11 20:57:50 +0000 |
commit | b3852ef1bb6b8d9775a3f63aa5112cce1f59b5bf (patch) | |
tree | 5aaa1b9e9ce3dc4d2d279025f08703ff49166f5b /src/jake2/sound | |
parent | c8be6c86568ff06bc2c4b232c12eab901b058ce0 (diff) |
sound driver selection changed
Diffstat (limited to 'src/jake2/sound')
-rw-r--r-- | src/jake2/sound/S.java | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/jake2/sound/S.java b/src/jake2/sound/S.java index af65dbe..ac35e45 100644 --- a/src/jake2/sound/S.java +++ b/src/jake2/sound/S.java @@ -2,7 +2,7 @@ * S.java * Copyright (C) 2003 * - * $Id: S.java,v 1.6 2005-01-11 14:25:10 hzi Exp $ + * $Id: S.java,v 1.7 2005-01-11 20:57:50 cawe Exp $ */ /* Copyright (C) 1997-2001 Id Software, Inc. @@ -47,17 +47,18 @@ public class S { // dummy driver (no sound) Class.forName("jake2.sound.DummyDriver"); try { - Class.forName("net.java.games.joal.AL"); - Class.forName("jake2.sound.joal.JOALSoundImpl"); - } catch (ClassNotFoundException e) { - // ignore the joal driver if runtime not in classpath - } - try { Class.forName("org.lwjgl.openal.AL"); Class.forName("jake2.sound.lwjgl.LWJGLSoundImpl"); } catch (ClassNotFoundException e) { // ignore the lwjgl driver if runtime not in classpath } + // prefered driver + try { + Class.forName("net.java.games.joal.AL"); + Class.forName("jake2.sound.joal.JOALSoundImpl"); + } catch (ClassNotFoundException e) { + // ignore the joal driver if runtime not in classpath + } } catch (Throwable e) { } @@ -97,10 +98,10 @@ public class S { return; } - // set the first driver after dummy as default + // set the last registered driver as default String defaultDriver = "dummy"; if (drivers.size() > 1){ - defaultDriver = ((Sound)drivers.elementAt(1)).getName(); + defaultDriver = ((Sound)drivers.lastElement()).getName(); } s_impl = Cvar.Get("s_impl", defaultDriver, Defines.CVAR_ARCHIVE); |