add: new alExit method alutExit, which has been removed

This commit is contained in:
Brian Matzon 2002-12-14 12:43:45 +00:00
parent aaa0bbab42
commit 926e1dd507
1 changed files with 22 additions and 1 deletions

View File

@ -119,6 +119,27 @@ public abstract class BasicTest {
}
}
/**
* 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 @@ public abstract class BasicTest {
*/
protected void exit(int error) {
System.out.println("OpenAL Error: " + al.getString(error));
alut.exit();
alExit();
System.exit(-1);
}
}