From: Carsten W. <ca...@us...> - 2005-04-26 20:18:08
|
Update of /cvsroot/jake2/jake2/src/jake2/sound/lwjgl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14747/src/jake2/sound/lwjgl Modified Files: LWJGLSoundImpl.java Log Message: bugfix: very stupid sound registration ;-) now the dynamic sounds (weapons) will be loaded only once. This solves the lwjgl crash too. Index: LWJGLSoundImpl.java =================================================================== RCS file: /cvsroot/jake2/jake2/src/jake2/sound/lwjgl/LWJGLSoundImpl.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** LWJGLSoundImpl.java 23 Dec 2004 00:52:12 -0000 1.4 --- LWJGLSoundImpl.java 26 Apr 2005 20:17:54 -0000 1.5 *************** *** 482,487 **** */ public sfxcache_t LoadSound(sfx_t s) { sfxcache_t sc = WaveLoader.LoadSound(s); ! initBuffer(s); return sc; } --- 482,491 ---- */ public sfxcache_t LoadSound(sfx_t s) { + if (s.isCached) return s.cache; sfxcache_t sc = WaveLoader.LoadSound(s); ! if (sc != null) { ! initBuffer(s); ! s.isCached = true; ! } return sc; } |