Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/openal
In directory sc8-pr-cvs1:/tmp/cvs-serv15478
Modified Files:
BasicTest.java
Log Message:
add: new alExit method alutExit, which has been removed
Index: BasicTest.java
CVS Browser:
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/test/openal/BasicTest.java
===================================================================
RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/openal/BasicTest.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- BasicTest.java 19 Nov 2002 16:48:25 -0000 1.1
+++ BasicTest.java 14 Dec 2002 12:43:45 -0000 1.2
@@ -120,6 +120,27 @@
}
/**
+ * Shutdowns OpenAL
+ */
+ protected void alExit() {
+
+ //Get active context
+ context = alc.getCurrentContext();
+
+ //Get device for active context
+ device = alc.getContextsDevice(context);
+
+ //Disable context
+ alc.makeContextCurrent(null);
+
+ //Release context(s)
+ alc.destroyContext(context);
+
+ //Close device
+ alc.closeDevice(device);
+ }
+
+ /**
* Creates an integer buffer to hold specified ints
* - strictly a utility method
*
@@ -140,7 +161,7 @@
*/
protected void exit(int error) {
System.out.println("OpenAL Error: " + al.getString(error));
- alut.exit();
+ alExit();
System.exit(-1);
}
}
|