diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/jake2/sound/joal/Channel.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/jake2/sound/joal/Channel.java b/src/jake2/sound/joal/Channel.java index d786a56..182cc44 100644 --- a/src/jake2/sound/joal/Channel.java +++ b/src/jake2/sound/joal/Channel.java @@ -115,12 +115,15 @@ public class Channel { for (int i = 0; i < MAX_CHANNELS; i++) { try { + al.alGetError(); //Clear al error al.alGenSources(1, tmp, 0); sourceId = tmp[0]; + int errorCode = al.alGetError(); // can't generate more sources - if (sourceId <= 0) { + if (errorCode != AL.AL_NO_ERROR) { Com.Println("can't generate more sources: channel="+ - i +" sourceId<=0"); + i +" sourceId=" + sourceId + + " alError:" + errorCode); break; } } catch (ALException e) { |