aboutsummaryrefslogtreecommitdiffstats
path: root/src/jake2/sound/lwjgl
diff options
context:
space:
mode:
Diffstat (limited to 'src/jake2/sound/lwjgl')
-rw-r--r--src/jake2/sound/lwjgl/Channel.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/jake2/sound/lwjgl/Channel.java b/src/jake2/sound/lwjgl/Channel.java
index 8601aec..c4ab42d 100644
--- a/src/jake2/sound/lwjgl/Channel.java
+++ b/src/jake2/sound/lwjgl/Channel.java
@@ -3,7 +3,7 @@
*
* Copyright (C) 2003
*
- * $Id: Channel.java,v 1.7 2005-12-04 17:27:34 cawe Exp $
+ * $Id: Channel.java,v 1.8 2005-12-04 20:56:26 cawe Exp $
*/
/*
Copyright (C) 1997-2001 Id Software, Inc.
@@ -204,6 +204,8 @@ public class Channel {
buffer.put(0, buffers.get(Sound.MAX_SFX + streamQueue++));
Com.DPrintf("queue " + (streamQueue - 1) + '\n');
} else if (processed < 2) {
+ // check queue overrun
+ if (streamQueue >= Sound.STREAM_QUEUE) return;
buffer.put(0, buffers.get(Sound.MAX_SFX + streamQueue++));
Com.DPrintf("queue " + (streamQueue - 1) + '\n');
} else {