Update of /cvsroot/jake2/jake2/src/jake2/sound/joal
In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv6648/src/jake2/sound/joal
Modified Files:
JOALSoundImpl.java
Removed Files:
ALut.java
Log Message:
this is a hack for linux
open the OpenAL device only once and never close at runtime of the whole game
Index: JOALSoundImpl.java
===================================================================
RCS file: /cvsroot/jake2/jake2/src/jake2/sound/joal/JOALSoundImpl.java,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** JOALSoundImpl.java 8 Dec 2006 17:46:20 -0000 1.22
--- JOALSoundImpl.java 8 Dec 2006 18:13:45 -0000 1.23
***************
*** 19,22 ****
--- 19,23 ----
import net.java.games.joal.eax.EAX;
import net.java.games.joal.eax.EAXFactory;
+ import net.java.games.joal.util.ALut;
/**
***************
*** 36,42 ****
--- 37,46 ----
private int[] buffers = new int[MAX_SFX + STREAM_QUEUE];
+
+ private boolean initialized;
private JOALSoundImpl() {
// singleton
+ this.initialized = false;
}
***************
*** 47,51 ****
try {
! ALut.alutInit();
al = ALFactory.getAL();
alc = ALFactory.getALC();
--- 51,59 ----
try {
! // TODO this a linux hack
! if (!initialized) {
! ALut.alutInit();
! initialized = true;
! }
al = ALFactory.getAL();
alc = ALFactory.getALC();
***************
*** 152,156 ****
Channel.shutdown();
al.alDeleteBuffers(buffers.length, buffers, 0);
! ALut.alutExit();
Cmd.RemoveCommand("play");
--- 160,165 ----
Channel.shutdown();
al.alDeleteBuffers(buffers.length, buffers, 0);
! // TODO this is a linux hack
! // ALut.alutExit();
Cmd.RemoveCommand("play");
--- ALut.java DELETED ---
|