diff options
author | Carsten Weisse <[email protected]> | 2006-11-23 13:43:59 +0000 |
---|---|---|
committer | Carsten Weisse <[email protected]> | 2006-11-23 13:43:59 +0000 |
commit | 8ded2ba5de43419bcaebe10c6c12e2d1574f325b (patch) | |
tree | 03ce7588adf398ccbdad61bec44456368791b400 /src | |
parent | 9c42c3f2ddbd24aaef7898968c5653fc74d55b5a (diff) |
makes sound source buffer changing more stable
Diffstat (limited to 'src')
-rw-r--r-- | src/jake2/sound/joal/Channel.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/jake2/sound/joal/Channel.java b/src/jake2/sound/joal/Channel.java index 51d111b..a6312fb 100644 --- a/src/jake2/sound/joal/Channel.java +++ b/src/jake2/sound/joal/Channel.java @@ -3,7 +3,7 @@ * * Copyright (C) 2003 * - * $Id: Channel.java,v 1.9 2006-11-23 13:13:58 cawe Exp $ + * $Id: Channel.java,v 1.10 2006-11-23 13:43:59 cawe Exp $ */ /* Copyright (C) 1997-2001 Id Software, Inc. @@ -332,7 +332,13 @@ public class Channel { if (ch.modified) { if (ch.bufferChanged) { + try { al.alSourcei(sourceId, AL.AL_BUFFER, ch.bufferId); + } catch (ALException e) { + // fallback for buffer changing + al.alSourceStop(sourceId); + al.alSourcei(sourceId, AL.AL_BUFFER, ch.bufferId); + } } if (ch.volumeChanged) { al.alSourcef (sourceId, AL.AL_GAIN, ch.volume); |