diff options
author | Carsten Weisse <[email protected]> | 2006-11-23 13:31:58 +0000 |
---|---|---|
committer | Carsten Weisse <[email protected]> | 2006-11-23 13:31:58 +0000 |
commit | 9c42c3f2ddbd24aaef7898968c5653fc74d55b5a (patch) | |
tree | 796a0ff58805fd807237e61fff514a3dbf5e93f4 /src/jake2/sound/lwjgl | |
parent | 15ba776e7d03379ecdcb8cff912bac257636eaa0 (diff) |
set the correct limit of sources IntBuffer for shutdown.
(free only used sound sources)
Diffstat (limited to 'src/jake2/sound/lwjgl')
-rw-r--r-- | src/jake2/sound/lwjgl/Channel.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/jake2/sound/lwjgl/Channel.java b/src/jake2/sound/lwjgl/Channel.java index 4a0d5f0..05a2802 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.11 2006-11-23 13:13:57 cawe Exp $ + * $Id: Channel.java,v 1.12 2006-11-23 13:31:58 cawe Exp $ */ /* Copyright (C) 1997-2001 Id Software, Inc. @@ -109,7 +109,6 @@ public class Channel { int sourceId; numChannels = 0; for (int i = 0; i < MAX_CHANNELS; i++) { - try { AL10.alGenSources(tmp); sourceId = tmp.get(0); @@ -135,6 +134,7 @@ public class Channel { AL10.alSourcef (sourceId, AL10.AL_MIN_GAIN, 0.0005f); AL10.alSourcef (sourceId, AL10.AL_MAX_GAIN, 1.0f); } + sources.limit(numChannels); return numChannels; } |