From 9c42c3f2ddbd24aaef7898968c5653fc74d55b5a Mon Sep 17 00:00:00 2001 From: Carsten Weisse Date: Thu, 23 Nov 2006 13:31:58 +0000 Subject: set the correct limit of sources IntBuffer for shutdown. (free only used sound sources) --- src/jake2/sound/lwjgl/Channel.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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; } -- cgit v1.2.3