You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(134) |
Sep
(52) |
Oct
(13) |
Nov
(342) |
Dec
(163) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(44) |
Feb
(62) |
Mar
(158) |
Apr
(38) |
May
(70) |
Jun
(58) |
Jul
(104) |
Aug
(207) |
Sep
(83) |
Oct
(122) |
Nov
(23) |
Dec
(49) |
| 2004 |
Jan
(119) |
Feb
(132) |
Mar
(192) |
Apr
(140) |
May
(77) |
Jun
(74) |
Jul
(201) |
Aug
(63) |
Sep
(102) |
Oct
(70) |
Nov
(173) |
Dec
(78) |
| 2005 |
Jan
(174) |
Feb
(197) |
Mar
(105) |
Apr
(59) |
May
(77) |
Jun
(43) |
Jul
(21) |
Aug
(18) |
Sep
(47) |
Oct
(37) |
Nov
(74) |
Dec
(50) |
| 2006 |
Jan
(44) |
Feb
(19) |
Mar
(32) |
Apr
(24) |
May
(31) |
Jun
(55) |
Jul
(138) |
Aug
(28) |
Sep
(12) |
Oct
(41) |
Nov
(58) |
Dec
(24) |
| 2007 |
Jan
(28) |
Feb
(14) |
Mar
(10) |
Apr
(68) |
May
(30) |
Jun
(26) |
Jul
(18) |
Aug
(63) |
Sep
(19) |
Oct
(29) |
Nov
(20) |
Dec
(10) |
| 2008 |
Jan
(38) |
Feb
(7) |
Mar
(37) |
Apr
(120) |
May
(41) |
Jun
(36) |
Jul
(39) |
Aug
(24) |
Sep
(28) |
Oct
(30) |
Nov
(36) |
Dec
(75) |
| 2009 |
Jan
(46) |
Feb
(22) |
Mar
(50) |
Apr
(70) |
May
(134) |
Jun
(105) |
Jul
(75) |
Aug
(34) |
Sep
(38) |
Oct
(34) |
Nov
(19) |
Dec
(20) |
| 2010 |
Jan
(11) |
Feb
(20) |
Mar
(65) |
Apr
(83) |
May
(104) |
Jun
(73) |
Jul
(78) |
Aug
(57) |
Sep
(43) |
Oct
(35) |
Nov
(9) |
Dec
(4) |
| 2011 |
Jan
(21) |
Feb
(11) |
Mar
(18) |
Apr
(10) |
May
(18) |
Jun
(15) |
Jul
(48) |
Aug
(25) |
Sep
(17) |
Oct
(45) |
Nov
(15) |
Dec
(12) |
| 2012 |
Jan
(21) |
Feb
(9) |
Mar
(12) |
Apr
(9) |
May
(9) |
Jun
(5) |
Jul
(1) |
Aug
(10) |
Sep
(12) |
Oct
(1) |
Nov
(28) |
Dec
(5) |
| 2013 |
Jan
(4) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2014 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
| 2015 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
| 2016 |
Jan
(2) |
Feb
(1) |
Mar
(1) |
Apr
(1) |
May
(2) |
Jun
|
Jul
(1) |
Aug
(2) |
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
|
|
1
|
2
|
|
3
|
4
|
5
|
6
|
7
|
8
|
9
|
|
10
|
11
|
12
|
13
|
14
|
15
(4) |
16
(2) |
|
17
(8) |
18
(10) |
19
(32) |
20
(3) |
21
(10) |
22
(5) |
23
|
|
24
(76) |
25
(77) |
26
(33) |
27
(36) |
28
(15) |
29
(14) |
30
(17) |
|
From: Brian M. <ma...@us...> - 2002-11-19 17:15:58
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/input/test In directory sc8-pr-cvs1:/tmp/cvs-serv4305 Removed Files: JoystickTest.java Log Message: moved tests to org.lwjgl.test for easier seperation --- JoystickTest.java DELETED --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/input/test/JoystickTest.java |
|
From: Brian M. <ma...@us...> - 2002-11-19 16:48:58
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/test In directory sc8-pr-cvs1:/tmp/cvs-serv3766 Removed Files: Game.java Log Message: moved tests to org.lwjgl.test for easier seperation --- Game.java DELETED --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/opengl/test/Game.java |
|
From: Brian M. <ma...@us...> - 2002-11-19 16:48:28
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/vector In directory sc8-pr-cvs1:/tmp/cvs-serv3465/vector Added Files: MathTest.java Log Message: moved tests to org.lwjgl.test for easier seperation --- NEW FILE: MathTest.java --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/test/vector/MathTest.java package org.lwjgl.test.vector; import java.nio.*; import org.lwjgl.*; public class MathTest { public static void main(String[] args) { ByteBuffer buf = ByteBuffer.allocateDirect(100); buf.order(ByteOrder.nativeOrder()); FloatBuffer float_buf = buf.asFloatBuffer(); float f = 0f; while (float_buf.hasRemaining()) { f += 0.5f; float_buf.put(f); } float_buf.rewind(); System.out.println("Src buffer:"); while (float_buf.hasRemaining()) System.out.print(float_buf.get() + " "); System.out.println(""); int buf_address = Sys.getDirectBufferAddress(float_buf); org.lwjgl.Math.matrixOp(org.lwjgl.Math.MATRIXOP_NEGATE, buf_address, 0, 100, 1, 1, false, buf_address, 0, false); System.out.println("Negated result:"); float_buf.rewind(); while (float_buf.hasRemaining()) System.out.print(float_buf.get() + " "); System.out.println(""); } } |
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/openal In directory sc8-pr-cvs1:/tmp/cvs-serv3465/openal Added Files: ALCTest.java ALTest.java ALUTTest.java BasicTest.java EAXTest.java PlayTest.java PlayTestMemory.java Log Message: moved tests to org.lwjgl.test for easier seperation --- NEW FILE: ALCTest.java --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/test/openal/ALCTest.java /* * Copyright (c) 2002 Light Weight Java Game Library Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'Light Weight Java Game Library' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.lwjgl.test.openal; import org.lwjgl.openal.AL; import org.lwjgl.openal.ALC; import org.lwjgl.openal.ALCcontext; import org.lwjgl.openal.ALCdevice; import org.lwjgl.Sys; import java.nio.IntBuffer; /** * $Id: ALCTest.java,v 1.1 2002/11/19 16:48:25 matzon Exp $ * * This is a test for the ALC part of OpenAL * * @author Brian Matzon <br...@ma...> * @version $Revision: 1.1 $ */ public class ALCTest extends BasicTest { /** * Creates an instance of ALCTest */ public ALCTest() { super(); } /** * Runs the actual test, using supplied arguments */ protected void execute(String[] args) { //error stuff int lastError = ALC.NO_ERROR; //create a device device = alc.openDevice(null); if(device == null) { System.out.println("Unable to create device"); System.exit(-1); } //create attribute list for context creation IntBuffer buffer = createIntBuffer(7); buffer.put(ALC.FREQUENCY); buffer.put(44100); buffer.put(ALC.REFRESH); buffer.put(15); buffer.put(ALC.SYNC); buffer.put(ALC.FALSE); buffer.put(0); //terminating int //create a context, using above attributes context = alc.createContext(device, Sys.getDirectBufferAddress(buffer)); if(context == null) { System.out.println("Unable to create context"); System.exit(-1); } if((lastError = alc.getError(device)) != ALC.NO_ERROR) { System.out.println("ALC Error: " + alc.getString(device, lastError)); System.exit(-1); } //make current alc.makeContextCurrent(context); //process alc.processContext(context); //suspend alc.suspendContext(context); //query System.out.println("DEFAULT_DEVICE_SPECIFIER: " + alc.getString(device, ALC.DEFAULT_DEVICE_SPECIFIER)); System.out.println("DEVICE_SPECIFIER: " + alc.getString(device, ALC.DEVICE_SPECIFIER)); System.out.println("EXTENSIONS: " + alc.getString(device, ALC.EXTENSIONS)); //mo query buffer.rewind(); alc.getIntegerv(device, ALC.MAJOR_VERSION, 4, Sys.getDirectBufferAddress(buffer)); alc.getIntegerv(device, ALC.MINOR_VERSION, 4, Sys.getDirectBufferAddress(buffer)+4); System.out.println("ALC_MAJOR_VERSION: " + buffer.get(0)); System.out.println("ALC_MINOR_VERSION: " + buffer.get(1)); //no check for ALC_ALL_ATTRIBUTES / ALC_ATTRIBUTES_SIZE since it //is buggy on win32 - my dev platform //check current context ALCcontext currentContext = alc.getCurrentContext(); if(context.context != currentContext.context) { System.out.println("Serious error! - context copy != current context"); System.exit(-1); } //check contexts device ALCdevice currentDevice = alc.getContextsDevice(context); if(device.device != currentDevice.device) { System.out.println("Serious error! - device copy != current contexts device"); System.exit(-1); } //get an enumerstion value System.out.println("Value of ALC_MAJOR_VERSION: " + alc.getEnumValue(device, "ALC_MAJOR_VERSION")); //close context again alc.destroyContext(context); //close it alc.closeDevice(device); } /** * main entry point * * @param args String array containing arguments */ public static void main(String[] args) { ALCTest alcTest = new ALCTest(); alcTest.execute(args); } } --- NEW FILE: ALTest.java --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/test/openal/ALTest.java /* * Copyright (c) 2002 Light Weight Java Game Library Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'Light Weight Java Game Library' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * [...3243 lines suppressed...] if ((error = al.getError()) != AL.NO_ERROR) displayALError("alSourceStopv : ", error); break; } } while (ch != 'Q'); // Delete the Sources al.deleteSources(numSources, Sys.getDirectBufferAddress(Sources)); } /** * main entry point * * @param args String array containing arguments */ public static void main(String[] args) { ALTest alTest = new ALTest(); alTest.execute(args); } } --- NEW FILE: ALUTTest.java --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/test/openal/ALUTTest.java /* * Copyright (c) 2002 Light Weight Java Game Library Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'Light Weight Java Game Library' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.lwjgl.test.openal; import org.lwjgl.Sys; import org.lwjgl.openal.AL; import org.lwjgl.openal.ALUTLoadWAVData; import java.nio.ByteBuffer; import java.nio.ByteOrder; /** * $Id: ALUTTest.java,v 1.1 2002/11/19 16:48:25 matzon Exp $ * * This is a basic play test using ALUT * Yes, over zealous use of getError ;) * * @author Brian Matzon <br...@ma...> * @version $Revision: 1.1 $ */ public class ALUTTest extends BasicTest { /** * Creates an instance of ALUTTest */ public ALUTTest() { super(); } /** * Runs the actual test, using supplied arguments */ protected void execute(String[] args) { if(args.length < 1) { System.out.println("please specify filename to play"); return; } int lastError; //initialize AL, using ALUT alut.init(args); //create 1 buffer and 1 source ByteBuffer buffers = ByteBuffer.allocateDirect(4); buffers.order(ByteOrder.nativeOrder()); ByteBuffer sources = ByteBuffer.allocateDirect(4); sources.order(ByteOrder.nativeOrder()); // al generate buffers and sources al.genBuffers(1, Sys.getDirectBufferAddress(buffers)); if((lastError = al.getError()) != AL.NO_ERROR) { exit(lastError); } al.genSources(1, Sys.getDirectBufferAddress(sources)); if((lastError = al.getError()) != AL.NO_ERROR) { exit(lastError); } //load wave data ALUTLoadWAVData file = alut.loadWAVFile(args[0]); if((lastError = al.getError()) != AL.NO_ERROR) { exit(lastError); } //copy to buffers al.bufferData(buffers.getInt(0), file.format, file.data, file.size, file.freq); if((lastError = al.getError()) != AL.NO_ERROR) { exit(lastError); } //unload file again alut.unloadWAV(file.format, file.data, file.size, file.freq); if((lastError = al.getError()) != AL.NO_ERROR) { exit(lastError); } //set up source input al.sourcei(sources.getInt(0), AL.BUFFER, buffers.getInt(0)); if((lastError = al.getError()) != AL.NO_ERROR) { exit(lastError); } //lets loop the sound al.sourcei(sources.getInt(0), AL.LOOPING, AL.TRUE); if((lastError = al.getError()) != AL.NO_ERROR) { exit(lastError); } //play source 0 al.sourcePlay(sources.getInt(0)); if((lastError = al.getError()) != AL.NO_ERROR) { exit(lastError); } //wait 5 secs try { System.out.println("Waiting 5 seconds for sound to complete"); Thread.sleep(5000); } catch (InterruptedException inte) { } //stop source 0 al.sourceStop(sources.getInt(0)); if((lastError = al.getError()) != AL.NO_ERROR) { exit(lastError); } //delete buffers and sources al.deleteSources(1, Sys.getDirectBufferAddress(sources)); if((lastError = al.getError()) != AL.NO_ERROR) { exit(lastError); } al.deleteBuffers(1, Sys.getDirectBufferAddress(buffers)); if((lastError = al.getError()) != AL.NO_ERROR) { exit(lastError); } //shutdown using ALUT alut.exit(); } /** * main entry point * * @param args String array containing arguments */ public static void main(String[] args) { ALUTTest alutTest = new ALUTTest(); alutTest.execute(args); } } --- NEW FILE: BasicTest.java --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/test/openal/BasicTest.java /* * Copyright (c) 2002 Light Weight Java Game Library Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'Light Weight Java Game Library' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.lwjgl.test.openal; import org.lwjgl.openal.AL; import org.lwjgl.openal.ALC; import org.lwjgl.openal.ALCcontext; import org.lwjgl.openal.ALCdevice; import org.lwjgl.openal.ALUT; import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.nio.IntBuffer; /** * $Id: BasicTest.java,v 1.1 2002/11/19 16:48:25 matzon Exp $ * * This is a basic test, which contains the most used stuff * * @author Brian Matzon <br...@ma...> * @version $Revision: 1.1 $ */ public abstract class BasicTest { /** OpenAL instance */ protected AL al; /** OpenAL Context instance */ protected ALC alc; /** OpenAL Util library instance */ protected ALUT alut; /** OpenAL context */ protected ALCcontext context; /** OpenAL device */ protected ALCdevice device; /** * Creates an instance of PlayTest */ public BasicTest() { al = new AL(); try { al.create(); } catch (Exception e) { e.printStackTrace(); return; } alc = new ALC(); try { alc.create(); } catch (Exception e) { e.printStackTrace(); return; } alut = new ALUT(); try { alut.create(); } catch (Exception e) { e.printStackTrace(); return; } } /** * Initializes OpenAL */ protected void alInitialize() { //get default device device = alc.openDevice(null); if(device == null) { throw new RuntimeException("Error creating device"); } //create context (no attributes specified) context = alc.createContext(device, 0); if(context == null) { throw new RuntimeException("Error creating context"); } //make context current alc.makeContextCurrent(context); if(alc.getError(device) != ALC.NO_ERROR) { throw new RuntimeException("An error occurred while making context current"); } } /** * Creates an integer buffer to hold specified ints * - strictly a utility method * * @param size how many int to contain * @return created IntBuffer */ protected IntBuffer createIntBuffer(int size) { ByteBuffer temp = ByteBuffer.allocateDirect(4*size); temp.order(ByteOrder.nativeOrder()); return temp.asIntBuffer(); } /** * Exits the test NOW, printing errorcode to stdout * * @param error Error code causing exit */ protected void exit(int error) { System.out.println("OpenAL Error: " + al.getString(error)); alut.exit(); System.exit(-1); } } --- NEW FILE: EAXTest.java --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/test/openal/EAXTest.java /* * Copyright (c) 2002 Light Weight Java Game Library Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'Light Weight Java Game Library' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.lwjgl.test.openal; import org.lwjgl.openal.eax.EAX; import org.lwjgl.openal.eax.EAXBufferProperties; import java.nio.IntBuffer; import org.lwjgl.Sys; import org.lwjgl.openal.AL; import org.lwjgl.openal.ALUTLoadWAVData; /** * $Id: EAXTest.java,v 1.1 2002/11/19 16:48:25 matzon Exp $ * * This test initializes EAX and tries to get and set some EAX values * * @author Brian Matzon <br...@ma...> * @version $Revision: 1.1 $ */ public class EAXTest extends BasicTest { /** * Creates an instance of EAXTest */ public EAXTest() { super(); } /** * Runs the actual test, using supplied arguments */ protected void execute(String[] args) { alInitialize(); EAX eax = new EAX(); try { eax.create(); } catch (Exception e) { e.printStackTrace(); return; } System.out.print("EAX supported..."); //no errorchecking from now on, since our context is gone. //shutdown alc.makeContextCurrent(null); alc.destroyContext(context); alc.closeDevice(device); System.out.println("test done."); } /** * main entry point * * @param args String array containing arguments */ public static void main(String[] args) { EAXTest eaxTest = new EAXTest(); eaxTest.execute(args); } } --- NEW FILE: PlayTest.java --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/test/openal/PlayTest.java /* * Copyright (c) 2002 Light Weight Java Game Library Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'Light Weight Java Game Library' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.lwjgl.test.openal; import org.lwjgl.Sys; import org.lwjgl.openal.AL; import org.lwjgl.openal.ALUTLoadWAVData; import java.nio.IntBuffer; /** * $Id: PlayTest.java,v 1.1 2002/11/19 16:48:25 matzon Exp $ * * This is a basic play test * Yes, over zealous use of getError ;) * * @author Brian Matzon <br...@ma...> * @version $Revision: 1.1 $ */ public class PlayTest extends BasicTest { /** * Creates an instance of PlayTest */ public PlayTest() { super(); } /** * Runs the actual test, using supplied arguments */ protected void execute(String[] args) { if(args.length < 1) { System.out.println("please specify filename to play"); return; } int lastError; //initialize AL, using ALC alInitialize(); //create 1 buffer and 1 source IntBuffer buffers = createIntBuffer(1); IntBuffer sources = createIntBuffer(1); // al generate buffers and sources al.genBuffers(1, Sys.getDirectBufferAddress(buffers)); if((lastError = al.getError()) != AL.NO_ERROR) { exit(lastError); } al.genSources(1, Sys.getDirectBufferAddress(sources)); if((lastError = al.getError()) != AL.NO_ERROR) { exit(lastError); } //load wave data ALUTLoadWAVData file = alut.loadWAVFile(args[0]); if((lastError = al.getError()) != AL.NO_ERROR) { exit(lastError); } //copy to buffers al.bufferData(buffers.get(0), file.format, file.data, file.size, file.freq); if((lastError = al.getError()) != AL.NO_ERROR) { exit(lastError); } //unload file again alut.unloadWAV(file.format, file.data, file.size, file.freq); if((lastError = al.getError()) != AL.NO_ERROR) { exit(lastError); } //set up source input al.sourcei(sources.get(0), AL.BUFFER, buffers.get(0)); if((lastError = al.getError()) != AL.NO_ERROR) { exit(lastError); } //lets loop the sound al.sourcei(sources.get(0), AL.LOOPING, AL.TRUE); if((lastError = al.getError()) != AL.NO_ERROR) { exit(lastError); } //play source 0 al.sourcePlay(sources.get(0)); if((lastError = al.getError()) != AL.NO_ERROR) { exit(lastError); } //wait 5 secs try { System.out.println("Waiting 5 seconds for sound to complete"); Thread.sleep(5000); } catch (InterruptedException inte) { } //stop source 0 al.sourceStop(sources.get(0)); if((lastError = al.getError()) != AL.NO_ERROR) { exit(lastError); } //delete buffers and sources al.deleteSources(1, Sys.getDirectBufferAddress(sources)); if((lastError = al.getError()) != AL.NO_ERROR) { exit(lastError); } al.deleteBuffers(1, Sys.getDirectBufferAddress(buffers)); if((lastError = al.getError()) != AL.NO_ERROR) { exit(lastError); } //no errorchecking from now on, since our context is gone. //shutdown alc.makeContextCurrent(null); alc.destroyContext(context); alc.closeDevice(device); } /** * main entry point * * @param args String array containing arguments */ public static void main(String[] args) { PlayTest playTest = new PlayTest(); playTest.execute(args); } } --- NEW FILE: PlayTestMemory.java --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/test/openal/PlayTestMemory.java /* * Copyright (c) 2002 Light Weight Java Game Library Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'Light Weight Java Game Library' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.lwjgl.test.openal; import org.lwjgl.Sys; import org.lwjgl.openal.AL; import org.lwjgl.openal.ALUTLoadWAVData; import java.io.BufferedInputStream; import java.io.ByteArrayOutputStream; import java.net.MalformedURLException; import java.net.URL; import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.nio.IntBuffer; /** * $Id: PlayTestMemory.java,v 1.1 2002/11/19 16:48:25 matzon Exp $ * * This is a basic play test * Yes, over zealous use of getError ;) * * @author Brian Matzon <br...@ma...> * @version $Revision: 1.1 $ */ public class PlayTestMemory extends BasicTest { /** * Creates an instance of PlayTestMemory */ public PlayTestMemory() { super(); } /** * Runs the actual test, using supplied arguments */ protected void execute(String[] args) { if(args.length < 1) { System.out.println("please specify filename to play"); return; } int lastError; //initialize AL, using ALC alInitialize(); //create 1 buffer and 1 source IntBuffer buffers = createIntBuffer(1); IntBuffer sources = createIntBuffer(1); // al generate buffers and sources al.genBuffers(1, Sys.getDirectBufferAddress(buffers)); if((lastError = al.getError()) != AL.NO_ERROR) { exit(lastError); } al.genSources(1, Sys.getDirectBufferAddress(sources)); if((lastError = al.getError()) != AL.NO_ERROR) { exit(lastError); } //load wave data ByteBuffer filebuffer = getData(args[0]); if(filebuffer == null) { System.out.println("Error loading file: " + args[0]); System.exit(-1); } ALUTLoadWAVData file = alut.loadWAVMemory(Sys.getDirectBufferAddress(filebuffer)); if((lastError = al.getError()) != AL.NO_ERROR) { exit(lastError); } //copy to buffers al.bufferData(buffers.get(0), file.format, file.data, file.size, file.freq); if((lastError = al.getError()) != AL.NO_ERROR) { exit(lastError); } //unload file again alut.unloadWAV(file.format, file.data, file.size, file.freq); if((lastError = al.getError()) != AL.NO_ERROR) { exit(lastError); } //set up source input al.sourcei(sources.get(0), AL.BUFFER, buffers.get(0)); if((lastError = al.getError()) != AL.NO_ERROR) { exit(lastError); } //lets loop the sound al.sourcei(sources.get(0), AL.LOOPING, AL.TRUE); if((lastError = al.getError()) != AL.NO_ERROR) { exit(lastError); } //play source 0 al.sourcePlay(sources.get(0)); if((lastError = al.getError()) != AL.NO_ERROR) { exit(lastError); } //wait 5 secs try { System.out.println("Waiting 5 seconds for sound to complete"); Thread.sleep(5000); } catch (InterruptedException inte) { } //stop source 0 al.sourceStop(sources.get(0)); if((lastError = al.getError()) != AL.NO_ERROR) { exit(lastError); } //delete buffers and sources al.deleteSources(1, Sys.getDirectBufferAddress(sources)); if((lastError = al.getError()) != AL.NO_ERROR) { exit(lastError); } al.deleteBuffers(1, Sys.getDirectBufferAddress(buffers)); if((lastError = al.getError()) != AL.NO_ERROR) { exit(lastError); } //no errorchecking from now on, since our context is gone. //shutdown alc.makeContextCurrent(null); alc.destroyContext(context); alc.closeDevice(device); } /** * Reads the file into a ByteBuffer * * @param filename Name of file to load * @return ByteBuffer containing file data */ protected ByteBuffer getData(String filename) { ByteBuffer buffer = null; URL url = null; String cwd = System.getProperty("user.dir"); try { url = new URL("file:///" + cwd + "/" + filename); } catch (MalformedURLException mue) { mue.printStackTrace(); } System.out.println("Attempting to load: " + url); try { BufferedInputStream bis = new BufferedInputStream(url.openStream()); ByteArrayOutputStream baos = new ByteArrayOutputStream(); int bufferLength = 4096; byte[] readBuffer = new byte[bufferLength]; int read = -1; while((read = bis.read(readBuffer, 0, bufferLength)) != -1) { baos.write(readBuffer, 0, read); } //done reading, close bis.close(); buffer = ByteBuffer.allocateDirect(baos.size()); buffer.order(ByteOrder.nativeOrder()); buffer.put(baos.toByteArray()); } catch (Exception ioe) { ioe.printStackTrace(); } return buffer; } /** * main entry point * * @param args String array containing arguments */ public static void main(String[] args) { PlayTestMemory playTestMemory = new PlayTestMemory(); playTestMemory.execute(args); } } |
|
From: Brian M. <ma...@us...> - 2002-11-19 16:48:28
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/opengl In directory sc8-pr-cvs1:/tmp/cvs-serv3465/opengl Added Files: Game.java Log Message: moved tests to org.lwjgl.test for easier seperation --- NEW FILE: Game.java --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/test/opengl/Game.java /* * Copyright (c) 2002 Light Weight Java Game Library Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'Light Weight Java Game Library' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** * $Id: Game.java,v 1.1 2002/11/19 16:48:25 matzon Exp $ * * Simple java test program. * * @author elias_naur <eli...@us...> * @version $Revision: 1.1 $ */ package org.lwjgl.test.opengl; import org.lwjgl.*; import org.lwjgl.opengl.*; import org.lwjgl.input.*; import java.nio.*; public final class Game { static { try { DisplayMode[] modes = Display.getAvailableDisplayModes(); System.out.println("Available display modes:"); for (int i = 0; i < modes.length; i ++) System.out.println(modes[i]); // For now let's just pick a mode we're certain to have Display.create(new DisplayMode(640, 480, 16, 60), true); System.out.println("Created display."); } catch (Exception e) { System.err.println("Failed to create display due to "+e); System.exit(1); } } public static final GL gl = new GL(16, 0, 16, 8); public static final GLU glu = new GLU(gl); static { try { gl.create(); System.out.println("Created OpenGL."); } catch (Exception e) { System.err.println("Failed to create OpenGL due to "+e); System.exit(1); } } /** Is the game finished? */ private static boolean finished; /** A rotating square! */ private static float angle; /** * No construction allowed */ private Game() { } public static void main(String[] arguments) { try { init(); while (!finished) { // Keyboard.poll(); mainLoop(); render(); gl.swapBuffers(); } } catch (Throwable t) { t.printStackTrace(); } finally { cleanup(); } } /** * All calculations are done in here */ private static void mainLoop() { angle += 1f; if (angle > 360.0f) angle = 0.0f; Mouse.poll(); if (Mouse.dx != 0 || Mouse.dy != 0 || Mouse.dz != 0) System.out.println("Mouse moved " + Mouse.dx + " " + Mouse.dy + " " + Mouse.dz); for (int i = 0; i < 8; i++) if (Mouse.isButtonDown(i)) System.out.println("Button " + i + " down"); /* Keyboard.poll(); if (Keyboard.isKeyDown(Keyboard.KEY_ESCAPE)) finished = true;*/ Keyboard.read(); for (int i = 0; i < Keyboard.getNumKeyboardEvents(); i++) { Keyboard.next(); if (Keyboard.key == Keyboard.KEY_ESCAPE && Keyboard.state) finished = true; if (Keyboard.key == Keyboard.KEY_T && Keyboard.state) System.out.println("Current time: " + Sys.getTime()); } } /** * All rendering is done in here */ private static void render() { gl.clear(GL.COLOR_BUFFER_BIT); gl.pushMatrix(); gl.translatef(Display.getWidth() / 2, Display.getHeight() / 2, 0.0f); gl.rotatef(angle, 0, 0, 1.0f); gl.begin(GL.QUADS); gl.vertex2i(-50, -50); gl.vertex2i(50, -50); gl.vertex2i(50, 50); gl.vertex2i(-50, 50); gl.end(); gl.popMatrix(); } /** * Initialize */ private static void init() throws Exception { Keyboard.create(); Keyboard.enableBuffer(); Mouse.create(); Sys.setTime(0); Sys.setProcessPriority(Sys.REALTIME_PRIORITY); System.out.println("Timer resolution: " + Sys.getTimerResolution()); // Go into orthographic projection mode. gl.matrixMode(GL.PROJECTION); gl.loadIdentity(); glu.ortho2D(0, Display.getWidth(), 0, Display.getHeight()); gl.matrixMode(GL.MODELVIEW); gl.loadIdentity(); gl.viewport(0, 0, Display.getWidth(), Display.getHeight()); ByteBuffer num_tex_units_buf = ByteBuffer.allocateDirect(4); num_tex_units_buf.order(ByteOrder.nativeOrder()); int buf_addr = Sys.getDirectBufferAddress(num_tex_units_buf); gl.getIntegerv(GL.MAX_TEXTURE_UNITS_ARB, buf_addr); System.out.println("Number of texture units: " + num_tex_units_buf.getInt()); // Fix the refresh rate to the display frequency. // gl.wglSwapIntervalEXT(1); } /** * Cleanup */ private static void cleanup() { Keyboard.destroy(); Mouse.destroy(); gl.destroy(); Display.destroy(); } } |
|
From: Brian M. <ma...@us...> - 2002-11-19 16:48:28
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test In directory sc8-pr-cvs1:/tmp/cvs-serv3465 Removed Files: MathTest.java Log Message: moved tests to org.lwjgl.test for easier seperation --- MathTest.java DELETED --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/test/MathTest.java |
|
From: Brian M. <ma...@us...> - 2002-11-19 16:48:28
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/input In directory sc8-pr-cvs1:/tmp/cvs-serv3465/input Added Files: JoystickTest.java Log Message: moved tests to org.lwjgl.test for easier seperation --- NEW FILE: JoystickTest.java --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/test/input/JoystickTest.java /* * JoystickTest.java * * Created on 13. november 2002, 22:49 */ package org.lwjgl.test.input; import java.awt.*; import java.awt.event.*; import org.lwjgl.input.Joystick; /** * * @author Brian Matzon */ public class JoystickTest extends Panel { private int counter = 0; public Thread animationThread; /** Creates a new instance of JoystickTest */ public JoystickTest() { try { Joystick.create(); } catch (Exception e) { e.printStackTrace(); return; } animationThread = new Thread() { public void run() { while (true) { paint(getGraphics()); try { Thread.sleep(250); } catch (InterruptedException inte) { inte.printStackTrace(); } } } }; animationThread.setDaemon(true); } public void paint(Graphics g) { if (g == null) { return; } g.setColor(Color.white); g.fillRect(0, 0, 640, 480); int y = 100; int x = 100; Joystick.poll(); g.setColor(Color.blue); g.drawString("Buttoncount: " + Joystick.buttonCount, x, y); y += 20; g.drawString("-----------------------------------------------", x, y); y += 20; g.drawString("x : " + Joystick.x, x, y); y += 20; g.drawString("y : " + Joystick.y, x, y); y += 20; if(Joystick.hasZAxis) { g.drawString("z : " + Joystick.z, x, y); y += 20; } if(Joystick.hasPOV) { g.drawString("pov: " + Joystick.pov, x, y); y += 20; } //paint buttons g.drawString("btn: ", x, y); x += g.getFontMetrics().stringWidth("btn: "); for(int i=0; i<Joystick.buttonCount; i++) { if(Joystick.isButtonDown(i)) { g.drawString(i + ", ", x, y); x+= 15; } } } public void update(Graphics g) { paint(g); } public void disposing() { Joystick.destroy(); } /** * @param args the command line arguments */ public static void main(String[] args) { final JoystickTest p = new JoystickTest(); final Frame f = new Frame(); f.setLayout(null); f.setSize(640, 480); f.setLocation(100, 100); f.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent we) { f.hide(); p.disposing(); f.dispose(); } }); p.setSize(640, 480); p.setLocation(0, 0); p.setBackground(Color.RED); f.add(p); f.show(); p.animationThread.start(); } } |
|
From: Brian M. <ma...@us...> - 2002-11-19 16:47:22
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/opengl In directory sc8-pr-cvs1:/tmp/cvs-serv2998/opengl Log Message: Directory /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/opengl added to the repository |
|
From: Brian M. <ma...@us...> - 2002-11-19 16:47:10
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/openal In directory sc8-pr-cvs1:/tmp/cvs-serv2921/openal Log Message: Directory /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/openal added to the repository |
|
From: Brian M. <ma...@us...> - 2002-11-19 16:42:11
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/input In directory sc8-pr-cvs1:/tmp/cvs-serv684/input Log Message: Directory /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/input added to the repository |
|
From: Brian M. <ma...@us...> - 2002-11-19 16:41:34
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/vector In directory sc8-pr-cvs1:/tmp/cvs-serv406/vector Log Message: Directory /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/vector added to the repository |
|
From: Brian M. <ma...@us...> - 2002-11-19 16:40:01
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common In directory sc8-pr-cvs1:/tmp/cvs-serv32309 Modified Files: org_lwjgl_openal_CoreAL.h Log Message: mod: getSource3f removed, since it isn't in the specs Index: org_lwjgl_openal_CoreAL.h CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/common/org_lwjgl_openal_CoreAL.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/org_lwjgl_openal_CoreAL.h,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- org_lwjgl_openal_CoreAL.h 6 Sep 2002 23:36:34 -0000 1.7 +++ org_lwjgl_openal_CoreAL.h 19 Nov 2002 16:39:57 -0000 1.8 @@ -305,14 +305,6 @@ /* * Class: org_lwjgl_openal_CoreAL - * Method: getSource3f - * Signature: (IIIII)V - */ -JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_getSource3f - (JNIEnv *, jobject, jint, jint, jint, jint, jint); - -/* - * Class: org_lwjgl_openal_CoreAL * Method: getSourcefv * Signature: (III)V */ |
|
From: Brian M. <ma...@us...> - 2002-11-19 16:35:24
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/openal In directory sc8-pr-cvs1:/tmp/cvs-serv30251 Modified Files: CoreAL.java Log Message: mod: getSource3f removed, since it isn't in the specs Index: CoreAL.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/openal/CoreAL.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/openal/CoreAL.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- CoreAL.java 6 Sep 2002 23:35:55 -0000 1.9 +++ CoreAL.java 19 Nov 2002 16:35:21 -0000 1.10 @@ -322,17 +322,6 @@ public native void getSourcef(int source, int pname, int floatdata); /** - * Gets a set of three floating point values from a source. - * - * @param source Source to get property from - * @param pname property to get - * @param v1 bytebuffer address to write float 1 to - * @param v2 bytebuffer address to write float 2 to - * @param v3 bytebuffer address to write float 3 to - */ - public native void getSource3f(int source, int pname, int v1, int v2, int v3); - - /** * Gets a floating point vector property from a Source object. * * @param source Source to get property from |
|
From: Elias N. <eli...@us...> - 2002-11-19 15:48:42
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/linux In directory sc8-pr-cvs1:/tmp/cvs-serv10506 Modified Files: org_lwjgl_openal_CoreAL.cpp Log Message: removed alGetSource3f Index: org_lwjgl_openal_CoreAL.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/linux/org_lwjgl_openal_CoreAL.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/linux/org_lwjgl_openal_CoreAL.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- org_lwjgl_openal_CoreAL.cpp 19 Nov 2002 15:22:28 -0000 1.2 +++ org_lwjgl_openal_CoreAL.cpp 19 Nov 2002 15:48:38 -0000 1.3 @@ -432,18 +432,6 @@ CHECK_AL_ERROR } -/* - * This function retrieves a set of three floating point values from a property of a source. - * - * C Specification: - * ALvoid alGetSource3f(ALuint source, ALenum param, ALfloat* v1, ALfloat* v2, ALfloat* v3); - */ -JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_getSource3f (JNIEnv *env, jobject obj, jint source, jint pname, jint v1, jint v2, jint v3) { -#warning FIXME: alGetSource3f -/* alGetSource3f((ALuint) source, (ALenum) pname, (ALfloat*) v1, (ALfloat*) v2, (ALfloat*) v3);*/ - CHECK_AL_ERROR -} - /** * This function retrieves a floating point-vector property of a source. * |
Update of /cvsroot/java-game-lib/LWJGL/src/native/win32 In directory sc8-pr-cvs1:/tmp/cvs-serv10107 Added Files: org_lwjgl_openal_eax_BaseEAX.cpp org_lwjgl_openal_eax_CoreEAX.cpp Removed Files: org_lwjgl_opengl_eax_BaseEAX.cpp org_lwjgl_opengl_eax_CoreEAX.cpp Log Message: opengl->openal (doh!) --- NEW FILE: org_lwjgl_openal_eax_BaseEAX.cpp --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/win32/org_lwjgl_openal_eax_BaseEAX.cpp /* * Copyright (c) 2002 Light Weight Java Game Library Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'Light Weight Java Game Library' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "org_lwjgl_openal_eax_BaseEAX.h" /* * Class: org_lwjgl_openal_eax_BaseEAX * Method: nCreate * Signature: ()Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_openal_eax_BaseEAX_nCreate (JNIEnv *env, jobject obj) { return true; } /* * Class: org_lwjgl_openal_eax_BaseEAX * Method: nDestroy * Signature: ()V */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_eax_BaseEAX_nDestroy (JNIEnv *env, jobject obj) { } --- NEW FILE: org_lwjgl_openal_eax_CoreEAX.cpp --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/win32/org_lwjgl_openal_eax_CoreEAX.cpp /* * Copyright (c) 2002 Light Weight Java Game Library Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'Light Weight Java Game Library' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** * $Id: org_lwjgl_openal_eax_CoreEAX.cpp,v 1.1 2002/11/19 15:47:31 matzon Exp $ * * This is the actual JNI implementation of the OpenAL EAX library. * * @author Brian Matzon <br...@ma...> * @version $Revision: 1.1 $ */ #include "org_lwjgl_openal_eax_CoreEAX.h" #include "checkALerror.h" #include "extal.h" /** * Throws an OAL exception with the specified message */ void ThrowException(JNIEnv *env, const char* message) { jclass cls = env->FindClass("org/lwjgl/openal/OpenALException"); env->ThrowNew(cls, message); } /* * Determines available EAX extensions */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_eax_CoreEAX_determineAvailableExtensions (JNIEnv *env, jobject obj) { #ifdef _WIN32 bool EAXSupported = false; //check that we have a current context if(alcGetCurrentContext() == NULL) { ThrowException(env, "Unable to determine EAX Extensions: No current context"); } //check for extension, and assign if available if(alIsExtensionPresent((ALubyte*) "EAX")) { eaxSet = (EAXSet)alGetProcAddress((ALubyte*) "EAXSet"); eaxGet = (EAXGet)alGetProcAddress((ALubyte*) "EAXGet"); EAXSupported = (eaxSet != NULL && eaxGet != NULL); } //throw exception if no EAX support if(EAXSupported != true) { ThrowException(env, "Unable to determine EAX Extensions"); } #else ThrowException(env, "EAX extensions not supported"); #endif } JNIEXPORT void JNICALL Java_org_lwjgl_openal_eax_CoreEAX_setGUID (JNIEnv *env, jobject obj) { #ifdef _WIN32 //get class/fields jclass eax_class = env->FindClass("org/lwjgl/openal/eax/CoreEAX"); jfieldID eaxBuffer_field = env->GetStaticFieldID(eax_class, "BUFFER_GUID", "I"); jfieldID eaxListener_field = env->GetStaticFieldID(eax_class, "LISTENER_GUID", "I"); //set fields env->SetStaticIntField(eax_class, eaxBuffer_field, (jint) &DSPROPSETID_EAX20_BufferProperties); env->SetStaticIntField(eax_class, eaxListener_field, (jint) &DSPROPSETID_EAX20_ListenerProperties); #else ThrowException(env, "EAX extensions not supported"); #endif } /* * This function retrieves an EAX value. * * C Specification: * ALenum EAXGet(const struct _GUID *propertySetID,ALuint property,ALuint source,ALvoid * *value,ALuint size); */ JNIEXPORT jint JNICALL Java_org_lwjgl_openal_eax_CoreEAX_eaxGet (JNIEnv *env, jobject obj, jint propertySetID, jint property, jint source, jint value, jint size) { #ifdef _WIN32 jint result = (jint) eaxGet((const struct _GUID*)propertySetID, (ALuint) property, (ALuint) source, (ALvoid*) value, (ALuint) size); CHECK_AL_ERROR return result; #else return AL_INVALID_OPERATION; #endif } /* * This function sets an EAX value. * * C Specification: * ALenum EAXSet(const struct _GUID *propertySetID,ALuint property,ALuint source,ALvoid * *value,ALuint size); */ JNIEXPORT jint JNICALL Java_org_lwjgl_openal_eax_CoreEAX_eaxSet (JNIEnv *env, jobject obj, jint propertySetID, jint property, jint source, jint value, jint size) { #ifdef _WIN32 jint result = (jint) eaxSet((const struct _GUID*)propertySetID, (ALuint) property, (ALuint) source, (ALvoid*) value, (ALuint) size); CHECK_AL_ERROR return result; #else return AL_INVALID_OPERATION; #endif } --- org_lwjgl_opengl_eax_BaseEAX.cpp DELETED --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/win32/org_lwjgl_opengl_eax_BaseEAX.cpp --- org_lwjgl_opengl_eax_CoreEAX.cpp DELETED --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/win32/org_lwjgl_opengl_eax_CoreEAX.cpp |
|
From: Elias N. <eli...@us...> - 2002-11-19 15:22:31
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/linux In directory sc8-pr-cvs1:/tmp/cvs-serv31700 Modified Files: extal.c org_lwjgl_Math.cpp org_lwjgl_Math_MatrixOpInvert_MatrixOpDirect.cpp org_lwjgl_openal_ALC.cpp org_lwjgl_openal_ALUT.cpp org_lwjgl_openal_CoreAL.cpp org_lwjgl_openal_eax_CoreEAX.cpp org_lwjgl_opengl_GL.cpp Log Message: Corrected author tags Index: extal.c CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/linux/extal.c =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/linux/extal.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- extal.c 19 Nov 2002 15:17:45 -0000 1.1 +++ extal.c 19 Nov 2002 15:22:27 -0000 1.2 @@ -36,6 +36,6 @@ * * This file contains the AL extension assigning mechanism * - * @author Brian Matzon <br...@ma...> + * @author elias_naur <eli...@ma...> * @version $Revision$ - */ \ No newline at end of file + */ Index: org_lwjgl_Math.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/linux/org_lwjgl_Math.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/linux/org_lwjgl_Math.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- org_lwjgl_Math.cpp 19 Nov 2002 08:50:57 -0000 1.1 +++ org_lwjgl_Math.cpp 19 Nov 2002 15:22:28 -0000 1.2 @@ -33,9 +33,9 @@ /** * $Id$ * - * Win32 maths library. + * linux maths library. * - * @author cix_foo <ci...@us...> + * @author elias_naur <eli...@us...> * @version $Revision$ */ Index: org_lwjgl_Math_MatrixOpInvert_MatrixOpDirect.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/linux/org_lwjgl_Math_MatrixOpInvert_MatrixOpDirect.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/linux/org_lwjgl_Math_MatrixOpInvert_MatrixOpDirect.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- org_lwjgl_Math_MatrixOpInvert_MatrixOpDirect.cpp 19 Nov 2002 08:50:57 -0000 1.1 +++ org_lwjgl_Math_MatrixOpInvert_MatrixOpDirect.cpp 19 Nov 2002 15:22:28 -0000 1.2 @@ -33,9 +33,9 @@ /** * $Id$ * - * Win32 math library. + * linux math library. * - * @author cix_foo <ci...@us...> + * @author elias_naur <eli...@us...> * @version $Revision$ */ Index: org_lwjgl_openal_ALC.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/linux/org_lwjgl_openal_ALC.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/linux/org_lwjgl_openal_ALC.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- org_lwjgl_openal_ALC.cpp 19 Nov 2002 14:08:21 -0000 1.1 +++ org_lwjgl_openal_ALC.cpp 19 Nov 2002 15:22:28 -0000 1.2 @@ -35,7 +35,7 @@ * * This is the actual JNI implementation of the OpenAL context/device library. * - * @author Brian Matzon <br...@ma...> + * @author elias_naur <eli...@ma...> * @version $Revision$ */ #include "org_lwjgl_openal_ALC.h" Index: org_lwjgl_openal_ALUT.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/linux/org_lwjgl_openal_ALUT.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/linux/org_lwjgl_openal_ALUT.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- org_lwjgl_openal_ALUT.cpp 19 Nov 2002 14:08:21 -0000 1.1 +++ org_lwjgl_openal_ALUT.cpp 19 Nov 2002 15:22:28 -0000 1.2 @@ -36,7 +36,7 @@ * This is the actual JNI implementation of the OpenAL utility library. * It handles whatever is needed for proper OpenAL support via using Java. * - * @author Brian Matzon <br...@ma...> + * @author elias_naur <eli...@ma...> * @version $Revision$ */ #include "org_lwjgl_openal_ALUT.h" Index: org_lwjgl_openal_CoreAL.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/linux/org_lwjgl_openal_CoreAL.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/linux/org_lwjgl_openal_CoreAL.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- org_lwjgl_openal_CoreAL.cpp 19 Nov 2002 14:08:21 -0000 1.1 +++ org_lwjgl_openal_CoreAL.cpp 19 Nov 2002 15:22:28 -0000 1.2 @@ -36,7 +36,7 @@ * This is the actual JNI implementation of the OpenAL core. It handles * whatever is needed for proper OpenAL support via using Java. * - * @author Brian Matzon <br...@ma...> + * @author elias_naur <eli...@ma...> * @version $Revision$ */ #include "org_lwjgl_openal_CoreAL.h" Index: org_lwjgl_openal_eax_CoreEAX.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/linux/org_lwjgl_openal_eax_CoreEAX.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/linux/org_lwjgl_openal_eax_CoreEAX.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- org_lwjgl_openal_eax_CoreEAX.cpp 19 Nov 2002 14:33:49 -0000 1.1 +++ org_lwjgl_openal_eax_CoreEAX.cpp 19 Nov 2002 15:22:28 -0000 1.2 @@ -35,7 +35,7 @@ * * This is the actual JNI implementation of the OpenAL EAX library. * - * @author Brian Matzon <br...@ma...> + * @author elias_naur <eli...@ma...> * @version $Revision$ */ #include "org_lwjgl_openal_eax_CoreEAX.h" Index: org_lwjgl_opengl_GL.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/linux/org_lwjgl_opengl_GL.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/linux/org_lwjgl_opengl_GL.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- org_lwjgl_opengl_GL.cpp 19 Nov 2002 08:50:57 -0000 1.1 +++ org_lwjgl_opengl_GL.cpp 19 Nov 2002 15:22:28 -0000 1.2 @@ -35,7 +35,7 @@ * * GL extensions library. * - * @author cix_foo <ci...@us...> + * @author elias_naur <eli...@us...> * @version $Revision$ */ |
|
From: Elias N. <eli...@us...> - 2002-11-19 15:17:49
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/linux In directory sc8-pr-cvs1:/tmp/cvs-serv29952 Added Files: extal.c Log Message: linux extal.h --- NEW FILE: extal.c --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/linux/extal.c /* * Copyright (c) 2002 Light Weight Java Game Library Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'Light Weight Java Game Library' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "extal.h" /** * $Id: extal.c,v 1.1 2002/11/19 15:17:45 elias_naur Exp $ * * This file contains the AL extension assigning mechanism * * @author Brian Matzon <br...@ma...> * @version $Revision: 1.1 $ */ |
|
From: Elias N. <eli...@us...> - 2002-11-19 14:58:37
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/linux In directory sc8-pr-cvs1:/tmp/cvs-serv22028 Modified Files: Makefile Log Message: Updated linux Makefile Index: Makefile CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/linux/Makefile =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/linux/Makefile,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- Makefile 19 Nov 2002 14:08:21 -0000 1.8 +++ Makefile 19 Nov 2002 14:58:34 -0000 1.9 @@ -39,7 +39,8 @@ # version $Revision$ # -GCC = g++ +GCC = gcc +G++ = g++ LINK = g++ JAVAHOME=/usr/java/j2sdk1.4.1_01 LIBCSRC=../common/extgl.c @@ -61,9 +62,12 @@ $(LINK) -shared -o $@ $^ $(LINKOPTS) cp $@ ../../../bin/ -.SUFFIXES: .cpp .so .o .java .h .class +.SUFFIXES: .cpp .so .o .java .h .class .c %.o : %.cpp + $(G++) $(DEBUG_FLAGS) -Wall -I$(JAVAHOME)/include -I../common -I$(JAVAHOME)/include/linux -c -o $@ $< + +%.o : %.c $(GCC) $(DEBUG_FLAGS) -Wall -I$(JAVAHOME)/include -I../common -I$(JAVAHOME)/include/linux -c -o $@ $< testprog : main.o |
|
From: Elias N. <eli...@us...> - 2002-11-19 14:38:03
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/linux In directory sc8-pr-cvs1:/tmp/cvs-serv14644 Added Files: checkALerror.h Log Message: Added linux specific checkALerror.h --- NEW FILE: checkALerror.h --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/linux/checkALerror.h /* checkGLerror.h Author: C. Prince Created: 8 November 2001 Error checking for OpenGL bindings */ #ifndef _CHECKGLERROR_H_INCLUDED_ #define _CHECKGLERROR_H_INCLUDED_ #ifdef _DEBUG #include <jni.h> #include <AL/al.h> #define CHECK_AL_ERROR \ { \ int err = alGetError(); \ if (err != AL_NO_ERROR) { \ jclass cls = env->FindClass("org/lwjgl/openal/OpenALException"); \ env->ThrowNew(cls, (const char*) alGetString(err)); \ env->DeleteLocalRef(cls); \ } \ } /* only available if deviceaddress is specified in method */ #define CHECK_ALC_ERROR \ { \ int err = alcGetError((ALCdevice*) deviceaddress); \ if (err != AL_NO_ERROR) { \ jclass cls = env->FindClass("org/lwjgl/openal/OpenALException"); \ env->ThrowNew(cls, (const char*) alcGetString((ALCdevice*) deviceaddress, err)); \ env->DeleteLocalRef(cls); \ } \ } #else #define CHECK_AL_ERROR #define CHECK_ALC_ERROR #endif /* _DEBUG */ #endif /* _CHECKGLERROR_H_INCLUDED_ */ |
|
From: Elias N. <eli...@us...> - 2002-11-19 14:33:52
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/linux In directory sc8-pr-cvs1:/tmp/cvs-serv12991 Modified Files: org_lwjgl_openal_BaseAL.cpp Added Files: org_lwjgl_openal_eax_BaseEAX.cpp org_lwjgl_openal_eax_CoreEAX.cpp Log Message: Added EAX linux files --- NEW FILE: org_lwjgl_openal_eax_BaseEAX.cpp --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/linux/org_lwjgl_openal_eax_BaseEAX.cpp /* * Copyright (c) 2002 Light Weight Java Game Library Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'Light Weight Java Game Library' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "org_lwjgl_openal_eax_BaseEAX.h" /* * Class: org_lwjgl_openal_eax_BaseEAX * Method: nCreate * Signature: ()Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_openal_eax_BaseEAX_nCreate (JNIEnv *env, jobject obj) { return false; } /* * Class: org_lwjgl_openal_eax_BaseEAX * Method: nDestroy * Signature: ()V */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_eax_BaseEAX_nDestroy (JNIEnv *env, jobject obj) { } --- NEW FILE: org_lwjgl_openal_eax_CoreEAX.cpp --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/linux/org_lwjgl_openal_eax_CoreEAX.cpp /* * Copyright (c) 2002 Light Weight Java Game Library Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'Light Weight Java Game Library' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** * $Id: org_lwjgl_openal_eax_CoreEAX.cpp,v 1.1 2002/11/19 14:33:49 elias_naur Exp $ * * This is the actual JNI implementation of the OpenAL EAX library. * * @author Brian Matzon <br...@ma...> * @version $Revision: 1.1 $ */ #include "org_lwjgl_openal_eax_CoreEAX.h" #include "checkALerror.h" #include "extal.h" #include <AL/altypes.h> /** * Throws an OAL exception with the specified message */ void ThrowException(JNIEnv *env, const char* message) { jclass cls = env->FindClass("org/lwjgl/openal/OpenALException"); env->ThrowNew(cls, message); } /* * Determines available EAX extensions */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_eax_CoreEAX_determineAvailableExtensions (JNIEnv *env, jobject obj) { #ifdef _WIN32 bool EAXSupported = false; //check that we have a current context if(alcGetCurrentContext() == NULL) { ThrowException(env, "Unable to determine EAX Extensions: No current context"); } //check for extension, and assign if available if(alIsExtensionPresent((ALubyte*) "EAX")) { eaxSet = (EAXSet)alGetProcAddress((ALubyte*) "EAXSet"); eaxGet = (EAXGet)alGetProcAddress((ALubyte*) "EAXGet"); EAXSupported = (eaxSet != NULL && eaxGet != NULL); } //throw exception if no EAX support if(EAXSupported != true) { ThrowException(env, "Unable to determine EAX Extensions"); } #else ThrowException(env, "EAX extensions not supported"); #endif } JNIEXPORT void JNICALL Java_org_lwjgl_openal_eax_CoreEAX_setGUID (JNIEnv *env, jobject obj) { #ifdef _WIN32 //get class/fields jclass eax_class = env->FindClass("org/lwjgl/openal/eax/CoreEAX"); jfieldID eaxBuffer_field = env->GetStaticFieldID(eax_class, "BUFFER_GUID", "I"); jfieldID eaxListener_field = env->GetStaticFieldID(eax_class, "LISTENER_GUID", "I"); //set fields env->SetStaticIntField(eax_class, eaxBuffer_field, (jint) &DSPROPSETID_EAX20_BufferProperties); env->SetStaticIntField(eax_class, eaxListener_field, (jint) &DSPROPSETID_EAX20_ListenerProperties); #else ThrowException(env, "EAX extensions not supported"); #endif } /* * This function retrieves an EAX value. * * C Specification: * ALenum EAXGet(const struct _GUID *propertySetID,ALuint property,ALuint source,ALvoid * *value,ALuint size); */ JNIEXPORT jint JNICALL Java_org_lwjgl_openal_eax_CoreEAX_eaxGet (JNIEnv *env, jobject obj, jint propertySetID, jint property, jint source, jint value, jint size) { #ifdef _WIN32 jint result = (jint) eaxGet((const struct _GUID*)propertySetID, (ALuint) property, (ALuint) source, (ALvoid*) value, (ALuint) size); CHECK_AL_ERROR return result; #else return AL_ILLEGAL_COMMAND; #endif } /* * This function sets an EAX value. * * C Specification: * ALenum EAXSet(const struct _GUID *propertySetID,ALuint property,ALuint source,ALvoid * *value,ALuint size); */ JNIEXPORT jint JNICALL Java_org_lwjgl_openal_eax_CoreEAX_eaxSet (JNIEnv *env, jobject obj, jint propertySetID, jint property, jint source, jint value, jint size) { #ifdef _WIN32 jint result = (jint) eaxSet((const struct _GUID*)propertySetID, (ALuint) property, (ALuint) source, (ALvoid*) value, (ALuint) size); CHECK_AL_ERROR return result; #else return AL_ILLEGAL_COMMAND; #endif } Index: org_lwjgl_openal_BaseAL.cpp CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/linux/org_lwjgl_openal_BaseAL.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/linux/org_lwjgl_openal_BaseAL.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- org_lwjgl_openal_BaseAL.cpp 19 Nov 2002 14:08:21 -0000 1.1 +++ org_lwjgl_openal_BaseAL.cpp 19 Nov 2002 14:33:48 -0000 1.2 @@ -47,4 +47,4 @@ * Signature: ()V */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_BaseAL_nDestroy(JNIEnv *env, jobject obj) { -} \ No newline at end of file +} |
|
From: Elias N. <eli...@us...> - 2002-11-19 14:22:06
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/openal/test In directory sc8-pr-cvs1:/tmp/cvs-serv7967/java/org/lwjgl/openal/test Modified Files: ALTest.java Log Message: Fixed filenames in ALTest.java Index: ALTest.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/openal/test/ALTest.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/openal/test/ALTest.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- ALTest.java 12 Sep 2002 01:31:20 -0000 1.13 +++ ALTest.java 19 Nov 2002 14:22:02 -0000 1.14 @@ -299,7 +299,7 @@ // Initialize Open AL manually //Open device - device = alc.openDevice("DirectSound3D"); + device = alc.openDevice(null); //Create context(s) context = alc.createContext(device, 0); //Set active context @@ -341,7 +341,7 @@ // Load in samples to be used by Test functions // Load footsteps.wav - ALUTLoadWAVData data = alut.loadWAVFile("footsteps.wav"); + ALUTLoadWAVData data = alut.loadWAVFile("Footsteps.wav"); if ((error = al.getError()) != AL.NO_ERROR) { displayALError("alutLoadWAVFile footsteps.wav : ", error); // Delete Buffers @@ -395,7 +395,7 @@ } // Load wave1.wav - data = alut.loadWAVFile("wave1.wav"); + data = alut.loadWAVFile("Wave1.WAV"); if ((error = al.getError()) != AL.NO_ERROR) { displayALError("alutLoadWAVFile wave1.wav : ", error); // Delete Buffers @@ -422,7 +422,7 @@ } // Load Wave2.wav - data = alut.loadWAVFile("Wave2.wav"); + data = alut.loadWAVFile("Wave2.WAV"); if ((error = al.getError()) != AL.NO_ERROR) { displayALError("alutLoadWAVFile Wave2.wav : ", error); // Delete Buffers @@ -449,7 +449,7 @@ } // Load wave3.wav - data = alut.loadWAVFile("wave3.wav"); + data = alut.loadWAVFile("Wave3.WAV"); if ((error = al.getError()) != AL.NO_ERROR) { displayALError("alutLoadWAVFile wave3.wav : ", error); // Delete Buffers @@ -476,7 +476,7 @@ } // Load wave4.wav - data = alut.loadWAVFile("wave4.wav"); + data = alut.loadWAVFile("Wave4.WAV"); if ((error = al.getError()) != AL.NO_ERROR) { displayALError("alutLoadWAVFile wave4.wav : ", error); // Delete Buffers @@ -3279,4 +3279,4 @@ ALTest alTest = new ALTest(); alTest.execute(args); } -} \ No newline at end of file +} |
|
From: Elias N. <eli...@us...> - 2002-11-19 14:08:24
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/linux In directory sc8-pr-cvs1:/tmp/cvs-serv3348 Modified Files: Makefile Added Files: org_lwjgl_openal_ALC.cpp org_lwjgl_openal_ALUT.cpp org_lwjgl_openal_BaseAL.cpp org_lwjgl_openal_CoreAL.cpp org_lwjgl_openal_eax_EAXBufferProperties.cpp org_lwjgl_openal_eax_EAXListenerProperties.cpp Log Message: Initial OpenAL linux support --- NEW FILE: org_lwjgl_openal_ALC.cpp --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/linux/org_lwjgl_openal_ALC.cpp /* * Copyright (c) 2002 Light Weight Java Game Library Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'Light Weight Java Game Library' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** * $Id: org_lwjgl_openal_ALC.cpp,v 1.1 2002/11/19 14:08:21 elias_naur Exp $ * * This is the actual JNI implementation of the OpenAL context/device library. * * @author Brian Matzon <br...@ma...> * @version $Revision: 1.1 $ */ #include "org_lwjgl_openal_ALC.h" #include "checkALerror.h" /* OpenAL includes */ #include <AL/alc.h> /* * Class: org_lwjgl_openal_ALC * Method: nCreate * Signature: ()Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_openal_ALC_nCreate (JNIEnv *env, jobject obj) { return true; } /* * Class: org_lwjgl_openal_ALC * Method: nDestroy * Signature: ()V */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_ALC_nDestroy (JNIEnv *env, jobject obj) { } /** * This function returns strings related to the context. * * C Specification: * ALubyte * alcGetString(ALCdevice *device, ALenum token); */ JNIEXPORT jstring JNICALL Java_org_lwjgl_openal_ALC_getString (JNIEnv *env, jobject obj, jobject device, jint token) { jclass class_device = env->GetObjectClass(device); jfieldID field_device = env->GetFieldID(class_device, "device", "I"); jint deviceaddress = env->GetIntField(device, field_device); const char* alcString = (const char*) alcGetString((ALCdevice*) deviceaddress, (ALenum) token); if(alcString == NULL) { return NULL; } jstring string = env->NewStringUTF(alcString); CHECK_ALC_ERROR return string; } /** * This function returns integers related to the context. * * C Specification: * ALvoid alcGetIntegerv(ALCdevice *device, ALenum token, ALsizei size, ALint *dest); */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_ALC_getIntegerv (JNIEnv *env, jobject obj, jobject device, jint token, jint size, jint dest) { jclass device_class = env->GetObjectClass(device); jfieldID device_field = env->GetFieldID(device_class, "device", "I"); jint deviceaddress = env->GetIntField(device, device_field); alcGetIntegerv((ALCdevice*) deviceaddress, (ALenum) token, (ALsizei) size, (ALint*) dest); CHECK_ALC_ERROR } /** * This function opens a device by name. * * C Specification: * ALCdevice *alcOpenDevice( const ALubyte *tokstr ); */ JNIEXPORT jobject JNICALL Java_org_lwjgl_openal_ALC_openDevice (JNIEnv *env, jobject obj, jstring tokstr) { ALubyte* tokenstring; if(tokstr != NULL) { tokenstring = (ALubyte*) (env->GetStringUTFChars(tokstr, 0)); } else { tokenstring = NULL; } /* get device */ ALCdevice* device = alcOpenDevice(tokenstring); /* if error - cleanup and get out */ if(device == NULL) { if(tokenstring != NULL) { env->ReleaseStringUTFChars((jstring)tokenstring, 0); } return NULL; } /* get ready to create ALCdevice instance */ jobject alcDevice_object = NULL; jclass alcDevice_class = NULL; jmethodID alcDevice_method = NULL; /* find class and constructor */ alcDevice_class = env->FindClass("org/lwjgl/openal/ALCdevice"); alcDevice_method = env->GetMethodID(alcDevice_class, "<init>", "(I)V"); /* create instance */ alcDevice_object = env->NewObject(alcDevice_class, alcDevice_method, (int) device); /* clean up */ env->ReleaseStringUTFChars((jstring)tokenstring, 0); return alcDevice_object; } /** * This function closes a device by name. * * C Specification: * void alcCloseDevice( ALCdevice *dev ); */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_ALC_closeDevice (JNIEnv *env, jobject obj, jobject device) { jclass device_class = env->GetObjectClass(device); jfieldID device_field = env->GetFieldID(device_class, "device", "I"); jint deviceaddress = env->GetIntField(device, device_field); alcCloseDevice((ALCdevice*) deviceaddress); CHECK_ALC_ERROR } /** * This function creates a context using a specified device. * * C Specification: * ALCcontext* alcCreateContext( ALCdevice *dev, ALint* attrlist ); */ JNIEXPORT jobject JNICALL Java_org_lwjgl_openal_ALC_createContext (JNIEnv *env, jobject obj, jobject device, jint attrlist) { /* get device address */ jclass device_class = env->GetObjectClass(device); jfieldID device_field = env->GetFieldID(device_class, "device", "I"); jint deviceaddress = env->GetIntField(device, device_field); ALCcontext* context = alcCreateContext((ALCdevice*) deviceaddress, (ALint*) attrlist); /* if error - get out */ if(context == NULL) { return NULL; } /* get ready to create ALCcontext instance */ jobject alcContext_object = NULL; jclass alcContext_class = NULL; jmethodID alcContext_method = NULL; /* find class and constructor */ alcContext_class = env->FindClass("org/lwjgl/openal/ALCcontext"); alcContext_method = env->GetMethodID(alcContext_class, "<init>", "(I)V"); /* create instance */ alcContext_object = env->NewObject(alcContext_class, alcContext_method, (int) context); CHECK_ALC_ERROR return alcContext_object; } /** * This function makes a specified context the current context. * * C Specification: * ALCboolean alcMakeContextCurrent(ALCcontext *context); */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_openal_ALC_makeContextCurrent (JNIEnv *env, jobject obj, jobject context) { if(context == NULL) { return alcMakeContextCurrent(NULL); } /* get context address */ jclass context_class = env->GetObjectClass(context); jfieldID context_field = env->GetFieldID(context_class, "context", "I"); jint contextaddress = env->GetIntField(context, context_field); return alcMakeContextCurrent((ALCcontext*) contextaddress); } /** * This function tells a context to begin processing. * * C Specification: * void alcProcessContext(ALCcontext *context); */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_ALC_processContext (JNIEnv *env, jobject obj, jobject context) { /* get context address */ jclass context_class = env->GetObjectClass(context); jfieldID context_field = env->GetFieldID(context_class, "context", "I"); jint contextaddress = env->GetIntField(context, context_field); alcProcessContext((ALCcontext*) contextaddress); } /** * This function retrieves the current context. * * C Specification: * ALCcontext* alcGetCurrentContext( ALvoid ); */ JNIEXPORT jobject JNICALL Java_org_lwjgl_openal_ALC_getCurrentContext (JNIEnv *env, jobject obj) { ALCcontext* context = alcGetCurrentContext(); if(context == NULL) { return NULL; } /* get ready to create ALCcontext instance */ jobject alcContext_object = NULL; jclass alcContext_class = NULL; jmethodID alcContext_method = NULL; /* find class and constructor */ alcContext_class = env->FindClass("org/lwjgl/openal/ALCcontext"); alcContext_method = env->GetMethodID(alcContext_class, "<init>", "(I)V"); /* create instance */ alcContext_object = env->NewObject(alcContext_class, alcContext_method, (int) context); return alcContext_object; } /** * This function retrieves the specified contexts device * * C Specification: * ALCdevice* alcGetContextsDevice(ALCcontext *context); */ JNIEXPORT jobject JNICALL Java_org_lwjgl_openal_ALC_getContextsDevice (JNIEnv *env, jobject obj, jobject context) { /* get context address */ jclass context_class = env->GetObjectClass(context); jfieldID context_field = env->GetFieldID(context_class, "context", "I"); jint contextaddress = env->GetIntField(context, context_field); ALCdevice* device = alcGetContextsDevice((ALCcontext*) contextaddress); if(device == NULL) { return NULL; } /* get ready to create ALCdevice instance */ jobject alcDevice_object = NULL; jclass alcDevice_class = NULL; jmethodID alcDevice_method = NULL; /* find class and constructor */ alcDevice_class = env->FindClass("org/lwjgl/openal/ALCdevice"); alcDevice_method = env->GetMethodID(alcDevice_class, "<init>", "(I)V"); /* create instance */ alcDevice_object = env->NewObject(alcDevice_class, alcDevice_method, (int) device); return alcDevice_object; } /** * This function suspends processing on a specified context. * * C Specification: * void alcSuspendContext(ALCcontext *context); */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_ALC_suspendContext (JNIEnv *env, jobject obj, jobject context) { /* get context address */ jclass context_class = env->GetObjectClass(context); jfieldID context_field = env->GetFieldID(context_class, "context", "I"); jint contextaddress = env->GetIntField(context, context_field); alcSuspendContext((ALCcontext*) contextaddress); } /** * This function destroys a context. * * C Specification: * void alcDestroyContext(ALCcontext *context); */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_ALC_destroyContext (JNIEnv *env, jobject obj, jobject context) { /* get context address */ jclass context_class = env->GetObjectClass(context); jfieldID context_field = env->GetFieldID(context_class, "context", "I"); jint contextaddress = env->GetIntField(context, context_field); alcDestroyContext((ALCcontext*) contextaddress); } /** * This function retrieves the specified devices context error state. * * C Specification: * ALCenum alcGetError(ALCdevice *device); */ JNIEXPORT jint JNICALL Java_org_lwjgl_openal_ALC_getError (JNIEnv *env, jobject obj, jobject device) { /* get device address */ jclass device_class = env->GetObjectClass(device); jfieldID device_field = env->GetFieldID(device_class, "device", "I"); jint deviceaddress = env->GetIntField(device, device_field); jint result = alcGetError((ALCdevice*) deviceaddress); CHECK_ALC_ERROR return result; } /** * This function queries if a specified context extension is available. * * C Specification: * ALboolean alcIsExtensionPresent(ALCdevice *device, ALubyte *extName); */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_openal_ALC_isExtensionPresent (JNIEnv *env, jobject obj, jobject device, jstring extName) { /* get device address */ jclass device_class = env->GetObjectClass(device); jfieldID device_field = env->GetFieldID(device_class, "device", "I"); jint deviceaddress = env->GetIntField(device, device_field); /* get extension */ ALubyte* functionname = (ALubyte*) (env->GetStringUTFChars(extName, 0)); jboolean result = (jboolean) alcIsExtensionPresent((ALCdevice*) deviceaddress, functionname); env->ReleaseStringUTFChars((jstring)functionname, 0); CHECK_ALC_ERROR return result; } /** * This function retrieves the enum value for a specified enumeration name. * * C Specification: * ALenum alcGetEnumValue(ALCdevice *device, ALubyte *enumName); */ JNIEXPORT jint JNICALL Java_org_lwjgl_openal_ALC_getEnumValue (JNIEnv *env, jobject obj, jobject device, jstring enumName) { /* get device address */ jclass device_class = env->GetObjectClass(device); jfieldID device_field = env->GetFieldID(device_class, "device", "I"); jint deviceaddress = env->GetIntField(device, device_field); /* get extension */ ALubyte* enumerationname = (ALubyte*) (env->GetStringUTFChars(enumName, 0)); jint result = (jint) alcGetEnumValue((ALCdevice*) deviceaddress, enumerationname); env->ReleaseStringUTFChars((jstring)enumerationname, 0); CHECK_ALC_ERROR return result; } --- NEW FILE: org_lwjgl_openal_ALUT.cpp --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/linux/org_lwjgl_openal_ALUT.cpp /* * Copyright (c) 2002 Light Weight Java Game Library Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'Light Weight Java Game Library' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** * $Id: org_lwjgl_openal_ALUT.cpp,v 1.1 2002/11/19 14:08:21 elias_naur Exp $ * * This is the actual JNI implementation of the OpenAL utility library. * It handles whatever is needed for proper OpenAL support via using Java. * * @author Brian Matzon <br...@ma...> * @version $Revision: 1.1 $ */ #include "org_lwjgl_openal_ALUT.h" #include "checkALerror.h" /* OpenAL includes */ #include <AL/alut.h> #include <stdlib.h> /* * Class: org_lwjgl_openal_ALUT * Method: nCreate * Signature: ()Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_openal_ALUT_nCreate (JNIEnv *env, jobject obj) { return true; } /* * Class: org_lwjgl_openal_ALUT * Method: nDestroy * Signature: ()V */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_ALUT_nDestroy (JNIEnv *env, jobject obj) { } /** * This function initializes OpenAL. * * C Specification: * void alutInit(int *argc, char *argv[]); */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_ALUT_init (JNIEnv *env, jobject obj, jobjectArray jargv) { /* obtain the size the array */ jsize argc = env->GetArrayLength(jargv); /* Declare a char array for argv */ const char* argv[128]; int i; for (i=0;i<argc;i++) { /* obtain the current object from the object array */ jstring string = (jstring) env->GetObjectArrayElement(jargv, i); /* Convert the object just obtained into a String */ const char *str = env->GetStringUTFChars(string, 0); /* Build the argv array */ argv[i] = str; /* Free up memory to prevent memory leaks */ env->ReleaseStringUTFChars(string, str); } /* Increment argc to adjust the difference between Java and C arguments */ argc++; /* call the actual implementation */ alutInit((ALint*) &argc,(char**) argv); CHECK_AL_ERROR } /* * This function loads a WAV file into memory from a file. * * C Specification: * ALboolean alutLoadWAVFile(const char *fname, ALsizei *format, ALsizei *size, ALsizei *bits, * ALsizei *freq, ALboolean *loop ); */ JNIEXPORT jobject JNICALL Java_org_lwjgl_openal_ALUT_loadWAVFile (JNIEnv *env, jobject obj, jstring file) { /* * NOTE: Since Java doesn't support modification of supplied * variables (pass by value). We will return a class that * holds what is needed to unload the file again. * The data field contains the offset at whcih the data * segment begins (ie. a pointer). This will *not* work * on 64 bit platforms, since we use an jint for this. */ /* actual file info object */ jobject alutLoadWAVFile_object = NULL; /* class type to find */ jclass alutLoadWAVFile_class = NULL; /* method id - will be set to constructor of alutLoadWAVData */ jmethodID methodID = NULL; /* sound data vars */ jint format, size, freq; jboolean loop; void* data; ALbyte* filename = (ALbyte*) (env->GetStringUTFChars(file, 0)); /* load wave file */ alutLoadWAVFile(filename, (ALenum*) &format, (void**) &data, (ALsizei*) &size, (ALsizei*) &freq, (ALboolean*) &loop); /* get class */ alutLoadWAVFile_class = env->FindClass("org/lwjgl/openal/ALUTLoadWAVData"); /* get constructor */ methodID = env->GetMethodID(alutLoadWAVFile_class, "<init>", "(IIIIZ)V"); /* create object */ alutLoadWAVFile_object = env->NewObject(alutLoadWAVFile_class, methodID, format, (int) data, size, freq, loop); /* release chars */ env->ReleaseStringUTFChars((jstring)filename, 0); CHECK_AL_ERROR return alutLoadWAVFile_object; } /** * This function loads a WAV file into memory from another memory location. * * C Specification: * ALvoid alutLoadWAVMemory(ALbyte *memory,ALenum *format,ALvoid **data,ALsizei * *size,ALsizei *freq,ALboolean *loop) */ JNIEXPORT jobject JNICALL Java_org_lwjgl_openal_ALUT_loadWAVMemory (JNIEnv *env, jobject obj, jint buffer) { /* * NOTE: Since Java doesn't support modification of supplied * variables (pass by value). We will return a class that * holds what is needed to unload the file again. * The data field contains the offset at whcih the data * segment begins (ie. a pointer). This will *not* work * on 64 bit platforms, since we use an jint for this. */ /* actual file info object */ jobject alutLoadWAVFile_object = NULL; /* class type to find */ jclass alutLoadWAVFile_class = NULL; /* method id - will be set to constructor of alutLoadWAVData */ jmethodID methodID = NULL; /* sound data vars */ jint format, size, freq; jboolean loop; void* data; /* load wave from mem */ alutLoadWAVMemory((ALbyte*) buffer, (ALenum*) &format, (void**) &data, (ALsizei*) &size, (ALsizei*) &freq, (ALboolean*) &loop); /* get class */ alutLoadWAVFile_class = env->FindClass("org/lwjgl/openal/ALUTLoadWAVData"); /* get constructor */ methodID = env->GetMethodID(alutLoadWAVFile_class, "<init>", "(IIIIZ)V"); /* create object */ alutLoadWAVFile_object = env->NewObject(alutLoadWAVFile_class, methodID, format, (int) data, size, freq, loop); CHECK_AL_ERROR return alutLoadWAVFile_object; } /** * This function unloads a WAV file from memory and is normally used after copying the data into a buffer * after an alutLoad* function. * * C Specification: * ALvoid alutUnloadWAV(ALenum format, ALvoid *data, ALsizei size, ALsizei freq) */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_ALUT_unloadWAV (JNIEnv *env, jobject obj, jint format, jint data, jint size, jint freq) { alutUnloadWAV(format, (void**) data, size, freq); CHECK_AL_ERROR } /** * This function exits OpenAL. * * C Specification: * void alutExit(ALvoid); */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_ALUT_exit (JNIEnv *env, jobject obj) { alutExit(); } --- NEW FILE: org_lwjgl_openal_BaseAL.cpp --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/linux/org_lwjgl_openal_BaseAL.cpp /* * Copyright (c) 2002 Light Weight Java Game Library Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'Light Weight Java Game Library' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "org_lwjgl_openal_BaseAL.h" /* * Class: org_lwjgl_openal_BaseAL * Method: nCreate * Signature: ()Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_openal_BaseAL_nCreate (JNIEnv *env, jobject obj) { return true; } /* * Class: org_lwjgl_openal_BaseAL * Method: nDestroy * Signature: ()V */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_BaseAL_nDestroy(JNIEnv *env, jobject obj) { } --- NEW FILE: org_lwjgl_openal_CoreAL.cpp --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/linux/org_lwjgl_openal_CoreAL.cpp /* * Copyright (c) 2002 Light Weight Java Game Library Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'Light Weight Java Game Library' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /** * $Id: org_lwjgl_openal_CoreAL.cpp,v 1.1 2002/11/19 14:08:21 elias_naur Exp $ * * This is the actual JNI implementation of the OpenAL core. It handles * whatever is needed for proper OpenAL support via using Java. * * @author Brian Matzon <br...@ma...> * @version $Revision: 1.1 $ */ #include "org_lwjgl_openal_CoreAL.h" #include "checkALerror.h" /* OpenAL includes */ #include <AL/al.h> /** * This function enables a feature of the OpenAL driver. * * C Specification: * ALvoid alEnable(ALenum capability); */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_enable (JNIEnv *env, jobject obj, jint capability) { alEnable((ALenum) capability); CHECK_AL_ERROR } /** * This function disables a feature of the OpenAL driver. * * C Specification: * ALvoid alDisable(ALenum capability); */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_disable (JNIEnv *env, jobject obj, jint capability) { alDisable((ALenum) capability); CHECK_AL_ERROR } /** * This function returns a boolean indicating if a specific feature is enabled in the OpenAL driver. * * C Specification: * Alboolean alIsEnabled(ALenum capability); */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_openal_CoreAL_isEnabled (JNIEnv *env, jobject obj, jint capability) { jboolean result = (jboolean) alIsEnabled((ALenum) capability); CHECK_AL_ERROR return result; } /** * This function Enables a feature of the OpenAL driver. * * C Specification * ALvoid alHint(ALenum target, ALenum mode); */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_hint (JNIEnv *env, jobject obj, jint target, jint mode) { //alHint((ALint)target, (ALint)mode); //cannot link with above statement return; } /** * This function returns a boolean OpenAL state. * * C Specification: * Alboolean alGetBoolean(ALenum pname); */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_openal_CoreAL_getBoolean (JNIEnv *env, jobject obj, jint pname) { jboolean result = (jboolean) alGetBoolean((ALenum) pname); CHECK_AL_ERROR return result; } /** * This function returns an integer OpenAL state. * * C Specification: * Alint alGetInteger(ALenum pname); */ JNIEXPORT jint JNICALL Java_org_lwjgl_openal_CoreAL_getInteger (JNIEnv *env, jobject obj, jint pname) { jint result = (jint) alGetInteger((ALenum) pname); CHECK_AL_ERROR return result; } /** * This function returns a floating point OpenAL state. * * C Specification: * ALfloat alGetFloat(ALenum pname); */ JNIEXPORT jfloat JNICALL Java_org_lwjgl_openal_CoreAL_getFloat (JNIEnv *env, jobject obj, jint pname) { jfloat result = (jfloat) alGetFloat((ALenum) pname); CHECK_AL_ERROR return result; } /** * This function returns a double precision floating point OpenAL state. * * C Specification: * Aldouble alGetDouble(ALenum pname); */ JNIEXPORT jdouble JNICALL Java_org_lwjgl_openal_CoreAL_getDouble (JNIEnv *env, jobject obj, jint pname) { jdouble result = (jdouble) alGetDouble((ALenum) pname); CHECK_AL_ERROR return result; } /** * This function retrieves a boolean OpenAL state. * * C Specification: * ALvoid alGetBooleanv(ALenum pname,ALboolean *data); */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_getBooleanv (JNIEnv *env, jobject obj, jint pname, jint data) { alGetBooleanv((ALenum) pname, (ALboolean*) data); CHECK_AL_ERROR } /** * This function retrieves an integer OpenAL state. * * C Specification: * ALvoid alGetIntegerv(ALenum pname,ALint *data); */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_getIntegerv (JNIEnv *env, jobject obj, jint pname, jint data) { alGetIntegerv((ALenum) pname, (ALint*) data); CHECK_AL_ERROR } /** * This function retrieves a floating point OpenAL state. * * C Specification: * ALvoid alGetFloatv(ALenum pname,ALfloat *data); */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_getFloatv (JNIEnv *env, jobject obj, jint pname, jint data) { alGetFloatv((ALenum) pname, (ALfloat*) data); CHECK_AL_ERROR } /** * This function retrieves a double precision floating point OpenAL state. * * C Specification: * ALvoid alGetDoublev(ALenum pname,ALdouble *data); */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_getDoublev (JNIEnv *env, jobject obj, jint pname, jint data) { alGetDoublev((ALenum) pname, (ALdouble*) data); CHECK_AL_ERROR } /** * This function retrieves an OpenAL string property. * * C Specification: * ALubyte * alGetString(ALenum pname); */ JNIEXPORT jstring JNICALL Java_org_lwjgl_openal_CoreAL_getString (JNIEnv *env, jobject obj, jint param) { jstring string = (jstring) env->NewStringUTF((const char*) alGetString((ALenum)param)); CHECK_AL_ERROR return string; } /** * This function returns the current error state and then clears the error state. * * C Specification: * ALenum alGetError(ALvoid); */ JNIEXPORT jint JNICALL Java_org_lwjgl_openal_CoreAL_getError (JNIEnv *env, jobject obj) { jint result = (jint) alGetError(); CHECK_AL_ERROR return result; } /** * This function tests if a specific extension is available for the OpenAL driver. * * C Specification: * ALboolean alIsExtensionPresent(ALubyte *extName); */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_openal_CoreAL_isExtensionPresent (JNIEnv *env, jobject obj, jstring fname) { ALubyte* functionname = (ALubyte*) (env->GetStringUTFChars(fname, 0)); jboolean result = (jboolean) alIsExtensionPresent(functionname); env->ReleaseStringUTFChars((jstring)functionname, 0); CHECK_AL_ERROR return result; } /** * This function returns the enumeration value of an OpenAL enum described by a string. * * C Specification: * ALenum alGetEnumValue(ALubyte *enumName); */ JNIEXPORT jint JNICALL Java_org_lwjgl_openal_CoreAL_getEnumValue (JNIEnv *env, jobject obj, jstring ename) { ALubyte* functionname = (ALubyte*) (env->GetStringUTFChars(ename, 0)); jint result = (jint) alGetEnumValue(functionname); env->ReleaseStringUTFChars((jstring)functionname, 0); CHECK_AL_ERROR return result; } /** * This function sets an integer property of the listener. * * C Specification: * ALvoid alListeneri(ALenum pname,ALint value); */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_listeneri (JNIEnv *env, jobject obj, jint pname, jint value) { alListeneri((ALenum) pname, (ALint) value); CHECK_AL_ERROR } /** * This function sets a floating point property for the listener. * * C Specification: * ALvoid alListenerf(ALenum pname,ALfloat value); */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_listenerf (JNIEnv *env, jobject obj, jint pname, jfloat value) { alListenerf((ALenum) pname, (ALfloat) value); CHECK_AL_ERROR } /** * This function sets a floating point property for the listener. * * C Specification: * ALvoid alListener3f(ALenum pname,ALfloat v1,ALfloat v2,ALfloat v3); */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_listener3f (JNIEnv *env, jobject obj, jint pname, jfloat v1, jfloat v2, jfloat v3) { alListener3f((ALenum) pname, (ALfloat) v1, (ALfloat) v2, (ALfloat) v3); CHECK_AL_ERROR } /** * This function sets a floating point-vector property of the listener. * * C Specification: * ALvoid alListenerfv(ALenum pname,ALfloat *values); */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_listenerfv (JNIEnv *env, jobject obj, jint pname, jint values) { alListenerfv((ALenum) pname, (ALfloat*) values); CHECK_AL_ERROR } /** * This function retrieves an integer property of the listener. * * C Specification: * ALvoid alGetListeneri(ALenum pname,ALint *value); */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_getListeneri (JNIEnv *env, jobject obj, jint pname, jint value) { alGetListeneri((ALenum) pname, (ALint*) value); CHECK_AL_ERROR } /** * This function retrieves a floating point property of the listener. * * C Specification: * ALvoid alGetListenerf(ALenum pname,ALfloat *value); */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_getListenerf (JNIEnv *env, jobject obj, jint pname, jint value) { alGetListenerf((ALenum) pname, (ALfloat*) value); CHECK_AL_ERROR } /** * This function retrieves a set of three floating point values from a property of the listener. * * C Specification: * ALvoid alGetListener3f(ALenum pname,ALfloat *v1,ALfloat *v2,ALfloat *v3); */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_getListener3f (JNIEnv *env, jobject obj, jint pname, jint v1, jint v2, jint v3) { alGetListener3f((ALenum) pname, (ALfloat*) v1, (ALfloat*) v2, (ALfloat*) v3); CHECK_AL_ERROR } /** * This function retrieves a floating point-vector property of the listener. * * C Specification: * ALvoid alGetListenerfv(ALenum pname,ALfloat *values); */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_getListenerfv (JNIEnv *env, jobject obj, jint pname, jint values) { alGetListenerfv((ALenum) pname, (ALfloat*) values); CHECK_AL_ERROR } /** * This function generates one or more sources. * * C Specification: * ALvoid alGenSources(ALsizei n,ALuint *sources); */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_genSources (JNIEnv *env, jobject obj, jint n, jint sources) { alGenSources(n, (ALuint*) sources); CHECK_AL_ERROR } /** * This function deletes one or more sources. * * C Specification: * ALvoid alDeleteSources(ALsizei n,ALuint *sources); */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_deleteSources (JNIEnv *env, jobject obj, jint n, jint sources) { alDeleteSources(n, (ALuint*) sources); CHECK_AL_ERROR } /** * This function tests if a source name is valid. * * C Specification: * Alboolean alIsSource(ALuint source); */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_openal_CoreAL_isSource (JNIEnv *env, jobject obj, jint source) { jboolean result = (jboolean) alIsSource((ALuint) source); CHECK_AL_ERROR return result; } /** * This function sets an integer property of a source. * * C Specification: * ALvoid alSourcei(ALuint source,ALenum pname,ALint value); */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_sourcei (JNIEnv *env, jobject obj, jint source, jint pname, jint value) { alSourcei((ALuint) source, (ALenum) pname, (ALint) value); CHECK_AL_ERROR } /** * This function sets a floating point property of a source. * * C Specification: * ALvoid alSourcef(ALuint source,ALenum pname,ALfloat value); */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_sourcef (JNIEnv *env, jobject obj, jint source, jint pname, jfloat value) { alSourcef((ALuint) source, (ALenum) pname, (ALfloat) value); CHECK_AL_ERROR } /** * This function sets a source property requiring three floating point values. * C Specification: * ALvoid alSource3f(ALuint source,ALenum pname,ALfloat v1,ALfloat v2,ALfloat v3); */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_source3f (JNIEnv *env, jobject obj, jint source, jint pname, jfloat v1, jfloat v2, jfloat v3) { alSource3f((ALuint) source, (ALenum) pname, (ALfloat) v1, (ALfloat) v2, (ALfloat) v3); CHECK_AL_ERROR } /** * This function sets a floating point-vector property of a source. * * C Specification: * ALvoid alSourcefv(ALuint source,ALenum pname,ALfloat *values); */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_sourcefv (JNIEnv *env, jobject obj, jint source, jint pname, jint values) { alSourcefv((ALuint) source, (ALenum) pname, (ALfloat*) values); CHECK_AL_ERROR } /** * This function retrieves an integer property of a source. * C Specification: * ALvoid alGetSourcei(ALuint source,ALenum pname,ALint *value); */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_getSourcei (JNIEnv *env, jobject obj, jint source, jint pname, jint value) { alGetSourcei((ALuint) source, (ALenum) pname, (ALint*) value); CHECK_AL_ERROR } /** * This function retrieves a floating point property of a source. * * C Specification: * ALvoid alGetSourcef(ALuint source,ALenum pname,ALfloat *value); */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_getSourcef (JNIEnv *env, jobject obj, jint source, jint pname, jint value) { alGetSourcef((ALuint) source, (ALenum) pname, (ALfloat*) value); CHECK_AL_ERROR } /* * This function retrieves a set of three floating point values from a property of a source. * * C Specification: * ALvoid alGetSource3f(ALuint source, ALenum param, ALfloat* v1, ALfloat* v2, ALfloat* v3); */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_getSource3f (JNIEnv *env, jobject obj, jint source, jint pname, jint v1, jint v2, jint v3) { #warning FIXME: alGetSource3f /* alGetSource3f((ALuint) source, (ALenum) pname, (ALfloat*) v1, (ALfloat*) v2, (ALfloat*) v3);*/ CHECK_AL_ERROR } /** * This function retrieves a floating point-vector property of a source. * * C Specification: * ALvoid alGetSourcefv(ALuint source,ALenum pname,ALfloat *values); */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_getSourcefv (JNIEnv *env, jobject obj, jint source, jint pname, jint values) { alGetSourcefv((ALuint) source, (ALenum) pname, (ALfloat*) values); CHECK_AL_ERROR } /** * This function plays a set of sources. * * C Specification: * ALvoid alSourcePlayv(ALsizei n,ALuint *sources); */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_sourcePlayv (JNIEnv *env, jobject obj, jint n, jint sources) { alSourcePlayv(n, (ALuint*) sources); CHECK_AL_ERROR } /** * This function pauses a set of sources. * * C Specification: * ALvoid alSourcePausev(ALsizei n,ALuint *sources); */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_sourcePausev (JNIEnv *env, jobject obj, jint n, jint sources) { alSourcePausev(n, (ALuint*) sources); CHECK_AL_ERROR } /** * This function stops a set of sources. * * C Specification: * ALvoid alSourceStopv(ALsizei n,ALuint *sources); */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_sourceStopv (JNIEnv *env, jobject obj, jint n, jint sources) { alSourceStopv(n, (ALuint*) sources); CHECK_AL_ERROR } /** * This function stops a set of sources and sets all their states to AL_INITIAL. * * C Specification: * ALvoid alSourceRewindv(ALsizei n,ALuint *sources); */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_sourceRewindv (JNIEnv *env, jobject obj, jint n, jint sources) { alSourceRewindv(n, (ALuint*) sources); CHECK_AL_ERROR } /** * This function plays a source. * * C Specification: * ALvoid alSourcePlay(ALuint source); */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_sourcePlay (JNIEnv *env, jobject obj, jint source) { alSourcePlay((ALuint) source); CHECK_AL_ERROR } /* * This function pauses a source. * * C Specification: * ALvoid alSourcePause(ALuint source); */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_sourcePause (JNIEnv *env, jobject obj, jint source) { alSourcePause((ALuint) source); CHECK_AL_ERROR } /** * This function stops a source. * * C Specification: * ALvoid alSourceStop(ALuint source); */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_sourceStop (JNIEnv *env, jobject obj, jint source) { alSourceStop((ALuint) source); CHECK_AL_ERROR } /** * This function stops the source and sets its state to AL_INITIAL. * * C Specification: * ALvoid alSourceRewind(ALuint source); */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_sourceRewind (JNIEnv *env, jobject obj, jint source) { alSourceRewind((ALuint) source); CHECK_AL_ERROR } /** * This function generates one or more buffers. * * C Specification: * ALvoid alGenBuffers(ALsizei n,ALuint *buffers); */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_genBuffers (JNIEnv *env, jobject obj, jint n, jint buffers) { alGenBuffers(n, (ALuint*) buffers); CHECK_AL_ERROR } /** * This function deletes one or more buffers. * * C Specification: * ALvoid alDeleteBuffers(ALsizei n,ALuint *buffers); */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_deleteBuffers (JNIEnv *env, jobject obj, jint n, jint buffers) { alDeleteBuffers(n, (ALuint*) buffers); CHECK_AL_ERROR } /** * This function tests if a buffer name is valid. * * C Specification: * Alboolean alIsBuffer(ALuint buffer); */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_openal_CoreAL_isBuffer (JNIEnv *env, jobject obj, jint buffer) { jboolean result = (jboolean) alIsBuffer((ALuint) buffer); CHECK_AL_ERROR return result; } /** * This function fills a buffer with audio data. * * C Specification: * ALvoid alBufferData(ALuint buffer,ALenum format,ALvoid *data,ALsizei size,ALsizei freq); */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_bufferData (JNIEnv *env, jobject obj, jint buffer, jint format, jint data, jint size, jint freq) { alBufferData(buffer, format, (void**) data, size, freq); CHECK_AL_ERROR } /** * This function retrieves an integer property of a buffer. * * C Specification: * ALvoid alGetBufferi(ALuint buffer,ALenum pname,ALint *value); */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_getBufferi (JNIEnv *env, jobject obj, jint buffer, jint pname, jint value) { alGetBufferi((ALuint) buffer, (ALenum) pname, (ALint*) value); CHECK_AL_ERROR } /** * This function retrieves a floating point property of a buffer. * * C Specification: * ALvoid alGetBufferf(ALuint buffer,ALenum pname,ALfloat *value); */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_getBufferf (JNIEnv *env, jobject obj, jint buffer, jint pname, jint value) { alGetBufferf((ALuint) buffer, (ALenum) pname, (ALfloat*) value); CHECK_AL_ERROR } /** * This function queues a set of buffers on a source. * * C Specification: * ALvoid alSourceQueueBuffers( ALuint source, ALsizei n, ALuint* buffers ); */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_sourceQueueBuffers (JNIEnv *env, jobject obj, jint source, jint n, jint buffers) { alSourceQueueBuffers((ALuint) source, (ALsizei) n, (ALuint*) buffers); CHECK_AL_ERROR } /** * This function unqueues a set of buffers attached to a source. * * C Specification: * ALvoid alSourceUnqueueBuffers( ALuint source, ALsizei n, ALuint* buffers ); */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_sourceUnqueueBuffers (JNIEnv *env, jobject obj, jint source, jint n, jint buffers) { alSourceUnqueueBuffers((ALuint) source, (ALsizei) n, (ALuint*) buffers); CHECK_AL_ERROR } /** * This function selects the OpenAL distance model. * * C Specification: * ALvoid alDistanceModel( ALenum value ); */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_distanceModel (JNIEnv *env, jobject obj, jint value) { alDistanceModel((ALenum) value); CHECK_AL_ERROR } /** * This function selects the OpenAL Doppler factor value. * * C Specification: * ALvoid alDopplerFactor( ALfloat value ); */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_dopplerFactor (JNIEnv *env, jobject obj, jfloat value) { alDopplerFactor((ALfloat) value); CHECK_AL_ERROR } /** * This function selects the OpenAL Doppler velocity value. * * C Specification: * ALvoid alDopplerVelocity( ALfloat value ); */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_CoreAL_dopplerVelocity (JNIEnv *env, jobject obj, jfloat value) { alDopplerVelocity((ALfloat) value); CHECK_AL_ERROR } --- NEW FILE: org_lwjgl_openal_eax_EAXBufferProperties.cpp --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/linux/org_lwjgl_openal_eax_EAXBufferProperties.cpp /* * Copyright (c) 2002 Light Weight Java Game Library Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'Light Weight Java Game Library' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "org_lwjgl_openal_eax_EAXBufferProperties.h" //#include <eax.h> #include <stddef.h> /* * Class: org_lwjgl_openal_eax_EAXBufferProperties * Method: sizeOfEaxBufferProperties * Signature: ()I */ JNIEXPORT jint JNICALL Java_org_lwjgl_openal_eax_EAXBufferProperties_sizeOfEaxBufferProperties(JNIEnv *env, jobject obj) { // return sizeof(EAXBUFFERPROPERTIES); } /* * Class: org_lwjgl_openal_eax_EAXBufferProperties * Method: assignOffsets * Signature: ()V */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_eax_EAXBufferProperties_assignOffsets(JNIEnv *env, jobject obj) { /* jclass listener_class; jfieldID field; //get class/fields listener_class = env->FindClass("org/lwjgl/openal/eax/EAXBufferProperties"); //set environmentDiffusion_offset field = env->GetStaticFieldID(listener_class, "direct_offset", "I"); env->SetStaticIntField(listener_class, field, offsetof(EAXBUFFERPROPERTIES, lDirect)); //set environmentDiffusion_offset field = env->GetStaticFieldID(listener_class, "directHF_offset", "I"); env->SetStaticIntField(listener_class, field, offsetof(EAXBUFFERPROPERTIES, lDirectHF)); //set environmentDiffusion_offset field = env->GetStaticFieldID(listener_class, "room_offset", "I"); env->SetStaticIntField(listener_class, field, offsetof(EAXBUFFERPROPERTIES, lRoom)); //set environmentDiffusion_offset field = env->GetStaticFieldID(listener_class, "roomHF_offset", "I"); env->SetStaticIntField(listener_class, field, offsetof(EAXBUFFERPROPERTIES, lRoomHF)); //set environmentDiffusion_offset field = env->GetStaticFieldID(listener_class, "roomRolloffFactor_offset", "I"); env->SetStaticIntField(listener_class, field, offsetof(EAXBUFFERPROPERTIES, flRoomRolloffFactor)); //set environmentDiffusion_offset field = env->GetStaticFieldID(listener_class, "obstruction_offset", "I"); env->SetStaticIntField(listener_class, field, offsetof(EAXBUFFERPROPERTIES, lObstruction)); //set environmentDiffusion_offset field = env->GetStaticFieldID(listener_class, "obstructionLFRatio_offset", "I"); env->SetStaticIntField(listener_class, field, offsetof(EAXBUFFERPROPERTIES, flObstructionLFRatio)); //set environmentDiffusion_offset field = env->GetStaticFieldID(listener_class, "occlusion_offset", "I"); env->SetStaticIntField(listener_class, field, offsetof(EAXBUFFERPROPERTIES, lOcclusion)); //set environmentDiffusion_offset field = env->GetStaticFieldID(listener_class, "occlusionLFRatio_offset", "I"); env->SetStaticIntField(listener_class, field, offsetof(EAXBUFFERPROPERTIES, flOcclusionLFRatio)); //set environmentDiffusion_offset field = env->GetStaticFieldID(listener_class, "occlusionRoomRatio_offset", "I"); env->SetStaticIntField(listener_class, field, offsetof(EAXBUFFERPROPERTIES, flOcclusionRoomRatio)); //set environmentDiffusion_offset field = env->GetStaticFieldID(listener_class, "outsideVolumeHF_offset", "I"); env->SetStaticIntField(listener_class, field, offsetof(EAXBUFFERPROPERTIES, lOutsideVolumeHF)); //set environmentDiffusion_offset field = env->GetStaticFieldID(listener_class, "airAbsorptionFactor_offset", "I"); env->SetStaticIntField(listener_class, field, offsetof(EAXBUFFERPROPERTIES, flAirAbsorptionFactor)); //set environmentDiffusion_offset field = env->GetStaticFieldID(listener_class, "flags_offset", "I"); env->SetStaticIntField(listener_class, field, offsetof(EAXBUFFERPROPERTIES, dwFlags));*/ } --- NEW FILE: org_lwjgl_openal_eax_EAXListenerProperties.cpp --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/linux/org_lwjgl_openal_eax_EAXListenerProperties.cpp /* * Copyright (c) 2002 Light Weight Java Game Library Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'Light Weight Java Game Library' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "org_lwjgl_openal_eax_EAXListenerProperties.h" //#include <eax.h> #include <stddef.h> /* * Class: org_lwjgl_openal_eax_EAXListenerProperties * Method: sizeOfEaxListenerProperties * Signature: ()I */ JNIEXPORT jint JNICALL Java_org_lwjgl_openal_eax_EAXListenerProperties_sizeOfEaxListenerProperties(JNIEnv *env, jobject obj) { // return sizeof(EAXLISTENERPROPERTIES); } /* * Class: org_lwjgl_openal_eax_EAXListenerProperties * Method: assignOffsets * Signature: ()V */ JNIEXPORT void JNICALL Java_org_lwjgl_openal_eax_EAXListenerProperties_assignOffsets (JNIEnv *env, jobject obj) { /* jclass listener_class; jfieldID field; //get class/fields listener_class = env->FindClass("org/lwjgl/openal/eax/EAXListenerProperties"); //set environmentDiffusion_offset field = env->GetStaticFieldID(listener_class, "room_offset", "I"); env->SetStaticIntField(listener_class, field, offsetof(EAXLISTENERPROPERTIES, lRoom)); //set environmentDiffusion_offset field = env->GetStaticFieldID(listener_class, "roomHF_offset", "I"); env->SetStaticIntField(listener_class, field, offsetof(EAXLISTENERPROPERTIES, lRoomHF)); //set environmentDiffusion_offset field = env->GetStaticFieldID(listener_class, "roomRolloffFactor_offset", "I"); env->SetStaticIntField(listener_class, field, offsetof(EAXLISTENERPROPERTIES, flRoomRolloffFactor)); //set environmentDiffusion_offset field = env->GetStaticFieldID(listener_class, "decayTime_offset", "I"); env->SetStaticIntField(listener_class, field, offsetof(EAXLISTENERPROPERTIES, flDecayTime)); //set environmentDiffusion_offset field = env->GetStaticFieldID(listener_class, "decayHFRatio_offset", "I"); env->SetStaticIntField(listener_class, field, offsetof(EAXLISTENERPROPERTIES, flDecayHFRatio)); //set environmentDiffusion_offset field = env->GetStaticFieldID(listener_class, "reflections_offset", "I"); env->SetStaticIntField(listener_class, field, offsetof(EAXLISTENERPROPERTIES, lReflections)); //set environmentDiffusion_offset field = env->GetStaticFieldID(listener_class, "reflectionsDelay_offset", "I"); env->SetStaticIntField(listener_class, field, offsetof(EAXLISTENERPROPERTIES, flReflectionsDelay)); //set environmentDiffusion_offset field = env->GetStaticFieldID(listener_class, "reverb_offset", "I"); env->SetStaticIntField(listener_class, field, offsetof(EAXLISTENERPROPERTIES, lReverb)); //set environmentDiffusion_offset field = env->GetStaticFieldID(listener_class, "reverbDelay_offset", "I"); env->SetStaticIntField(listener_class, field, offsetof(EAXLISTENERPROPERTIES, flReverbDelay)); //set environmentDiffusion_offset field = env->GetStaticFieldID(listener_class, "environment_offset", "I"); env->SetStaticIntField(listener_class, field, offsetof(EAXLISTENERPROPERTIES, dwEnvironment)); //set environmentDiffusion_offset field = env->GetStaticFieldID(listener_class, "environmentSize_offset", "I"); env->SetStaticIntField(listener_class, field, offsetof(EAXLISTENERPROPERTIES, flEnvironmentSize)); //set environmentDiffusion_offset field = env->GetStaticFieldID(listener_class, "environmentDiffusion_offset", "I"); env->SetStaticIntField(listener_class, field, offsetof(EAXLISTENERPROPERTIES, flEnvironmentDiffusion)); //set environmentDiffusion_offset field = env->GetStaticFieldID(listener_class, "airAbsorptionHF_offset", "I"); env->SetStaticIntField(listener_class, field, offsetof(EAXLISTENERPROPERTIES, flAirAbsorptionHF)); //set environmentDiffusion_offset field = env->GetStaticFieldID(listener_class, "flags_offset", "I"); env->SetStaticIntField(listener_class, field, offsetof(EAXLISTENERPROPERTIES, dwFlags));*/ } Index: Makefile CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/linux/Makefile =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/linux/Makefile,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- Makefile 19 Nov 2002 08:50:57 -0000 1.7 +++ Makefile 19 Nov 2002 14:08:21 -0000 1.8 @@ -48,7 +48,7 @@ LIBCOBJS=$(LIBCSRC:.c=.o) LIBOBJS=$(LIBCOBJS) $(LIBCPPOBJS) #DEBUG_FLAGS=-D_DEBUG -LINKOPTS=-L/usr/X11R6/lib -lX11 -lXext -lXxf86vm -lGL -lGLU +LINKOPTS=-L/usr/X11R6/lib -lX11 -lXext -lXxf86vm -lGL -lGLU -lopenal all: liblwjgl.so |
|
From: Elias N. <eli...@us...> - 2002-11-19 09:08:02
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test In directory sc8-pr-cvs1:/tmp/cvs-serv18752/java/org/lwjgl/test Added Files: MathTest.java Log Message: Added MathTest.java --- NEW FILE: MathTest.java --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/test/MathTest.java package org.lwjgl.test; import java.nio.*; import org.lwjgl.*; public class MathTest { public static void main(String[] args) { ByteBuffer buf = ByteBuffer.allocateDirect(100); buf.order(ByteOrder.nativeOrder()); FloatBuffer float_buf = buf.asFloatBuffer(); float f = 0f; while (float_buf.hasRemaining()) { f += 0.5f; float_buf.put(f); } float_buf.rewind(); System.out.println("Src buffer:"); while (float_buf.hasRemaining()) System.out.print(float_buf.get() + " "); System.out.println(""); int buf_address = Sys.getDirectBufferAddress(float_buf); org.lwjgl.Math.matrixOp(org.lwjgl.Math.MATRIXOP_NEGATE, buf_address, 0, 100, 1, 1, false, buf_address, 0, false); System.out.println("Negated result:"); float_buf.rewind(); while (float_buf.hasRemaining()) System.out.print(float_buf.get() + " "); System.out.println(""); } } |
|
From: Elias N. <eli...@us...> - 2002-11-19 08:58:28
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test In directory sc8-pr-cvs1:/tmp/cvs-serv15333/test Log Message: Directory /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test added to the repository |