From: Rene S. <sa...@us...> - 2005-02-06 19:19:13
|
Update of /cvsroot/jake2/jake2/src/jake2/sound In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20923/src/jake2/sound Modified Files: S.java Log Message: init now safer, throwables catched. Index: S.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/sound/S.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** S.java 12 Jan 2005 01:21:34 -0000 1.8 --- S.java 6 Feb 2005 19:19:03 -0000 1.9 *************** *** 43,66 **** static Vector drivers = new Vector(3); ! static { ! try { // dummy driver (no sound) ! Class.forName("jake2.sound.DummyDriver"); 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) { ! } }; --- 43,72 ---- static Vector drivers = new Vector(3); ! static { // dummy driver (no sound) ! try { ! Class.forName("jake2.sound.DummyDriver"); ! } catch (Throwable e) { ! Com.DPrintf("could not init dummy sound driver class."); ! // ignore the lwjgl driver if runtime not in classpath ! } ! try { Class.forName("org.lwjgl.openal.AL"); Class.forName("jake2.sound.lwjgl.LWJGLSoundImpl"); ! } catch (Throwable e) { // ignore the lwjgl driver if runtime not in classpath + Com.DPrintf("could not init lwjgl sound driver class."); } + // prefered driver try { Class.forName("net.java.games.joal.AL"); Class.forName("jake2.sound.joal.JOALSoundImpl"); ! } catch (Throwable e) { // ignore the joal driver if runtime not in classpath + Com.DPrintf("could not init joal sound driver class."); } ! }; |