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
(1) |
2
(5) |
3
|
4
|
5
(1) |
6
|
7
|
|
8
|
9
(5) |
10
(2) |
11
(4) |
12
(21) |
13
(1) |
14
|
|
15
(2) |
16
|
17
|
18
|
19
|
20
(12) |
21
(6) |
|
22
|
23
(3) |
24
|
25
|
26
|
27
|
28
|
|
29
|
30
|
31
|
|
|
|
|
|
From: Brian M. <ma...@us...> - 2004-08-12 21:40:45
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/fmod3/callbacks In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11106/callbacks Modified Files: FSoundDSPCallback.java Log Message: mo fmod Index: FSoundDSPCallback.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/fmod3/callbacks/FSoundDSPCallback.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- FSoundDSPCallback.java 12 Jun 2004 20:28:21 -0000 1.2 +++ FSoundDSPCallback.java 12 Aug 2004 21:40:35 -0000 1.3 @@ -41,5 +41,13 @@ * @version $Revision$ */ public interface FSoundDSPCallback { - public void FSOUND_DSPCALLBACK(ByteBuffer originalbuffer, ByteBuffer newbuffer, int length); + + /** + * + * @param originalbuffer + * @param newbuffer + * @param length + * @return + */ + public ByteBuffer FSOUND_DSPCALLBACK(ByteBuffer originalbuffer, ByteBuffer newbuffer, int length); } |
|
From: Brian M. <ma...@us...> - 2004-08-12 21:40:19
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/fmod3 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11051 Added Files: DSPTest.java Log Message: Simple NULL DSP test --- NEW FILE: DSPTest.java --- /* * Copyright (c) 2002-2004 LWJGL 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 'LWJGL' 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.fmod3; import java.io.BufferedInputStream; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.IOException; import java.nio.ByteBuffer; import java.nio.ByteOrder; import org.lwjgl.fmod3.FMOD; import org.lwjgl.fmod3.FMODException; import org.lwjgl.fmod3.FSound; import org.lwjgl.fmod3.FSoundDSPUnit; import org.lwjgl.fmod3.FSoundStream; import org.lwjgl.fmod3.callbacks.FSoundDSPCallback; /** * $Id: DSPTest.java,v 1.1 2004/08/12 21:40:07 matzon Exp $ <br> * * @author Brian Matzon <br...@ma...> * @version $Revision: 1.1 $ */ public class DSPTest { public static void main(String[] args) { if (args.length < 1) { System.out.println("Usage:\n DSPTest <file>"); return; } File file = new File(args[0]); if (!file.exists()) { System.out.println("No such file: " + args[0]); return; } try { FMOD.create(); } catch (FMODException fmode) { fmode.printStackTrace(); return; } System.out.println("Initializing FMOD"); if (!FSound.FSOUND_Init(44100, 32, 0)) { System.out.println("Failed to initialize FMOD"); System.out.println("Error: " + FMOD.FMOD_ErrorString(FSound.FSOUND_GetError())); return; } System.out.println("Loading " + args[0]); FSoundStream stream = FSound.FSOUND_Stream_Open(args[0], FSound.FSOUND_NORMAL, 0, 0); if (stream != null) { System.out.println("Creating dsp unit"); FSoundDSPUnit unit = FSound.FSOUND_Stream_CreateDSP(stream, new DSPTest().new TestDspCallback("1"), 1); FSound.FSOUND_DSP_SetActive(unit, true); FSoundDSPUnit unit2 = FSound.FSOUND_Stream_CreateDSP(stream, new DSPTest().new TestDspCallback("2"), 0); FSound.FSOUND_DSP_SetActive(unit2, true); System.out.println("Created: " + unit); System.out.println("Created: " + unit2); FSound.FSOUND_Stream_Play(0, stream); System.out.println("Press enter to stop playing"); try { System.in.read(); } catch (IOException ioe) { } System.out.println("Done playing. Cleaning up"); FSound.FSOUND_Stream_Stop(stream); FSound.FSOUND_Stream_Close(stream); FSound.FSOUND_DSP_Free(unit); FSound.FSOUND_DSP_Free(unit2); } else { System.out.println("Unable to play: " + args[0]); System.out.println("Error: " + FMOD.FMOD_ErrorString(FSound.FSOUND_GetError())); } FSound.FSOUND_Close(); FMOD.destroy(); } /** * Reads the file into a ByteBuffer * * @param filename * Name of file to load * @return ByteBuffer containing file data */ static protected ByteBuffer getData(String filename) { ByteBuffer buffer = null; System.out.println("Attempting to load: " + filename); try { BufferedInputStream bis = new BufferedInputStream(DSPTest.class.getClassLoader().getResourceAsStream(filename)); 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(); // if ogg vorbis data, we need to pass it unmodified to alBufferData buffer = ByteBuffer.allocateDirect(baos.size()); buffer.order(ByteOrder.nativeOrder()); buffer.put(baos.toByteArray()); buffer.flip(); System.out.println("loaded " + buffer.remaining() + " bytes"); } catch (Exception ioe) { ioe.printStackTrace(); } return buffer; } /** * Creates a ByteBuffer buffer to hold specified bytes - strictly a utility * method * * @param size * how many bytes to contain * @return created ByteBuffer */ protected static ByteBuffer createByteBuffer(int size) { ByteBuffer temp = ByteBuffer.allocateDirect(4 * size); temp.order(ByteOrder.nativeOrder()); return temp; } public class TestDspCallback implements FSoundDSPCallback { private String name; public TestDspCallback(String name) { this.name = name; } /* * @see org.lwjgl.fmod3.callbacks.FSoundDSPCallback#FSOUND_DSPCALLBACK(java.nio.ByteBuffer, java.nio.ByteBuffer, int) */ public ByteBuffer FSOUND_DSPCALLBACK(ByteBuffer originalbuffer, ByteBuffer newbuffer, int length) { System.out.println("DSP instance called - " + name); System.out.println("orig: " + originalbuffer.capacity()); System.out.println("new: " + newbuffer.capacity()); System.out.println("length: " + length); return originalbuffer; } } } |
|
From: Brian M. <ma...@us...> - 2004-08-12 21:38:46
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common/fmod3 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10610 Modified Files: extfmod3.cpp extfmod3.h org_lwjgl_fmod3_FSound.cpp Log Message: mo fmod Index: extfmod3.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/fmod3/extfmod3.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- extfmod3.cpp 12 Jun 2004 20:28:31 -0000 1.2 +++ extfmod3.cpp 12 Aug 2004 21:38:37 -0000 1.3 @@ -52,6 +52,13 @@ jmethodID music_zxxcallback; jclass fmusic; +// FSound cached fields +jmethodID sound_dspcallback; +jclass fsound; + +// size of dsp buffer (in bytes) +int fsound_dsp_buffer_size; + #ifdef _WIN32 /** * DLL entry point for Windows. Called when Java loads the .dll @@ -75,6 +82,25 @@ music_ordercallback = env->GetStaticMethodID(fmusic, "music_ordercallback", "(JI)V"); music_rowcallback = env->GetStaticMethodID(fmusic, "music_rowcallback", "(JI)V"); music_zxxcallback = env->GetStaticMethodID(fmusic, "music_zxxcallback", "(JI)V"); + + fsound = env->FindClass("org/lwjgl/fmod3/FSound"); + sound_dspcallback = env->GetStaticMethodID(fsound, "dsp_callback", "(JLjava/nio/ByteBuffer;Ljava/nio/ByteBuffer;I)Ljava/nio/ByteBuffer;"); + + // cache some data + switch(fmod_instance->FSOUND_GetMixer()) { + case FSOUND_MIXER_AUTODETECT: + case FSOUND_MIXER_BLENDMODE: + case FSOUND_MIXER_QUALITY_AUTODETECT: + case FSOUND_MIXER_QUALITY_FPU: + case FSOUND_MIXER_MONO: + case FSOUND_MIXER_QUALITY_MONO: + case FSOUND_MIXER_MAX: + fsound_dsp_buffer_size = 8; + break; + default: + fsound_dsp_buffer_size = 4; + break; + } } } Index: org_lwjgl_fmod3_FSound.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/fmod3/org_lwjgl_fmod3_FSound.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- org_lwjgl_fmod3_FSound.cpp 10 Aug 2004 17:14:56 -0000 1.5 +++ org_lwjgl_fmod3_FSound.cpp 12 Aug 2004 21:38:37 -0000 1.6 @@ -32,6 +32,8 @@ #include "org_lwjgl_fmod3_FSound.h" #include "extfmod3.h" +void * F_CALLBACKAPI fsound_dspcallback(void *originalbuffer, void *newbuffer, int length, void *userdata); + /* * Class: org_lwjgl_fmod3_FSound * Method: FSOUND_Close @@ -553,8 +555,9 @@ * Method: nFSOUND_PlaySoundEx * Signature: (IJJZ)I */ -JNIEXPORT jint JNICALL Java_org_lwjgl_fmod3_FSound_nFSOUND_1PlaySoundEx(JNIEnv * env, jclass clazz, jint channel, jlong sptr, jlong dsp, jboolean startpaused) { - return fmod_instance->FSOUND_PlaySoundEx(channel, (FSOUND_SAMPLE*) sptr, (FSOUND_DSPUNIT*) dsp, startpaused); +JNIEXPORT jint JNICALL Java_org_lwjgl_fmod3_FSound_nFSOUND_1PlaySoundEx(JNIEnv * env, jclass clazz, jint channel, jlong sptr, jobject dsp, jboolean startpaused) { + FSOUND_DSPUNIT* nDsp = (FSOUND_DSPUNIT*) env->GetDirectBufferAddress(dsp); + return fmod_instance->FSOUND_PlaySoundEx(channel, (FSOUND_SAMPLE*) sptr, nDsp, startpaused); } /* @@ -968,8 +971,9 @@ * Method: nFSOUND_Stream_PlayEx * Signature: (IJJZ)I */ -JNIEXPORT jint JNICALL Java_org_lwjgl_fmod3_FSound_nFSOUND_1Stream_1PlayEx(JNIEnv * env, jclass clazz, jint channel, jlong stream, jlong dsp, jboolean startpaused) { - return fmod_instance->FSOUND_Stream_PlayEx(channel, (FSOUND_STREAM*) stream, (FSOUND_DSPUNIT*) dsp, startpaused); +JNIEXPORT jint JNICALL Java_org_lwjgl_fmod3_FSound_nFSOUND_1Stream_1PlayEx(JNIEnv * env, jclass clazz, jint channel, jlong stream, jobject dsp, jboolean startpaused) { + FSOUND_DSPUNIT* nDsp = (FSOUND_DSPUNIT*) env->GetDirectBufferAddress(dsp); + return fmod_instance->FSOUND_Stream_PlayEx(channel, (FSOUND_STREAM*) stream, nDsp, startpaused); } /* @@ -1014,10 +1018,11 @@ * Method: nFSOUND_Stream_AddSyncPoint * Signature: (JILjava/lang/String;)J */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_fmod3_FSound_nFSOUND_1Stream_1AddSyncPoint(JNIEnv * env, jclass clazz, jlong, jint, jstring) { - //XXX - throwFMODException(env, "missing implementation"); - return 0; +JNIEXPORT jobject JNICALL Java_org_lwjgl_fmod3_FSound_nFSOUND_1Stream_1AddSyncPoint(JNIEnv * env, jclass clazz, jlong stream, jint pcmOffset, jstring name) { + const char * nName = env->GetStringUTFChars(name, 0); + FSOUND_SYNCPOINT * result = fmod_instance->FSOUND_Stream_AddSyncPoint((FSOUND_STREAM*) stream, pcmOffset, (void *) nName); + env->ReleaseStringUTFChars (name, nName); + return safeNewBuffer(env, result, 0);; } /* @@ -1036,10 +1041,10 @@ * Method: nFSOUND_Stream_CreateDSP * Signature: (JI)J */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_fmod3_FSound_nFSOUND_1Stream_1CreateDSP(JNIEnv * env, jclass clazz, jlong, jint) { - //XXX - throwFMODException(env, "missing implementation"); - return 0; +JNIEXPORT jobject JNICALL Java_org_lwjgl_fmod3_FSound_nFSOUND_1Stream_1CreateDSP(JNIEnv * env, jclass clazz, jlong stream, jint priority, jobject dspID) { + long * nDspID = (long *) env->GetDirectBufferAddress(dspID); + FSOUND_DSPUNIT* dsp = fmod_instance->FSOUND_Stream_CreateDSP((FSOUND_STREAM*) stream, fsound_dspcallback, priority, nDspID); + return safeNewBuffer(env, dsp, 0); } /* @@ -1103,9 +1108,9 @@ * Method: nFSOUND_Stream_GetNumTagFields * Signature: (JLjava/nio/IntBuffer;I)Z */ -JNIEXPORT jboolean JNICALL Java_org_lwjgl_fmod3_FSound_nFSOUND_1Stream_1GetNumTagFields(JNIEnv * env, jclass clazz, jlong, jobject, jint) { - // XXX - return false; +JNIEXPORT jboolean JNICALL Java_org_lwjgl_fmod3_FSound_nFSOUND_1Stream_1GetNumTagFields(JNIEnv * env, jclass clazz, jlong stream, jobject num, jint numOffset) { + int* nNum = numOffset + (int*) env->GetDirectBufferAddress(num); + return fmod_instance->FSOUND_Stream_GetNumTagFields((FSOUND_STREAM*) stream, &nNum[0]); } /* @@ -1140,8 +1145,9 @@ * Method: nFSOUND_Stream_GetSyncPoint * Signature: (JI)J */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_fmod3_FSound_nFSOUND_1Stream_1GetSyncPoint(JNIEnv * env, jclass clazz, jlong stream, jint index) { - return (jlong) fmod_instance->FSOUND_Stream_GetSyncPoint((FSOUND_STREAM*) stream, index); +JNIEXPORT jobject JNICALL Java_org_lwjgl_fmod3_FSound_nFSOUND_1Stream_1GetSyncPoint(JNIEnv * env, jclass clazz, jlong stream, jint index) { + FSOUND_SYNCPOINT * point = fmod_instance->FSOUND_Stream_GetSyncPoint((FSOUND_STREAM*) stream, index); + return safeNewBuffer(env, point, 0); } /* @@ -1149,10 +1155,14 @@ * Method: nFSOUND_Stream_GetSyncPointInfo * Signature: (JLjava/nio/IntBuffer;I)Ljava/lang/String; */ -JNIEXPORT jstring JNICALL Java_org_lwjgl_fmod3_FSound_nFSOUND_1Stream_1GetSyncPointInfo(JNIEnv * env, jclass clazz, jlong, jobject, jint) { - //XXX - throwFMODException(env, "missing implementation"); - return NULL; +JNIEXPORT jstring JNICALL Java_org_lwjgl_fmod3_FSound_nFSOUND_1Stream_1GetSyncPointInfo(JNIEnv * env, jclass clazz, jobject point, jobject pcmOffset, jint pcmOffsetPosition) { + FSOUND_SYNCPOINT * nPoint = (FSOUND_SYNCPOINT *) env->GetDirectBufferAddress(point); + unsigned int * nPcmOffset = pcmOffsetPosition + (unsigned int *) env->GetDirectBufferAddress(pcmOffset); + char * result = fmod_instance->FSOUND_Stream_GetSyncPointInfo(nPoint, nPcmOffset); + if(result != NULL) { + return env->NewStringUTF(result); + } + return NULL; } /* @@ -1180,10 +1190,9 @@ * Method: nFSOUND_Stream_Net_GetBufferProperties * Signature: (Ljava/nio/IntBuffer;I)Z */ -JNIEXPORT jboolean JNICALL Java_org_lwjgl_fmod3_FSound_nFSOUND_1Stream_1Net_1GetBufferProperties(JNIEnv * env, jclass clazz, jobject, jint) { - //XXX - throwFMODException(env, "missing implementation"); - return false; +JNIEXPORT jboolean JNICALL Java_org_lwjgl_fmod3_FSound_nFSOUND_1Stream_1Net_1GetBufferProperties(JNIEnv * env, jclass clazz, jobject status, jint statusOffset) { + int* nStatus = statusOffset + (int*) env->GetDirectBufferAddress(status); + return fmod_instance->FSOUND_Stream_Net_GetBufferProperties(&nStatus[0], &nStatus[1], &nStatus[2]); } /* @@ -1200,10 +1209,9 @@ * Method: nFSOUND_Stream_Net_GetStatus * Signature: (JLjava/nio/IntBuffer;I)Z */ -JNIEXPORT jboolean JNICALL Java_org_lwjgl_fmod3_FSound_nFSOUND_1Stream_1Net_1GetStatus(JNIEnv * env, jclass clazz, jlong, jobject, jint) { - //XXX - throwFMODException(env, "missing implementation"); - return false; +JNIEXPORT jboolean JNICALL Java_org_lwjgl_fmod3_FSound_nFSOUND_1Stream_1Net_1GetStatus(JNIEnv * env, jclass clazz, jlong stream, jobject status, jint statusOffset) { + int* nStatus = statusOffset + (int*) env->GetDirectBufferAddress(status); + return fmod_instance->FSOUND_Stream_Net_GetStatus((FSOUND_STREAM*) stream, &nStatus[0], &nStatus[1], &nStatus[2], (unsigned int *) &nStatus[3]); } /* @@ -1211,10 +1219,8 @@ * Method: FSOUND_Stream_Net_SetBufferProperties * Signature: (III)Ljava/lang/String; */ -JNIEXPORT jstring JNICALL Java_org_lwjgl_fmod3_FSound_FSOUND_1Stream_1Net_1SetBufferProperties(JNIEnv * env, jclass clazz, jint, jint, jint) { - //XXX - throwFMODException(env, "missing implementation"); - return NULL; +JNIEXPORT jboolean JNICALL Java_org_lwjgl_fmod3_FSound_FSOUND_1Stream_1Net_1SetBufferPropertie(JNIEnv * env, jclass clazz, jint buffersize, jint prebuffer_percent, jint rebuffer_percent) { + return fmod_instance->FSOUND_Stream_Net_SetBufferProperties(buffersize, prebuffer_percent, rebuffer_percent); } /* @@ -1451,11 +1457,10 @@ * Method: nFSOUND_DSP_Create * Signature: (I)J */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_fmod3_FSound_nFSOUND_1DSP_1Create(JNIEnv * env, jclass clazz, jint priority) { - //XXX - //return (jlong) fmod_instance->FSOUND_DSP_Create(fmod_dsp_callback, priority, NULL); - throwFMODException(env, "missing implementation"); - return 0; +JNIEXPORT jobject JNICALL Java_org_lwjgl_fmod3_FSound_nFSOUND_1DSP_1Create(JNIEnv * env, jclass clazz, jint priority, jobject dspID) { + long * nDspID = (long *) env->GetDirectBufferAddress(dspID); + FSOUND_DSPUNIT* dsp = fmod_instance->FSOUND_DSP_Create(fsound_dspcallback, priority, nDspID); + return safeNewBuffer(env, dsp, 0); } /* @@ -1463,8 +1468,9 @@ * Method: nFSOUND_DSP_Free * Signature: (J)V */ -JNIEXPORT void JNICALL Java_org_lwjgl_fmod3_FSound_nFSOUND_1DSP_1Free(JNIEnv * env, jclass clazz, jlong dsp) { - fmod_instance->FSOUND_DSP_Free((FSOUND_DSPUNIT*) dsp); +JNIEXPORT void JNICALL Java_org_lwjgl_fmod3_FSound_nFSOUND_1DSP_1Free(JNIEnv * env, jclass clazz, jobject dsp) { + FSOUND_DSPUNIT* nDsp = (FSOUND_DSPUNIT*) env->GetDirectBufferAddress(dsp); + fmod_instance->FSOUND_DSP_Free(nDsp); } /* @@ -1472,8 +1478,9 @@ * Method: nFSOUND_DSP_SetActive * Signature: (JZ)V */ -JNIEXPORT void JNICALL Java_org_lwjgl_fmod3_FSound_nFSOUND_1DSP_1SetActive(JNIEnv * env, jclass clazz, jlong dsp, jboolean active) { - fmod_instance->FSOUND_DSP_SetActive((FSOUND_DSPUNIT*) dsp, active); +JNIEXPORT void JNICALL Java_org_lwjgl_fmod3_FSound_nFSOUND_1DSP_1SetActive(JNIEnv * env, jclass clazz, jobject dsp, jboolean active) { + FSOUND_DSPUNIT* nDsp = (FSOUND_DSPUNIT*) env->GetDirectBufferAddress(dsp); + fmod_instance->FSOUND_DSP_SetActive(nDsp, active); } /* @@ -1481,8 +1488,9 @@ * Method: nFSOUND_DSP_GetActive * Signature: (J)Z */ -JNIEXPORT jboolean JNICALL Java_org_lwjgl_fmod3_FSound_nFSOUND_1DSP_1GetActive(JNIEnv * env, jclass clazz, jlong dsp) { - return fmod_instance->FSOUND_DSP_GetActive((FSOUND_DSPUNIT*) dsp); +JNIEXPORT jboolean JNICALL Java_org_lwjgl_fmod3_FSound_nFSOUND_1DSP_1GetActive(JNIEnv * env, jclass clazz, jobject dsp) { + FSOUND_DSPUNIT* nDsp = (FSOUND_DSPUNIT*) env->GetDirectBufferAddress(dsp); + return fmod_instance->FSOUND_DSP_GetActive(nDsp); } /* @@ -1508,8 +1516,9 @@ * Method: nFSOUND_DSP_SetPriority * Signature: (JI)V */ -JNIEXPORT void JNICALL Java_org_lwjgl_fmod3_FSound_nFSOUND_1DSP_1SetPriority(JNIEnv * env, jclass clazz, jlong dsp, jint priority) { - fmod_instance->FSOUND_DSP_SetPriority((FSOUND_DSPUNIT*) dsp, priority); +JNIEXPORT void JNICALL Java_org_lwjgl_fmod3_FSound_nFSOUND_1DSP_1SetPriority(JNIEnv * env, jclass clazz, jobject dsp, jint priority) { + FSOUND_DSPUNIT* nDsp = (FSOUND_DSPUNIT*) env->GetDirectBufferAddress(dsp); + fmod_instance->FSOUND_DSP_SetPriority(nDsp, priority); } /* @@ -1517,8 +1526,9 @@ * Method: nFSOUND_DSP_GetPriority * Signature: (J)I */ -JNIEXPORT jint JNICALL Java_org_lwjgl_fmod3_FSound_nFSOUND_1DSP_1GetPriority(JNIEnv * env, jclass clazz, jlong dsp) { - return fmod_instance->FSOUND_DSP_GetPriority((FSOUND_DSPUNIT*) dsp); +JNIEXPORT jint JNICALL Java_org_lwjgl_fmod3_FSound_nFSOUND_1DSP_1GetPriority(JNIEnv * env, jclass clazz, jobject dsp) { + FSOUND_DSPUNIT* nDsp = (FSOUND_DSPUNIT*) env->GetDirectBufferAddress(dsp); + return fmod_instance->FSOUND_DSP_GetPriority(nDsp); } /* @@ -1526,8 +1536,9 @@ * Method: nFSOUND_DSP_GetClearUnit * Signature: ()J */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_fmod3_FSound_nFSOUND_1DSP_1GetClearUnit(JNIEnv * env, jclass clazz) { - return (jlong) fmod_instance->FSOUND_DSP_GetClearUnit(); +JNIEXPORT jobject JNICALL Java_org_lwjgl_fmod3_FSound_nFSOUND_1DSP_1GetClearUnit(JNIEnv * env, jclass clazz) { + FSOUND_DSPUNIT* dsp = fmod_instance->FSOUND_DSP_GetClearUnit(); + return safeNewBuffer(env, dsp, 0); } /* @@ -1535,8 +1546,9 @@ * Method: nFSOUND_DSP_GetClipAndCopyUnit * Signature: ()J */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_fmod3_FSound_nFSOUND_1DSP_1GetClipAndCopyUnit(JNIEnv * env, jclass clazz) { - return (jlong) fmod_instance->FSOUND_DSP_GetClipAndCopyUnit(); +JNIEXPORT jobject JNICALL Java_org_lwjgl_fmod3_FSound_nFSOUND_1DSP_1GetClipAndCopyUnit(JNIEnv * env, jclass clazz) { + FSOUND_DSPUNIT* dsp = fmod_instance->FSOUND_DSP_GetClipAndCopyUnit(); + return safeNewBuffer(env, dsp, 0); } /* @@ -1544,8 +1556,9 @@ * Method: nFSOUND_DSP_GetMusicUnit * Signature: ()J */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_fmod3_FSound_nFSOUND_1DSP_1GetMusicUnit(JNIEnv * env, jclass clazz) { - return (jlong) fmod_instance->FSOUND_DSP_GetMusicUnit(); +JNIEXPORT jobject JNICALL Java_org_lwjgl_fmod3_FSound_nFSOUND_1DSP_1GetMusicUnit(JNIEnv * env, jclass clazz) { + FSOUND_DSPUNIT* dsp = fmod_instance->FSOUND_DSP_GetMusicUnit(); + return safeNewBuffer(env, dsp, 0); } /* @@ -1553,8 +1566,9 @@ * Method: nFSOUND_DSP_GetSFXUnit * Signature: ()J */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_fmod3_FSound_nFSOUND_1DSP_1GetSFXUnit(JNIEnv * env, jclass clazz) { - return (jlong) fmod_instance->FSOUND_DSP_GetSFXUnit(); +JNIEXPORT jobject JNICALL Java_org_lwjgl_fmod3_FSound_nFSOUND_1DSP_1GetSFXUnit(JNIEnv * env, jclass clazz) { + FSOUND_DSPUNIT* dsp = fmod_instance->FSOUND_DSP_GetSFXUnit(); + return safeNewBuffer(env, dsp, 0); } /* @@ -1562,8 +1576,9 @@ * Method: nFSOUND_DSP_GetFFTUnit * Signature: ()J */ -JNIEXPORT jlong JNICALL Java_org_lwjgl_fmod3_FSound_nFSOUND_1DSP_1GetFFTUnit(JNIEnv * env, jclass clazz) { - return (jlong) fmod_instance->FSOUND_DSP_GetFFTUnit(); +JNIEXPORT jobject JNICALL Java_org_lwjgl_fmod3_FSound_nFSOUND_1DSP_1GetFFTUnit(JNIEnv * env, jclass clazz) { + FSOUND_DSPUNIT* dsp = fmod_instance->FSOUND_DSP_GetFFTUnit(); + return safeNewBuffer(env, dsp, 0); } /* @@ -1580,10 +1595,10 @@ * Method: nFSOUND_DSP_MixBuffers * Signature: (Ljava/nio/ByteBuffer;ILjava/nio/ByteBuffer;IIIIII)Z */ -JNIEXPORT jboolean JNICALL Java_org_lwjgl_fmod3_FSound_nFSOUND_1DSP_1MixBuffers(JNIEnv * env, jclass clazz, jobject, jint, jobject, jint, jint, jint, jint, jint, jint) { - //XXX - throwFMODException(env, "missing implementation"); - return false; +JNIEXPORT jboolean JNICALL Java_org_lwjgl_fmod3_FSound_nFSOUND_1DSP_1MixBuffers(JNIEnv * env, jclass clazz, jobject destBuffer, jint destBufferOffset, jobject srcBuffer, jint srcBufferOffset, jint len, jint freq, jint vol, jint pan, jint mode) { + void * nDestBuffer = destBufferOffset + (char *) env->GetDirectBufferAddress(destBuffer); + void * nSrcBuffer = srcBufferOffset + (char *) env->GetDirectBufferAddress(srcBuffer); + return fmod_instance->FSOUND_DSP_MixBuffers(nDestBuffer, nSrcBuffer, len, freq, vol, pan, mode); } /* @@ -1760,7 +1775,9 @@ * Signature: (J)Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_fmod3_FSound_nFSOUND_1Reverb_1SetProperties(JNIEnv * env, jclass clazz, jlong prop) { - return fmod_instance->FSOUND_Reverb_SetProperties((FSOUND_REVERB_PROPERTIES*) prop); + throwFMODException(env, "missing implementation"); + //return fmod_instance->FSOUND_Reverb_SetProperties((FSOUND_REVERB_PROPERTIES*) prop); + return false; } /* @@ -1769,7 +1786,9 @@ * Signature: (J)Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_fmod3_FSound_nFSOUND_1Reverb_1GetProperties(JNIEnv * env, jclass clazz, jlong prop) { - return fmod_instance->FSOUND_Reverb_GetProperties((FSOUND_REVERB_PROPERTIES*) prop); + throwFMODException(env, "missing implementation"); + //return fmod_instance->FSOUND_Reverb_GetProperties((FSOUND_REVERB_PROPERTIES*) prop); + return false; } /* @@ -1778,7 +1797,9 @@ * Signature: (IJ)Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_fmod3_FSound_nFSOUND_1Reverb_1SetChannelProperties(JNIEnv * env, jclass clazz, jint channel, jlong prop) { - return fmod_instance->FSOUND_Reverb_SetChannelProperties(channel, (FSOUND_REVERB_CHANNELPROPERTIES*) prop); + throwFMODException(env, "missing implementation"); + //return fmod_instance->FSOUND_Reverb_SetChannelProperties(channel, (FSOUND_REVERB_CHANNELPROPERTIES*) prop); + return false; } /* @@ -1787,5 +1808,18 @@ * Signature: (IJ)Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_fmod3_FSound_nFSOUND_1Reverb_1GetChannelProperties(JNIEnv * env, jclass clazz, jint channel, jlong prop) { - return fmod_instance->FSOUND_Reverb_GetChannelProperties(channel, (FSOUND_REVERB_CHANNELPROPERTIES*) prop); + throwFMODException(env, "missing implementation"); + //return fmod_instance->FSOUND_Reverb_GetChannelProperties(channel, (FSOUND_REVERB_CHANNELPROPERTIES*) prop); + return false; +} + +// FSound callbacks +// ======================================= +void * F_CALLBACKAPI fsound_dspcallback(void *originalbuffer, void *newbuffer, int length, void *userdata) { + if (mixer_jnienv == NULL) { attachMixerThread(); } + int size = length * fsound_dsp_buffer_size; + jobject origBuffer = mixer_jnienv->NewDirectByteBuffer(originalbuffer, size); + jobject newBuffer = mixer_jnienv->NewDirectByteBuffer(newbuffer, size); + jobject resultBuffer = mixer_jnienv->CallStaticObjectMethod(fsound, sound_dspcallback, (jlong) *((long *)userdata), origBuffer, newBuffer, (jint) length); + return mixer_jnienv->GetDirectBufferAddress(resultBuffer); } Index: extfmod3.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/fmod3/extfmod3.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- extfmod3.h 12 Jun 2004 20:28:31 -0000 1.2 +++ extfmod3.h 12 Aug 2004 21:38:37 -0000 1.3 @@ -42,6 +42,7 @@ void fmod_create(JNIEnv *env, char*); void fmod_destroy(); +extern void attachMixerThread(); extern FMOD_INSTANCE * fmod_instance; // Setup for callback. The callbacks don't have access to a JNIEnv pointer, so we have to provide @@ -60,4 +61,11 @@ extern jmethodID music_zxxcallback; extern jclass fmusic; +// FSound cached fields +extern jmethodID sound_dspcallback; +extern jclass fsound; + +// size of dsp buffer (in bytes) +extern int fsound_dsp_buffer_size; + #endif |
|
From: Elias N. <eli...@us...> - 2004-08-12 15:22:57
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2860/src/native/win32 Modified Files: org_lwjgl_Sys.cpp Log Message: Implemented default AWT implementation of Sys.getClipboard() Index: org_lwjgl_Sys.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/win32/org_lwjgl_Sys.cpp,v retrieving revision 1.33 retrieving revision 1.34 diff -u -d -r1.33 -r1.34 --- org_lwjgl_Sys.cpp 12 Aug 2004 14:54:39 -0000 1.33 +++ org_lwjgl_Sys.cpp 12 Aug 2004 15:22:48 -0000 1.34 @@ -202,7 +202,7 @@ } -JNIEXPORT jstring JNICALL Java_org_lwjgl_Sys_getClipboard +JNIEXPORT jstring JNICALL Java_org_lwjgl_Sys_nGetClipboard (JNIEnv * env, jclass clazz) { // Check to see if there's text available in the clipboard |
|
From: Elias N. <eli...@us...> - 2004-08-12 15:22:56
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/linux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2860/src/native/linux Modified Files: org_lwjgl_Sys.cpp org_lwjgl_opengl_Display.cpp Log Message: Implemented default AWT implementation of Sys.getClipboard() Index: org_lwjgl_opengl_Display.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/linux/org_lwjgl_opengl_Display.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- org_lwjgl_opengl_Display.cpp 9 Aug 2004 11:55:48 -0000 1.16 +++ org_lwjgl_opengl_Display.cpp 12 Aug 2004 15:22:47 -0000 1.17 @@ -105,7 +105,10 @@ XSync(getDisplay(), False); if (async_x_error) { async_x_error = false; - throwException(env, error_message); + if (env != NULL) + throwException(env, error_message); + else + printfDebug(error_message); return false; } else return true; @@ -132,7 +135,10 @@ XSetErrorHandler(errorHandler); display_connection = XOpenDisplay(NULL); if (display_connection == NULL) { - throwException(env, "Could not open X display"); + if (env != NULL) + throwException(env, "Could not open X display connection"); + else + printfDebug("Could not open X display connection\n"); return NULL; } warp_atom = XInternAtom(getDisplay(), "ignore_warp_atom", False); Index: org_lwjgl_Sys.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/linux/org_lwjgl_Sys.cpp,v retrieving revision 1.30 retrieving revision 1.31 diff -u -d -r1.30 -r1.31 --- org_lwjgl_Sys.cpp 12 Aug 2004 14:30:13 -0000 1.30 +++ org_lwjgl_Sys.cpp 12 Aug 2004 15:22:47 -0000 1.31 @@ -167,7 +167,7 @@ } -JNIEXPORT jstring JNICALL Java_org_lwjgl_Sys_getClipboard +JNIEXPORT jstring JNICALL Java_org_lwjgl_Sys_nGetClipboard (JNIEnv * env, jclass clazz) { return NULL; |
|
From: Elias N. <eli...@us...> - 2004-08-12 15:22:55
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2860/src/native/common Modified Files: org_lwjgl_Sys.h Log Message: Implemented default AWT implementation of Sys.getClipboard() Index: org_lwjgl_Sys.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/org_lwjgl_Sys.h,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- org_lwjgl_Sys.h 12 Aug 2004 14:30:12 -0000 1.26 +++ org_lwjgl_Sys.h 12 Aug 2004 15:22:47 -0000 1.27 @@ -75,8 +75,12 @@ JNIEXPORT void JNICALL Java_org_lwjgl_Sys_nOpenURL (JNIEnv *, jclass, jstring); - -JNIEXPORT jstring JNICALL Java_org_lwjgl_Sys_getClipboard +/* + * Class: org_lwjgl_Sys + * Method: nGetClipboard + * Signature: ()Ljava/lang/String; + */ +JNIEXPORT jstring JNICALL Java_org_lwjgl_Sys_nGetClipboard (JNIEnv *, jclass); #ifdef __cplusplus |
|
From: Elias N. <eli...@us...> - 2004-08-12 15:22:55
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2860/src/java/org/lwjgl Modified Files: Sys.java Log Message: Implemented default AWT implementation of Sys.getClipboard() Index: Sys.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/Sys.java,v retrieving revision 1.54 retrieving revision 1.55 diff -u -d -r1.54 -r1.55 --- Sys.java 12 Aug 2004 14:30:13 -0000 1.54 +++ Sys.java 12 Aug 2004 15:22:46 -0000 1.55 @@ -266,6 +266,20 @@ * Otherwise we return a String, which may be the empty string "". * @return a String, or null if there is no system clipboard. */ - public static native String getClipboard(); - + public static String getClipboard() { + try { + java.awt.datatransfer.Clipboard clipboard = java.awt.Toolkit.getDefaultToolkit().getSystemClipboard(); + java.awt.datatransfer.Transferable transferable = clipboard.getContents(null); + if (transferable.isDataFlavorSupported(java.awt.datatransfer.DataFlavor.stringFlavor)) { + return (String)transferable.getTransferData(java.awt.datatransfer.DataFlavor.stringFlavor); + } else { + return null; + } + } catch (Exception e) { + // ignore exception and use native implementation + return nGetClipboard(); + } + } + + private static native String nGetClipboard(); } |
|
From: Caspian Rychlik-P. <ci...@us...> - 2004-08-12 14:54:48
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30370/src/java/org/lwjgl/test Modified Files: SysTest.java Log Message: Implemented getClipboard on Win32 Index: SysTest.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/SysTest.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- SysTest.java 3 Jul 2004 13:48:47 -0000 1.4 +++ SysTest.java 12 Aug 2004 14:54:39 -0000 1.5 @@ -59,6 +59,7 @@ testTimer(); testPriority(); testUrl(); + testClipboard(); } /** @@ -175,6 +176,13 @@ } /** + * Tests the clipboard. Helps to have something in it first... + */ + private void testClipboard() { + System.out.println("Contents of clipboard: '"+Sys.getClipboard()+"'"); + } + + /** * Tests the Sys class, and serves as basic usage test * * @param args ignored |
|
From: Caspian Rychlik-P. <ci...@us...> - 2004-08-12 14:54:48
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30370/src/native/win32 Modified Files: org_lwjgl_Sys.cpp Log Message: Implemented getClipboard on Win32 Index: org_lwjgl_Sys.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/win32/org_lwjgl_Sys.cpp,v retrieving revision 1.32 retrieving revision 1.33 diff -u -d -r1.32 -r1.33 --- org_lwjgl_Sys.cpp 12 Aug 2004 14:30:12 -0000 1.32 +++ org_lwjgl_Sys.cpp 12 Aug 2004 14:54:39 -0000 1.33 @@ -177,8 +177,44 @@ } + +const void * getClipboard(int type) +{ + + void * ret; + + // Open the clipboard + if (!OpenClipboard(NULL)) + return NULL; + + HANDLE hglb = GetClipboardData(type); + if (hglb != NULL) { + ret = GlobalLock(hglb); + if (ret != NULL) { + GlobalUnlock(hglb); + } + } + + // Close the clipboard now we're done + CloseClipboard(); + + return ret; + +} + JNIEXPORT jstring JNICALL Java_org_lwjgl_Sys_getClipboard (JNIEnv * env, jclass clazz) { - return NULL; + // Check to see if there's text available in the clipboard + BOOL textAvailable = IsClipboardFormatAvailable(CF_TEXT); + BOOL unicodeAvailable = IsClipboardFormatAvailable(CF_UNICODETEXT); + + if (unicodeAvailable) { + const wchar_t * str = (const wchar_t *) getClipboard(CF_UNICODETEXT); + return env->NewString(str, wcslen(str)); + } else if (textAvailable) { + return env->NewStringUTF((const char *) getClipboard(CF_TEXT)); + } else { + return NULL; + } } |
|
From: Caspian Rychlik-P. <ci...@us...> - 2004-08-12 14:30:23
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25921/src/java/org/lwjgl Modified Files: Sys.java Log Message: Put getClipboard back. Index: Sys.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/Sys.java,v retrieving revision 1.53 retrieving revision 1.54 diff -u -d -r1.53 -r1.54 --- Sys.java 12 Aug 2004 14:22:37 -0000 1.53 +++ Sys.java 12 Aug 2004 14:30:13 -0000 1.54 @@ -259,5 +259,13 @@ * Where necessary, we use a native implementation of openURL. */ private static native void nOpenURL(String url); + + /** + * Get the contents of the system clipboard. The system might not have a clipboard + * (particularly if it doesn't even have a keyboard) in which case we return null. + * Otherwise we return a String, which may be the empty string "". + * @return a String, or null if there is no system clipboard. + */ + public static native String getClipboard(); } |
|
From: Caspian Rychlik-P. <ci...@us...> - 2004-08-12 14:30:23
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25921/src/native/win32 Modified Files: org_lwjgl_Sys.cpp Log Message: Put getClipboard back. Index: org_lwjgl_Sys.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/win32/org_lwjgl_Sys.cpp,v retrieving revision 1.31 retrieving revision 1.32 diff -u -d -r1.31 -r1.32 --- org_lwjgl_Sys.cpp 12 Aug 2004 14:22:20 -0000 1.31 +++ org_lwjgl_Sys.cpp 12 Aug 2004 14:30:12 -0000 1.32 @@ -177,3 +177,8 @@ } +JNIEXPORT jstring JNICALL Java_org_lwjgl_Sys_getClipboard + (JNIEnv * env, jclass clazz) +{ + return NULL; +} |
|
From: Caspian Rychlik-P. <ci...@us...> - 2004-08-12 14:30:22
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/linux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25921/src/native/linux Modified Files: org_lwjgl_Sys.cpp Log Message: Put getClipboard back. Index: org_lwjgl_Sys.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/linux/org_lwjgl_Sys.cpp,v retrieving revision 1.29 retrieving revision 1.30 diff -u -d -r1.29 -r1.30 --- org_lwjgl_Sys.cpp 12 Aug 2004 14:22:25 -0000 1.29 +++ org_lwjgl_Sys.cpp 12 Aug 2004 14:30:13 -0000 1.30 @@ -167,3 +167,8 @@ } +JNIEXPORT jstring JNICALL Java_org_lwjgl_Sys_getClipboard + (JNIEnv * env, jclass clazz) +{ + return NULL; +} |
|
From: Caspian Rychlik-P. <ci...@us...> - 2004-08-12 14:30:21
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25921/src/native/common Modified Files: org_lwjgl_Sys.h Log Message: Put getClipboard back. Index: org_lwjgl_Sys.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/org_lwjgl_Sys.h,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- org_lwjgl_Sys.h 12 Aug 2004 14:21:38 -0000 1.25 +++ org_lwjgl_Sys.h 12 Aug 2004 14:30:12 -0000 1.26 @@ -76,6 +76,9 @@ (JNIEnv *, jclass, jstring); +JNIEXPORT jstring JNICALL Java_org_lwjgl_Sys_getClipboard + (JNIEnv *, jclass); + #ifdef __cplusplus } #endif |
|
From: Caspian Rychlik-P. <ci...@us...> - 2004-08-12 14:22:47
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24557/src/java/org/lwjgl Modified Files: Sys.java Log Message: Index: Sys.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/Sys.java,v retrieving revision 1.52 retrieving revision 1.53 diff -u -d -r1.52 -r1.53 --- Sys.java 11 Aug 2004 15:37:40 -0000 1.52 +++ Sys.java 12 Aug 2004 14:22:37 -0000 1.53 @@ -259,28 +259,5 @@ * Where necessary, we use a native implementation of openURL. */ private static native void nOpenURL(String url); - - /** - * Get the contents of the system clipboard. The system might not have a clipboard - * (particularly if it doesn't even have a keyboard) in which case we return null. - * Otherwise we return a String, which may be the empty string "". - * @return a String, or null if there is no system clipboard. - */ - public static native String getClipboard(); - - /** - * Set the contents of the system clipboard. The system might not have a clipboard - * (particularly if it doesn't even have a keyboard) in which case we silently - * ignore this method as a no-op.<p>Passing null is allowed and is effectively the - * same as passing the empty string "". - * @param newClip the new clipboard contents - */ - public static void setClipboard(String newClip) { - if (newClip == null) { - newClip = ""; - } - nSetClipboard(newClip); - } - private static native void nSetClipboard(String newClip); - + } |
|
From: Caspian Rychlik-P. <ci...@us...> - 2004-08-12 14:22:34
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/linux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24500/src/native/linux Modified Files: org_lwjgl_Sys.cpp Log Message: Removed clipboard stuff. Elias got a headache Index: org_lwjgl_Sys.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/linux/org_lwjgl_Sys.cpp,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- org_lwjgl_Sys.cpp 12 Aug 2004 12:27:13 -0000 1.28 +++ org_lwjgl_Sys.cpp 12 Aug 2004 14:22:25 -0000 1.29 @@ -153,6 +153,11 @@ return getVersionString(env); } +/* + * Class: org_lwjgl_Sys + * Method: openURL + * Signature: (Ljava/lang/String;)V + */ JNIEXPORT void JNICALL Java_org_lwjgl_Sys_nOpenURL (JNIEnv * env, jclass clazz, jstring url) { @@ -161,18 +166,4 @@ env->ReleaseStringUTFChars(url, urlString); } -JNIEXPORT void JNICALL Java_org_lwjgl_Sys_nSetClipboard - (JNIEnv * env, jclass clazz, jstring clipboard) -{ - const char * clipboard_string = env->GetStringUTFChars(clipboard, NULL); - const jsize clipboard_size = env->GetStringUTFLength(clipboard); - printf("string %s, size %d\n", clipboard_string, clipboard_size); - env->ReleaseStringUTFChars(clipboard, clipboard_string); -} - -JNIEXPORT jstring JNICALL Java_org_lwjgl_Sys_getClipboard - (JNIEnv * env, jclass clazz) -{ - return NULL; -} |
|
From: Caspian Rychlik-P. <ci...@us...> - 2004-08-12 14:22:34
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24500/src/native/win32 Modified Files: org_lwjgl_Sys.cpp Log Message: Removed clipboard stuff. Elias got a headache Index: org_lwjgl_Sys.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/win32/org_lwjgl_Sys.cpp,v retrieving revision 1.30 retrieving revision 1.31 diff -u -d -r1.30 -r1.31 --- org_lwjgl_Sys.cpp 12 Aug 2004 12:27:14 -0000 1.30 +++ org_lwjgl_Sys.cpp 12 Aug 2004 14:22:20 -0000 1.31 @@ -176,17 +176,4 @@ } -JNIEXPORT void JNICALL Java_org_lwjgl_Sys_nSetClipboard - (JNIEnv * env, jclass clazz, jstring clipboard) -{ - const char * clipboardString = env->GetStringUTFChars(clipboard, NULL); - // TODO - env->ReleaseStringUTFChars(clipboardString); -} - -JNIEXPORT jstring JNICALL Java_org_lwjgl_Sys_getClipboard - (JNIEnv * env, jclass clazz) -{ - return NULL; -} |
|
From: Caspian Rychlik-P. <ci...@us...> - 2004-08-12 14:21:47
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24333/src/native/common Modified Files: org_lwjgl_Sys.h Log Message: Removed clipboard stuff. Elias got a headache Index: org_lwjgl_Sys.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/org_lwjgl_Sys.h,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- org_lwjgl_Sys.h 12 Aug 2004 12:27:12 -0000 1.24 +++ org_lwjgl_Sys.h 12 Aug 2004 14:21:38 -0000 1.25 @@ -75,21 +75,6 @@ JNIEXPORT void JNICALL Java_org_lwjgl_Sys_nOpenURL (JNIEnv *, jclass, jstring); -/* - * Class: org_lwjgl_Sys - * Method: getClipboard - * Signature: ()Ljava/lang/String; - */ -JNIEXPORT jstring JNICALL Java_org_lwjgl_Sys_getClipboard - (JNIEnv *, jclass); - -/* - * Class: org_lwjgl_Sys - * Method: nSetClipboard - * Signature: (Ljava/lang/String;)V - */ -JNIEXPORT void JNICALL Java_org_lwjgl_Sys_nSetClipboard - (JNIEnv *, jclass, jstring); #ifdef __cplusplus } |
|
From: Elias N. <eli...@us...> - 2004-08-12 12:27:55
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1279/src/native/win32 Modified Files: org_lwjgl_Sys.cpp Log Message: Fixed Sys.setClipboard native stub naming Index: org_lwjgl_Sys.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/win32/org_lwjgl_Sys.cpp,v retrieving revision 1.29 retrieving revision 1.30 diff -u -d -r1.29 -r1.30 --- org_lwjgl_Sys.cpp 11 Aug 2004 15:37:38 -0000 1.29 +++ org_lwjgl_Sys.cpp 12 Aug 2004 12:27:14 -0000 1.30 @@ -176,23 +176,14 @@ } -/* - * Class: org_lwjgl_Sys - * Method: setClipboard - * Signature: (Ljava/lang/String;)V - */ -JNIEXPORT void JNICALL Java_org_lwjgl_Sys_setClipboard +JNIEXPORT void JNICALL Java_org_lwjgl_Sys_nSetClipboard (JNIEnv * env, jclass clazz, jstring clipboard) { - const char * urlString = env->GetStringUTFChars(clipboard, NULL); + const char * clipboardString = env->GetStringUTFChars(clipboard, NULL); // TODO + env->ReleaseStringUTFChars(clipboardString); } -/* - * Class: org_lwjgl_Sys - * Method: getClipboard - * Signature: ()Ljava/lang/String; - */ JNIEXPORT jstring JNICALL Java_org_lwjgl_Sys_getClipboard (JNIEnv * env, jclass clazz) { |
|
From: Elias N. <eli...@us...> - 2004-08-12 12:27:53
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/linux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1279/src/native/linux Modified Files: org_lwjgl_Sys.cpp Log Message: Fixed Sys.setClipboard native stub naming Index: org_lwjgl_Sys.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/linux/org_lwjgl_Sys.cpp,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -r1.27 -r1.28 --- org_lwjgl_Sys.cpp 11 Aug 2004 15:37:40 -0000 1.27 +++ org_lwjgl_Sys.cpp 12 Aug 2004 12:27:13 -0000 1.28 @@ -153,11 +153,6 @@ return getVersionString(env); } -/* - * Class: org_lwjgl_Sys - * Method: openURL - * Signature: (Ljava/lang/String;)V - */ JNIEXPORT void JNICALL Java_org_lwjgl_Sys_nOpenURL (JNIEnv * env, jclass clazz, jstring url) { @@ -166,23 +161,15 @@ env->ReleaseStringUTFChars(url, urlString); } -/* - * Class: org_lwjgl_Sys - * Method: setClipboard - * Signature: (Ljava/lang/String;)V - */ -JNIEXPORT void JNICALL Java_org_lwjgl_Sys_setClipboard +JNIEXPORT void JNICALL Java_org_lwjgl_Sys_nSetClipboard (JNIEnv * env, jclass clazz, jstring clipboard) { - const char * urlString = env->GetStringUTFChars(clipboard, NULL); - // TODO + const char * clipboard_string = env->GetStringUTFChars(clipboard, NULL); + const jsize clipboard_size = env->GetStringUTFLength(clipboard); + printf("string %s, size %d\n", clipboard_string, clipboard_size); + env->ReleaseStringUTFChars(clipboard, clipboard_string); } -/* - * Class: org_lwjgl_Sys - * Method: getClipboard - * Signature: ()Ljava/lang/String; - */ JNIEXPORT jstring JNICALL Java_org_lwjgl_Sys_getClipboard (JNIEnv * env, jclass clazz) { |
|
From: Elias N. <eli...@us...> - 2004-08-12 12:27:38
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1279/src/native/common Modified Files: org_lwjgl_Sys.h Log Message: Fixed Sys.setClipboard native stub naming Index: org_lwjgl_Sys.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/org_lwjgl_Sys.h,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- org_lwjgl_Sys.h 11 Aug 2004 15:37:39 -0000 1.23 +++ org_lwjgl_Sys.h 12 Aug 2004 12:27:12 -0000 1.24 @@ -77,20 +77,20 @@ /* * Class: org_lwjgl_Sys - * Method: setClipboard - * Signature: (Ljava/lang/String;)V - */ -JNIEXPORT void JNICALL Java_org_lwjgl_Sys_setClipboard - (JNIEnv *, jclass, jstring ); - -/* - * Class: org_lwjgl_Sys * Method: getClipboard * Signature: ()Ljava/lang/String; */ JNIEXPORT jstring JNICALL Java_org_lwjgl_Sys_getClipboard (JNIEnv *, jclass); +/* + * Class: org_lwjgl_Sys + * Method: nSetClipboard + * Signature: (Ljava/lang/String;)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_Sys_nSetClipboard + (JNIEnv *, jclass, jstring); + #ifdef __cplusplus } #endif |
|
From: Caspian Rychlik-P. <ci...@us...> - 2004-08-11 15:37:50
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/linux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18852/src/native/linux Modified Files: org_lwjgl_Sys.cpp Log Message: Index: org_lwjgl_Sys.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/linux/org_lwjgl_Sys.cpp,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- org_lwjgl_Sys.cpp 12 Jun 2004 20:28:32 -0000 1.26 +++ org_lwjgl_Sys.cpp 11 Aug 2004 15:37:40 -0000 1.27 @@ -166,3 +166,26 @@ env->ReleaseStringUTFChars(url, urlString); } +/* + * Class: org_lwjgl_Sys + * Method: setClipboard + * Signature: (Ljava/lang/String;)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_Sys_setClipboard + (JNIEnv * env, jclass clazz, jstring clipboard) +{ + const char * urlString = env->GetStringUTFChars(clipboard, NULL); + // TODO +} + +/* + * Class: org_lwjgl_Sys + * Method: getClipboard + * Signature: ()Ljava/lang/String; + */ +JNIEXPORT jstring JNICALL Java_org_lwjgl_Sys_getClipboard + (JNIEnv * env, jclass clazz) +{ + return NULL; +} + |
|
From: Caspian Rychlik-P. <ci...@us...> - 2004-08-11 15:37:49
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18852/src/native/win32 Modified Files: org_lwjgl_Sys.cpp Log Message: Index: org_lwjgl_Sys.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/win32/org_lwjgl_Sys.cpp,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- org_lwjgl_Sys.cpp 26 Jul 2004 17:01:55 -0000 1.28 +++ org_lwjgl_Sys.cpp 11 Aug 2004 15:37:38 -0000 1.29 @@ -175,3 +175,27 @@ CloseHandle( pi.hThread ); } + +/* + * Class: org_lwjgl_Sys + * Method: setClipboard + * Signature: (Ljava/lang/String;)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_Sys_setClipboard + (JNIEnv * env, jclass clazz, jstring clipboard) +{ + const char * urlString = env->GetStringUTFChars(clipboard, NULL); + // TODO +} + +/* + * Class: org_lwjgl_Sys + * Method: getClipboard + * Signature: ()Ljava/lang/String; + */ +JNIEXPORT jstring JNICALL Java_org_lwjgl_Sys_getClipboard + (JNIEnv * env, jclass clazz) +{ + return NULL; +} + |
|
From: Caspian Rychlik-P. <ci...@us...> - 2004-08-11 15:37:49
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18852/src/java/org/lwjgl Modified Files: Sys.java Log Message: Index: Sys.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/Sys.java,v retrieving revision 1.51 retrieving revision 1.52 diff -u -d -r1.51 -r1.52 --- Sys.java 21 Jul 2004 14:58:59 -0000 1.51 +++ Sys.java 11 Aug 2004 15:37:40 -0000 1.52 @@ -42,7 +42,7 @@ * @version $Revision$ */ public final class Sys { - public static final String VERSION = "0.91"; + public static final String VERSION = "0.92"; /** Low process priority. @see #setProcessPriority() */ public static final int LOW_PRIORITY = -1; @@ -259,4 +259,28 @@ * Where necessary, we use a native implementation of openURL. */ private static native void nOpenURL(String url); + + /** + * Get the contents of the system clipboard. The system might not have a clipboard + * (particularly if it doesn't even have a keyboard) in which case we return null. + * Otherwise we return a String, which may be the empty string "". + * @return a String, or null if there is no system clipboard. + */ + public static native String getClipboard(); + + /** + * Set the contents of the system clipboard. The system might not have a clipboard + * (particularly if it doesn't even have a keyboard) in which case we silently + * ignore this method as a no-op.<p>Passing null is allowed and is effectively the + * same as passing the empty string "". + * @param newClip the new clipboard contents + */ + public static void setClipboard(String newClip) { + if (newClip == null) { + newClip = ""; + } + nSetClipboard(newClip); + } + private static native void nSetClipboard(String newClip); + } |
|
From: Caspian Rychlik-P. <ci...@us...> - 2004-08-11 15:37:49
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18852/src/native/common Modified Files: org_lwjgl_Sys.h common_tools.cpp Log Message: Index: org_lwjgl_Sys.h =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/org_lwjgl_Sys.h,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- org_lwjgl_Sys.h 5 May 2004 14:28:39 -0000 1.22 +++ org_lwjgl_Sys.h 11 Aug 2004 15:37:39 -0000 1.23 @@ -75,6 +75,22 @@ JNIEXPORT void JNICALL Java_org_lwjgl_Sys_nOpenURL (JNIEnv *, jclass, jstring); +/* + * Class: org_lwjgl_Sys + * Method: setClipboard + * Signature: (Ljava/lang/String;)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_Sys_setClipboard + (JNIEnv *, jclass, jstring ); + +/* + * Class: org_lwjgl_Sys + * Method: getClipboard + * Signature: ()Ljava/lang/String; + */ +JNIEXPORT jstring JNICALL Java_org_lwjgl_Sys_getClipboard + (JNIEnv *, jclass); + #ifdef __cplusplus } #endif Index: common_tools.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/common_tools.cpp,v retrieving revision 1.29 retrieving revision 1.30 diff -u -d -r1.29 -r1.30 --- common_tools.cpp 21 Jul 2004 15:00:24 -0000 1.29 +++ common_tools.cpp 11 Aug 2004 15:37:39 -0000 1.30 @@ -41,7 +41,7 @@ #include "common_tools.h" static bool debug = false; -static const char* VERSION = "0.91"; +static const char* VERSION = "0.92"; JavaVM *jvm; void initAttribList(attrib_list_t *list) { |
|
From: Brian M. <ma...@us...> - 2004-08-10 17:15:05
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common/fmod3 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18982 Modified Files: org_lwjgl_fmod3_FSound.cpp Log Message: last of the 3d functions Index: org_lwjgl_fmod3_FSound.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/fmod3/org_lwjgl_fmod3_FSound.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- org_lwjgl_fmod3_FSound.cpp 21 Jul 2004 14:48:15 -0000 1.4 +++ org_lwjgl_fmod3_FSound.cpp 10 Aug 2004 17:14:56 -0000 1.5 @@ -581,7 +581,7 @@ * Signature: (IIIIIII)Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_fmod3_FSound_FSOUND_1SetLevels(JNIEnv * env, jclass clazz, jint, jint, jint, jint, jint, jint, jint) { - //XBOX only + //XBOX only - snowballs chance in hell we will get to support that! return false; } @@ -875,9 +875,16 @@ * Method: nFSOUND_3D_Listener_GetAttributes * Signature: (Ljava/nio/FloatBuffer;ILjava/nio/FloatBuffer;ILjava/nio/FloatBuffer;ILjava/nio/FloatBuffer;ILjava/nio/FloatBuffer;ILjava/nio/FloatBuffer;ILjava/nio/FloatBuffer;ILjava/nio/FloatBuffer;I)V */ -JNIEXPORT void JNICALL Java_org_lwjgl_fmod3_FSound_nFSOUND_13D_1Listener_1GetAttributes(JNIEnv * env, jclass clazz, jobject, jint, jobject, jint, jobject, jint, jobject, jint, jobject, jint, jobject, jint, jobject, jint, jobject, jint) { - //XXX - throwFMODException(env, "missing implementation"); +JNIEXPORT void JNICALL Java_org_lwjgl_fmod3_FSound_nFSOUND_13D_1Listener_1GetAttributes(JNIEnv * env, jclass clazz, jobject pos, jint posOffset, jobject vel, jint velOffset, jobject fx, jint fxOffset, jobject fy, jint fyOffset, jobject fz, jint fzOffset, jobject tx, jint txOffset, jobject ty, jint tyOffset, jobject tz, jint tzOffset) { + float* nPos = (pos != NULL) ? posOffset + (float *) env->GetDirectBufferAddress(pos) : NULL; + float* nVel = (vel != NULL) ? velOffset + (float *) env->GetDirectBufferAddress(vel) : NULL; + float* nFx = (fx != NULL) ? fxOffset + (float *) env->GetDirectBufferAddress(fx) : NULL; + float* nFy = (fy != NULL) ? fyOffset + (float *) env->GetDirectBufferAddress(fy) : NULL; + float* nFz = (fz != NULL) ? fzOffset + (float *) env->GetDirectBufferAddress(fz) : NULL; + float* nTx = (tx != NULL) ? txOffset + (float *) env->GetDirectBufferAddress(tx) : NULL; + float* nTy = (ty != NULL) ? tyOffset + (float *) env->GetDirectBufferAddress(ty) : NULL; + float* nTz = (tz != NULL) ? tzOffset + (float *) env->GetDirectBufferAddress(tz) : NULL; + fmod_instance->FSOUND_3D_Listener_GetAttributes(nPos, nVel, nFx, nFy, nFz, nTx, nTy, nTz); } /* @@ -885,9 +892,10 @@ * Method: nFSOUND_3D_Listener_SetAttributes * Signature: (Ljava/nio/FloatBuffer;ILjava/nio/FloatBuffer;IFFFFFF)V */ -JNIEXPORT void JNICALL Java_org_lwjgl_fmod3_FSound_nFSOUND_13D_1Listener_1SetAttributes(JNIEnv * env, jclass clazz, jobject, jint, jobject, jint, jfloat, jfloat, jfloat, jfloat, jfloat, jfloat) { - //XXX - throwFMODException(env, "missing implementation"); +JNIEXPORT void JNICALL Java_org_lwjgl_fmod3_FSound_nFSOUND_13D_1Listener_1SetAttributes(JNIEnv * env, jclass clazz, jobject pos, jint posOffset, jobject vel, jint velOffset, jfloat fx, jfloat fy, jfloat fz, jfloat tx, jfloat ty, jfloat tz) { + float* nPos = posOffset + (float *) env->GetDirectBufferAddress(pos); + float* nVel = velOffset + (float *) env->GetDirectBufferAddress(vel); + fmod_instance->FSOUND_3D_Listener_SetAttributes(nPos, nVel, fx, fy, fz, tx, ty, tz); } /* |