diff options
Diffstat (limited to 'src/jake2/sound/lwjgl')
-rw-r--r-- | src/jake2/sound/lwjgl/LWJGLSoundImpl.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/jake2/sound/lwjgl/LWJGLSoundImpl.java b/src/jake2/sound/lwjgl/LWJGLSoundImpl.java index eb8ed8c..3936b87 100644 --- a/src/jake2/sound/lwjgl/LWJGLSoundImpl.java +++ b/src/jake2/sound/lwjgl/LWJGLSoundImpl.java @@ -2,7 +2,7 @@ * LWJGLSoundImpl.java * Copyright (C) 2004 * - * $Id: LWJGLSoundImpl.java,v 1.4 2004-12-23 00:52:12 cawe Exp $ + * $Id: LWJGLSoundImpl.java,v 1.5 2005-04-26 20:17:54 cawe Exp $ */ package jake2.sound.lwjgl; @@ -481,8 +481,12 @@ public final class LWJGLSoundImpl implements Sound { ============== */ public sfxcache_t LoadSound(sfx_t s) { + if (s.isCached) return s.cache; sfxcache_t sc = WaveLoader.LoadSound(s); - initBuffer(s); + if (sc != null) { + initBuffer(s); + s.isCached = true; + } return sc; } |