From: Rene S. <sa...@us...> - 2005-01-16 21:21:52
|
Update of /cvsroot/jake2/jake2/src/jake2/sound In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29339/src/jake2/sound Modified Files: Tag: RST S.java Log Message: This has vec3-optimize and the OAK bot. Index: S.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/sound/S.java,v retrieving revision 1.5 retrieving revision 1.5.2.1 diff -C2 -d -r1.5 -r1.5.2.1 *** S.java 16 Dec 2004 21:11:56 -0000 1.5 --- S.java 16 Jan 2005 21:21:07 -0000 1.5.2.1 *************** *** 48,57 **** 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"); --- 48,51 ---- *************** *** 59,62 **** --- 53,63 ---- // 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) { *************** *** 84,88 **** } // if driver not found use dummy ! impl = (Sound)drivers.get(0); } --- 85,89 ---- } // if driver not found use dummy ! impl = (Sound)drivers.firstElement(); } *************** *** 98,105 **** } ! // set the first driver after dummy as default String defaultDriver = "dummy"; if (drivers.size() > 1){ ! defaultDriver = ((Sound)drivers.elementAt(1)).getName(); } --- 99,106 ---- } ! // set the last registered driver as default String defaultDriver = "dummy"; if (drivers.size() > 1){ ! defaultDriver = ((Sound)drivers.lastElement()).getName(); } *************** *** 206,208 **** --- 207,217 ---- return impl.getName(); } + + public static String[] getDriverNames() { + String[] names = new String[drivers.size()]; + for (int i = 0; i < names.length; i++) { + names[i] = ((Sound)drivers.get(i)).getName(); + } + return names; + } } \ No newline at end of file |