|
From: <ma...@us...> - 2007-04-19 22:23:34
|
Revision: 2780
http://svn.sourceforge.net/java-game-lib/?rev=2780&view=rev
Author: matzon
Date: 2007-04-19 15:23:20 -0700 (Thu, 19 Apr 2007)
Log Message:
-----------
exposing context and device
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/openal/ALCcontext.java
trunk/LWJGL/src/java/org/lwjgl/openal/ALCdevice.java
Modified: trunk/LWJGL/src/java/org/lwjgl/openal/ALCcontext.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/openal/ALCcontext.java 2007-04-19 22:23:04 UTC (rev 2779)
+++ trunk/LWJGL/src/java/org/lwjgl/openal/ALCcontext.java 2007-04-19 22:23:20 UTC (rev 2780)
@@ -43,7 +43,7 @@
* @version $Revision$
* $Id$
*/
-final class ALCcontext {
+public final class ALCcontext {
/** address of actual context */
final long context;
@@ -57,14 +57,31 @@
this.context = context;
}
+ /*
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ public boolean equals(Object context) {
+ if(context instanceof ALCcontext) {
+ return ((ALCcontext)context).context == this.context;
+ }
+ return super.equals(context);
+ }
+
+ /**
+ * Creates an attribute list in a ByteBuffer
+ * @param contextFrequency Frequency to add
+ * @param contextRefresh Refresh rate to add
+ * @param contextSynchronized Whether to synchronize the context
+ * @return
+ */
static IntBuffer createAttributeList(int contextFrequency, int contextRefresh, int contextSynchronized) {
IntBuffer attribList = BufferUtils.createIntBuffer(7);
- attribList.put(ALC.ALC_FREQUENCY);
+ attribList.put(ALC10.ALC_FREQUENCY);
attribList.put(contextFrequency);
- attribList.put(ALC.ALC_REFRESH);
+ attribList.put(ALC10.ALC_REFRESH);
attribList.put(contextRefresh);
- attribList.put(ALC.ALC_SYNC);
+ attribList.put(ALC10.ALC_SYNC);
attribList.put(contextSynchronized);
attribList.put(0); //terminating int
Modified: trunk/LWJGL/src/java/org/lwjgl/openal/ALCdevice.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/openal/ALCdevice.java 2007-04-19 22:23:04 UTC (rev 2779)
+++ trunk/LWJGL/src/java/org/lwjgl/openal/ALCdevice.java 2007-04-19 22:23:20 UTC (rev 2780)
@@ -39,7 +39,7 @@
* @version $Revision$
* $Id$
*/
-final class ALCdevice {
+public final class ALCdevice {
/** address of actual device */
final long device;
@@ -51,5 +51,15 @@
*/
ALCdevice(long device) {
this.device = device;
- }
+ }
+
+ /*
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ public boolean equals(Object device) {
+ if(device instanceof ALCdevice) {
+ return ((ALCdevice)device).device == this.device;
+ }
+ return super.equals(device);
+ }
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|