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) |
3
|
4
|
5
|
|
6
|
7
(5) |
8
|
9
(18) |
10
|
11
|
12
(25) |
|
13
|
14
(4) |
15
|
16
|
17
(2) |
18
|
19
|
|
20
|
21
(12) |
22
|
23
|
24
|
25
|
26
|
|
27
(1) |
28
|
29
|
30
(4) |
|
|
|
|
From: Brian M. <ma...@us...> - 2004-06-09 19:53:54
|
Update of /cvsroot/java-game-lib/LWJGL/platform_build/win32_ms_cmdline In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8204 Modified Files: build-fmod.bat Log Message: fmod -> fmod3 Index: build-fmod.bat =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/platform_build/win32_ms_cmdline/build-fmod.bat,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- build-fmod.bat 23 May 2004 13:49:05 -0000 1.1 +++ build-fmod.bat 9 Jun 2004 19:53:45 -0000 1.2 @@ -6,7 +6,7 @@ set LINKEROPTS=/link set LIBS=user32.lib Gdi32.lib Advapi32.lib -for %%x in (..\..\src\native\common\fmod\*.cpp) do cl %COPTIONS% %%x +for %%x in (..\..\src\native\common\fmod3\*.cpp) do cl %COPTIONS% %%x for %%x in (..\..\src\native\common\*common*.cpp) do cl %COPTIONS% %%x -cl /LD /Felwjgl-fmod.dll *.obj %LINKEROPTS% %LIBS% \ No newline at end of file +cl /LD /Felwjgl-fmod3.dll *.obj %LINKEROPTS% %LIBS% \ No newline at end of file |
Update of /cvsroot/java-game-lib/LWJGL/src/native/common/fmod3 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7624/common/fmod3 Added Files: Makefile.am extfmod3.cpp extfmod3.h org_lwjgl_fmod3_FMOD.cpp org_lwjgl_fmod3_FMusic.cpp org_lwjgl_fmod3_FSound.cpp Log Message: fmod -> fmod3 --- NEW FILE: org_lwjgl_fmod3_FMOD.cpp --- /* * Copyright (c) 2002-2004 Lightweight 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 'Lightweight 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_fmod3_FMOD.h" #include "extfmod3.h" static const char* VERSION = "0.9a"; /* * Class: org_lwjgl_fmod3_FMOD * Method: getNativeLibraryVersion * Signature: ()Ljava/lang/String; */ JNIEXPORT jstring JNICALL Java_org_lwjgl_fmod3_FMOD_getNativeLibraryVersion(JNIEnv * env, jclass clazz) { return env->NewStringUTF(VERSION); } /* * Class: org_lwjgl_fmod3_FMOD * Method: nCreate * Signature: ()V */ JNIEXPORT void JNICALL Java_org_lwjgl_fmod3_FMOD_nCreate(JNIEnv *env, jclass clazz, jobjectArray paths) { jsize pathcount = env->GetArrayLength(paths); for(int i=0;i<pathcount;i++) { jstring path = (jstring) env->GetObjectArrayElement(paths, i); char *path_str = (char *) env->GetStringUTFChars(path, NULL); printfDebug("Trying to load fmod_instance from %s\n", path_str); fmod_create(env, path_str); env->ReleaseStringUTFChars(path, path_str); if(fmod_instance != NULL) { return; } } throwFMODException(env, "Unable to load fmod library"); } /* * Class: org_lwjgl_fmod3_FMOD * Method: nDestroy * Signature: ()V */ JNIEXPORT void JNICALL Java_org_lwjgl_fmod3_FMOD_nDestroy(JNIEnv *env, jclass clazz) { fmod_destroy(); } /* * Class: org_lwjgl_fmod3_FMOD * Method: FMOD_ErrorString * Signature: (I)Ljava/lang/String; */ JNIEXPORT jstring JNICALL Java_org_lwjgl_fmod3_FMOD_FMOD_1ErrorString(JNIEnv *env, jclass clazz, jint errorcode) { return env->NewStringUTF(FMOD_ErrorString(errorcode)); } --- NEW FILE: org_lwjgl_fmod3_FSound.cpp --- /* * Copyright (c) 2002-2004 Lightweight 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 'Lightweight 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. * [...1718 lines suppressed...] return fmod_instance->FSOUND_Reverb_GetProperties((FSOUND_REVERB_PROPERTIES*) prop); } /* * Class: org_lwjgl_fmod3_FSound * Method: nFSOUND_Reverb_SetChannelProperties * 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); } /* * Class: org_lwjgl_fmod3_FSound * Method: nFSOUND_Reverb_GetChannelProperties * 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); } --- NEW FILE: extfmod3.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. */ #ifdef _WIN32 #define WIN32_LEAN_AND_MEAN #include <windows.h> #endif #include <stdio.h> #include "extfmod3.h" /** Instance of fmod */ FMOD_INSTANCE * fmod_instance = NULL; // jnienvs JNIEnv *mixer_jnienv; JNIEnv *stream_jnienv; // FMusic cached fields jmethodID music_instcallback; jmethodID music_ordercallback; jmethodID music_rowcallback; jmethodID music_zxxcallback; jclass fmusic; #ifdef _WIN32 /** * DLL entry point for Windows. Called when Java loads the .dll */ BOOL WINAPI DllMain( HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { return true; } #endif /** * Creates and loads the FMOD instance * * @param path path to try to load dll */ void fmod_create(JNIEnv *env, char* path) { fmod_instance = FMOD_CreateInstance(path); if (fmod_instance != NULL) { fmusic = env->FindClass("org/lwjgl/fmod3/FMusic"); music_instcallback = env->GetStaticMethodID(fmusic, "music_instcallback", "(JI)V"); 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"); } } /** * Destroys the fmod instance */ void fmod_destroy() { if (fmod_instance != NULL) { FMOD_FreeInstance(fmod_instance); } } --- NEW FILE: org_lwjgl_fmod3_FMusic.cpp --- /* * Copyright (c) 2002-2004 Lightweight 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 'Lightweight 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_fmod3_FMusic.h" #include "extfmod3.h" // callback void F_CALLBACKAPI fmusic_instcallback(FMUSIC_MODULE *mod, unsigned char param); void F_CALLBACKAPI fmusic_ordercallback(FMUSIC_MODULE *mod, unsigned char param); void F_CALLBACKAPI fmusic_rowcallback(FMUSIC_MODULE *mod, unsigned char param); void F_CALLBACKAPI fmusic_zxxcallback(FMUSIC_MODULE *mod, unsigned char param); /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_LoadSong * Signature: (Ljava/lang/String;)J */ JNIEXPORT jlong JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1LoadSong(JNIEnv *env, jclass clazz, jstring name) { const char* filename = (const char*) (env->GetStringUTFChars(name, 0)); return (jlong) fmod_instance->FMUSIC_LoadSong(filename); } /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_LoadSongEx * Signature: (Ljava/nio/ByteBuffer;IIILjava/nio/IntBuffer;I)J */ JNIEXPORT jlong JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1LoadSongEx__Ljava_nio_ByteBuffer_2IIIILjava_nio_IntBuffer_2II (JNIEnv *env, jclass clazz, jobject data, jint dataOffset, jint offset, jint length, jint mode, jobject sampleList, jint sampleListOffset, jint samplelistnum){ int *sampleData = NULL; const char *songData = dataOffset + (char *) env->GetDirectBufferAddress(data); if(sampleList != NULL) { sampleData = sampleListOffset + (int *) env->GetDirectBufferAddress(sampleList); } return (jlong) fmod_instance->FMUSIC_LoadSongEx(songData, offset, length, mode, sampleData, samplelistnum); } /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_LoadSongEx * Signature: (Ljava/nio/ByteBuffer;IIILjava/nio/IntBuffer;I)J */ JNIEXPORT jlong JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1LoadSongEx__Ljava_lang_String_2IIILjava_nio_IntBuffer_2II (JNIEnv *env, jclass clazz, jstring name, jint offset, jint length, jint mode, jobject sampleList, jint sampleListOffset, jint samplelistnum){ int *sampleData = NULL; const char* filename = (const char*) (env->GetStringUTFChars(name, 0)); if(sampleList != NULL) { sampleData = sampleListOffset + (int *) env->GetDirectBufferAddress(sampleList); } return (jlong) fmod_instance->FMUSIC_LoadSongEx(filename, offset, length, mode, sampleData, samplelistnum); } /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_GetOpenState * Signature: (J)I */ JNIEXPORT jint JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1GetOpenState (JNIEnv *env, jclass clazz, jlong module){ return fmod_instance->FMUSIC_GetOpenState((FMUSIC_MODULE *) module); } /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_FreeSong * Signature: (J)Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1FreeSong (JNIEnv *env, jclass clazz, jlong module){ return fmod_instance->FMUSIC_FreeSong((FMUSIC_MODULE *) module); } /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_PlaySong * Signature: (J)Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1PlaySong (JNIEnv *env, jclass clazz, jlong module){ return fmod_instance->FMUSIC_PlaySong((FMUSIC_MODULE *) module); } /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_StopSong * Signature: (J)Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1StopSong (JNIEnv *env, jclass clazz, jlong module){ return fmod_instance->FMUSIC_StopSong((FMUSIC_MODULE *) module); } /* * Class: org_lwjgl_fmod3_FMusic * Method: FMUSIC_StopAllSongs * Signature: ()V */ JNIEXPORT void JNICALL Java_org_lwjgl_fmod3_FMusic_FMUSIC_1StopAllSongs (JNIEnv *env, jclass clazz){ return fmod_instance->FMUSIC_StopAllSongs(); } /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_SetZxxCallback * Signature: (JLorg/lwjgl/fmod_instance/FMusicCallback;)Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1SetZxxCallback(JNIEnv *env, jclass clazz, jlong module){ return fmod_instance->FMUSIC_SetZxxCallback((FMUSIC_MODULE*)module, fmusic_zxxcallback); } /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_SetRowCallback * Signature: (JLorg/lwjgl/fmod_instance/FMusicCallback;I)Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1SetRowCallback(JNIEnv *env, jclass clazz, jlong module, jint row) { return fmod_instance->FMUSIC_SetRowCallback((FMUSIC_MODULE*)module, fmusic_rowcallback, row); } /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_SetOrderCallback * Signature: (JLorg/lwjgl/fmod_instance/FMusicCallback;I)Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1SetOrderCallback(JNIEnv *env, jclass clazz, jlong module, jint order) { return fmod_instance->FMUSIC_SetOrderCallback((FMUSIC_MODULE*)module, fmusic_ordercallback, order); } /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_SetInstCallback * Signature: (JLorg/lwjgl/fmod_instance/FMusicCallback;I)Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1SetInstCallback(JNIEnv *env, jclass clazz, jlong module, jint inst){ return fmod_instance->FMUSIC_SetInstCallback((FMUSIC_MODULE*)module, fmusic_instcallback, inst); } /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_SetSample * Signature: (JIJ)Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1SetSample (JNIEnv *env, jclass clazz, jlong module, jint sampno, jlong sample){ return fmod_instance->FMUSIC_SetSample((FMUSIC_MODULE *) module, sampno, (FSOUND_SAMPLE *) sample); } /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_SetUserData * Signature: (JLjava/nio/ByteBuffer;I)Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1SetUserData(JNIEnv *env, jclass clazz, jlong module, jobject data, jint offset) { void *userdata = offset + (char*) env->GetDirectBufferAddress(data); return fmod_instance->FMUSIC_SetUserData((FMUSIC_MODULE *) module, userdata); } /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_OptimizeChannels * Signature: (JII)Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1OptimizeChannels (JNIEnv *env, jclass clazz, jlong module, jint max, jint min){ return fmod_instance->FMUSIC_OptimizeChannels((FMUSIC_MODULE *) module, max, min); } /* * Class: org_lwjgl_fmod3_FMusic * Method: FMUSIC_SetReverb * Signature: (Z)Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_fmod3_FMusic_FMUSIC_1SetReverb (JNIEnv *env, jclass clazz, jboolean reverb){ return fmod_instance->FMUSIC_SetReverb(reverb); } /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_SetLooping * Signature: (JZ)Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1SetLooping (JNIEnv *env, jclass clazz, jlong module, jboolean looping){ return fmod_instance->FMUSIC_SetLooping((FMUSIC_MODULE *) module, looping); } /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_SetOrder * Signature: (JI)Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1SetOrder (JNIEnv *env, jclass clazz, jlong module, jint order){ return fmod_instance->FMUSIC_SetOrder((FMUSIC_MODULE *) module, order); } /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_SetPaused * Signature: (JZ)Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1SetPaused (JNIEnv *env, jclass clazz, jlong module, jboolean paused){ return fmod_instance->FMUSIC_SetPaused((FMUSIC_MODULE *) module, paused); } /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_SetMasterVolume * Signature: (JI)Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1SetMasterVolume (JNIEnv *env, jclass clazz, jlong module, jint volume){ return fmod_instance->FMUSIC_SetMasterVolume((FMUSIC_MODULE *) module, volume); } /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_SetMasterSpeed * Signature: (JF)Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1SetMasterSpeed (JNIEnv *env, jclass clazz, jlong module, jfloat speed){ return fmod_instance->FMUSIC_SetMasterSpeed((FMUSIC_MODULE *) module, speed); } /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_SetPanSeperation * Signature: (JF)Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1SetPanSeperation (JNIEnv *env, jclass clazz, jlong module, jfloat pan){ return fmod_instance->FMUSIC_SetPanSeperation((FMUSIC_MODULE *) module, pan); } /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_GetName * Signature: (J)Ljava/lang/String; */ JNIEXPORT jstring JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1GetName (JNIEnv *env, jclass clazz, jlong module) { const char * name = fmod_instance->FMUSIC_GetName((FMUSIC_MODULE *) module); return env->NewStringUTF(name); } /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_GetType * Signature: (J)I */ JNIEXPORT jint JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1GetType (JNIEnv *env, jclass clazz, jlong module){ return fmod_instance->FMUSIC_GetType((FMUSIC_MODULE *) module); } /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_GetNumOrders * Signature: (J)I */ JNIEXPORT jint JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1GetNumOrders (JNIEnv *env, jclass clazz, jlong module){ return fmod_instance->FMUSIC_GetNumOrders((FMUSIC_MODULE *) module); } /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_GetNumPatterns * Signature: (J)I */ JNIEXPORT jint JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1GetNumPatterns (JNIEnv *env, jclass clazz, jlong module){ return fmod_instance->FMUSIC_GetNumPatterns((FMUSIC_MODULE *) module); } /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_GetNumInstruments * Signature: (J)I */ JNIEXPORT jint JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1GetNumInstruments (JNIEnv *env, jclass clazz, jlong module){ return fmod_instance->FMUSIC_GetNumInstruments((FMUSIC_MODULE *) module); } /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_GetNumSamples * Signature: (J)I */ JNIEXPORT jint JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1GetNumSamples (JNIEnv *env, jclass clazz, jlong module){ return fmod_instance->FMUSIC_GetNumSamples((FMUSIC_MODULE *) module); } /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_GetNumChannels * Signature: (J)I */ JNIEXPORT jint JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1GetNumChannels (JNIEnv *env, jclass clazz, jlong module){ return fmod_instance->FMUSIC_GetNumChannels((FMUSIC_MODULE *) module); } /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_GetSample * Signature: (JI)J */ JNIEXPORT jlong JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1GetSample (JNIEnv *env, jclass clazz, jlong module, jint sampleno){ return (jlong) fmod_instance->FMUSIC_GetSample((FMUSIC_MODULE *) module, sampleno); } /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_GetPatternLength * Signature: (JI)I */ JNIEXPORT jint JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1GetPatternLength (JNIEnv *env, jclass clazz, jlong module, jint orderno){ return fmod_instance->FMUSIC_GetPatternLength((FMUSIC_MODULE *) module, orderno); } /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_IsFinished * Signature: (J)Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1IsFinished (JNIEnv *env, jclass clazz, jlong module){ return fmod_instance->FMUSIC_IsFinished((FMUSIC_MODULE *) module); } /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_IsPlaying * Signature: (J)Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1IsPlaying (JNIEnv *env, jclass clazz, jlong module){ return fmod_instance->FMUSIC_IsPlaying((FMUSIC_MODULE *) module); } /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_GetMasterVolume * Signature: (J)I */ JNIEXPORT jint JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1GetMasterVolume (JNIEnv *env, jclass clazz, jlong module){ return fmod_instance->FMUSIC_GetMasterVolume((FMUSIC_MODULE *) module); } /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_GetGlobalVolume * Signature: (J)I */ JNIEXPORT jint JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1GetGlobalVolume (JNIEnv *env, jclass clazz, jlong module){ return fmod_instance->FMUSIC_GetGlobalVolume((FMUSIC_MODULE *) module); } /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_GetOrder * Signature: (J)I */ JNIEXPORT jint JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1GetOrder (JNIEnv *env, jclass clazz, jlong module){ return fmod_instance->FMUSIC_GetOrder((FMUSIC_MODULE *) module); } /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_GetPattern * Signature: (J)I */ JNIEXPORT jint JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1GetPattern (JNIEnv *env, jclass clazz, jlong module){ return fmod_instance->FMUSIC_GetPattern((FMUSIC_MODULE *) module); } /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_GetSpeed * Signature: (J)I */ JNIEXPORT jint JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1GetSpeed (JNIEnv *env, jclass clazz, jlong module){ return fmod_instance->FMUSIC_GetSpeed((FMUSIC_MODULE *) module); } /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_GetBPM * Signature: (J)I */ JNIEXPORT jint JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1GetBPM (JNIEnv *env, jclass clazz, jlong module){ return fmod_instance->FMUSIC_GetBPM((FMUSIC_MODULE *) module); } /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_GetRow * Signature: (J)I */ JNIEXPORT jint JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1GetRow (JNIEnv *env, jclass clazz, jlong module){ return fmod_instance->FMUSIC_GetRow((FMUSIC_MODULE *) module); } /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_GetPaused * Signature: (J)Z */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1GetPaused (JNIEnv *env, jclass clazz, jlong module){ return fmod_instance->FMUSIC_GetPaused((FMUSIC_MODULE *) module); } /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_GetTime * Signature: (J)I */ JNIEXPORT jint JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1GetTime (JNIEnv *env, jclass clazz, jlong module){ return fmod_instance->FMUSIC_GetTime((FMUSIC_MODULE *) module); } /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_GetRealChannel * Signature: (JI)I */ JNIEXPORT jint JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1GetRealChannel (JNIEnv *env, jclass clazz, jlong module, jint modchannel){ return fmod_instance->FMUSIC_GetRealChannel((FMUSIC_MODULE *) module, modchannel); } /* * Class: org_lwjgl_fmod3_FMusic * Method: nFMUSIC_GetUserData * Signature: (J)Ljava/nio/ByteBuffer; */ JNIEXPORT jobject JNICALL Java_org_lwjgl_fmod3_FMusic_nFMUSIC_1GetUserData(JNIEnv *env, jclass clazz, jlong module, jint capacity) { void* data = (void*) fmod_instance->FMUSIC_GetUserData((FMUSIC_MODULE *) module); return env->NewDirectByteBuffer(data, capacity); } /** * This attaches the mixer thread as a daemon thread, and sets its * priority to max value */ void attachMixerThread() { jvm->AttachCurrentThreadAsDaemon((void**) &mixer_jnienv, NULL); // set to high priority // ============================== // get current thread jclass threadClass = mixer_jnienv->FindClass("java/lang/Thread"); jmethodID currentThread = mixer_jnienv->GetStaticMethodID(threadClass, "currentThread", "()Ljava/lang/Thread;"); jobject myThread = mixer_jnienv->CallStaticObjectMethod(threadClass, currentThread); // get value of high priority jfieldID highPriority = mixer_jnienv->GetStaticFieldID(threadClass, "MAX_PRIORITY", "I"); jint highPriorityValue = mixer_jnienv->GetStaticIntField(threadClass, highPriority); // call set priority jmethodID priority = mixer_jnienv->GetMethodID(threadClass, "setPriority", "(I)V"); mixer_jnienv->CallVoidMethod(myThread, priority, highPriorityValue); // ------------------------------ } // FMusic callbacks // ======================================= void F_CALLBACKAPI fmusic_instcallback(FMUSIC_MODULE *mod, unsigned char param) { if (mixer_jnienv == NULL) { attachMixerThread(); } mixer_jnienv->CallStaticVoidMethod(fmusic, music_instcallback, (jlong) mod, (jint) param); } void F_CALLBACKAPI fmusic_ordercallback(FMUSIC_MODULE *mod, unsigned char param) { if (mixer_jnienv == NULL) { attachMixerThread(); } mixer_jnienv->CallStaticVoidMethod(fmusic, music_ordercallback, (jlong) mod, (jint) param); } void F_CALLBACKAPI fmusic_rowcallback(FMUSIC_MODULE *mod, unsigned char param) { if (mixer_jnienv == NULL) { attachMixerThread(); } mixer_jnienv->CallStaticVoidMethod(fmusic, music_rowcallback, (jlong) mod, (jint) param); } void F_CALLBACKAPI fmusic_zxxcallback(FMUSIC_MODULE *mod, unsigned char param) { if (mixer_jnienv == NULL) { attachMixerThread(); } mixer_jnienv->CallStaticVoidMethod(fmusic, music_zxxcallback, (jlong) mod, (jint) param); } // ------------------------------------------ --- NEW FILE: Makefile.am --- lib_LTLIBRARIES = liblwjgl-fmod3.la liblwjgl_fmod_la_SOURCES = $(FMOD_SOURCE) liblwjgl_fmod_la_LIBADD = $(DEP_LIBS) liblwjgl_fmod_la_DEPENDENCIES = $(DEP_LIBS) INCLUDES = -I.. DEP_LIBS = ../libtools.la FMOD_SOURCE = extfmod3.cpp \ org_lwjgl_fmod3_FMOD.cpp \ org_lwjgl_fmod3_FMusic.cpp \ org_lwjgl_fmod3_FSound.cpp --- NEW FILE: extfmod3.h --- /* * 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. */ #ifndef _EXT_FMOD_H #define _EXT_FMOD_H #include <jni.h> #include "../common_tools.h" #include "fmoddyn.h" #include "fmod_errors.h" void fmod_create(JNIEnv *env, char*); void fmod_destroy(); extern FMOD_INSTANCE * fmod_instance; // Setup for callback. The callbacks don't have access to a JNIEnv pointer, so we have to provide // one. Unfortunately we cannot cache one, since JNIEnv er thread local copies. We can however // aquire one, using AttachCurrent<ThreadAsDaemon>. However we need a VM instance for that. // so we supply 1 VM instance for use by threads (in common_tools) (VM instances are shared across threads), and // 1 JNIEnv pointer per thread. At this time, 2 threads have been identified - the Stream thread // and the mixer thread. extern JNIEnv *mixer_jnienv; extern JNIEnv *stream_jnienv; // FMusic cached fields extern jmethodID music_instcallback; extern jmethodID music_ordercallback; extern jmethodID music_rowcallback; extern jmethodID music_zxxcallback; extern jclass fmusic; #endif |
|
From: Brian M. <ma...@us...> - 2004-06-09 19:53:06
|
Update of /cvsroot/java-game-lib/LWJGL/src/native In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7624 Modified Files: configure.in Log Message: fmod -> fmod3 Index: configure.in =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/configure.in,v retrieving revision 1.51 retrieving revision 1.52 diff -u -d -r1.51 -r1.52 --- configure.in 23 May 2004 14:46:06 -0000 1.51 +++ configure.in 9 Jun 2004 19:52:57 -0000 1.52 @@ -76,7 +76,7 @@ common/ati/Makefile common/ext/Makefile common/nv/Makefile - common/fmod/Makefile + common/fmod3/Makefile linux/Makefile macosx/Makefile]) AC_OUTPUT |
Update of /cvsroot/java-game-lib/LWJGL/src/native/common/fmod In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7624/common/fmod Removed Files: Makefile.am extfmod.cpp extfmod.h org_lwjgl_fmod_FMOD.cpp org_lwjgl_fmod_FMusic.cpp org_lwjgl_fmod_FSound.cpp Log Message: fmod -> fmod3 --- extfmod.cpp DELETED --- --- Makefile.am DELETED --- --- org_lwjgl_fmod_FMusic.cpp DELETED --- --- extfmod.h DELETED --- --- org_lwjgl_fmod_FSound.cpp DELETED --- --- org_lwjgl_fmod_FMOD.cpp DELETED --- |
|
From: Brian M. <ma...@us...> - 2004-06-09 19:50:58
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common/fmod3 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5735/fmod3 Log Message: Directory /cvsroot/java-game-lib/LWJGL/src/native/common/fmod3 added to the repository |
|
From: Brian M. <ma...@us...> - 2004-06-09 19:50:18
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/fmod3 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4708/test/fmod3 Added Files: CDDAPlayer.java CDPlayer.java MusicPlayer.java StreamPlayer.java SyncTest.java Log Message: fmod -> fmod3 --- NEW FILE: MusicPlayer.java --- /* * Copyright (c) 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.FMusic; import org.lwjgl.fmod3.FMusicModule; import org.lwjgl.fmod3.FSound; /** * $Id: MusicPlayer.java,v 1.1 2004/06/09 19:50:09 matzon Exp $ * <br> * @author Brian Matzon <br...@ma...> * @version $Revision: 1.1 $ */ public class MusicPlayer { public static void main(String[] args) { if(args.length < 1) { System.out.println("Usage:\n MusicPlayer <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"); return; } System.out.println("Loading " + args[0]); // choose either way of loading... // using name (path) FMusicModule module = FMusic.FMUSIC_LoadSong(args[0]); // using name (path), extended mode //FMusicModule module = FMusic.FMUSIC_LoadSongEx(args[0], 0, 0, 0, null); // using memory buffers //ByteBuffer data = getData(args[0]); //FMusicModule module = FMusic.FMUSIC_LoadSongEx(data, 0, data.remaining(), FSound.FSOUND_LOADMEMORY, null); if(module != null) { System.out.println("Loaded. Playing module of type: " + FMusic.FMUSIC_GetType(module)); FMusic.FMUSIC_PlaySong(module); System.out.println("Press enter to stop playing"); try { System.in.read(); } catch (IOException ioe) { } FMusic.FMUSIC_StopSong(module); System.out.println("Done playing. Cleaning up"); FMusic.FMUSIC_FreeSong(module); } 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(StreamPlayer.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; } } --- NEW FILE: StreamPlayer.java --- /* * Copyright (c) 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.FSoundStream; /** * $Id: StreamPlayer.java,v 1.1 2004/06/09 19:50:09 matzon Exp $ <br> * * @author Brian Matzon <br...@ma...> * @version $Revision: 1.1 $ */ public class StreamPlayer { public static void main(String[] args) { if (args.length < 1) { System.out.println("Usage:\n StreamPlayer <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) { 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); } 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(StreamPlayer.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; } } --- NEW FILE: CDDAPlayer.java --- /* * Copyright (c) 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.BufferedReader; import java.io.InputStreamReader; import java.util.StringTokenizer; import org.lwjgl.fmod3.FMOD; import org.lwjgl.fmod3.FMODException; import org.lwjgl.fmod3.FSound; import org.lwjgl.fmod3.FSoundStream; /** * $Id: CDDAPlayer.java,v 1.1 2004/06/09 19:50:09 matzon Exp $ * <br> * @author Brian Matzon <br...@ma...> * @version $Revision: 1.1 $ */ public class CDDAPlayer { public static void main(String[] args) { 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"); return; } boolean running = true; String token = null; BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); FSoundStream stream = null; do { System.out.println(FMOD.FMOD_ErrorString(FSound.FSOUND_GetError())); System.out.println("FMOD CD Player test. Press a key corresponding to action"); System.out.println("1: FSOUND_Stream_Open \"<drive>:\""); System.out.println("2: FSOUND_Stream_Open \"<drive>:?\""); System.out.println("3: FSOUND_Stream_Open \"<drive>:!\""); System.out.println("4: FSOUND_Stream_SetSubStream <position>"); System.out.println("5: FSOUND_Stream_GetNumSubStreams"); System.out.println("6: Enumerate tag fields"); System.out.println("0: Exit"); try { StringTokenizer st = new StringTokenizer(br.readLine().trim()); token = st.nextToken(); switch (Integer.parseInt(token)) { case 0: running = false; break; case 1: stream = FSound.FSOUND_Stream_Open(st.nextToken() + ":", FSound.FSOUND_NORMAL, 0, 0); break; case 2: stream = FSound.FSOUND_Stream_Open(st.nextToken() + ":*?", 0, 0, 0); break; case 3: stream = FSound.FSOUND_Stream_Open(st.nextToken() + ":*!", 0, 0, 0); break; case 4: FSound.FSOUND_Stream_SetSubStream(stream, Integer.parseInt(st.nextToken())); break; case 5: System.out.println(FSound.FSOUND_Stream_GetNumSubStreams(stream)); break; case 6: // break; default: System.out.println("No entry"); } System.out.println("Stream: " + stream); } catch (Exception e) { } } while (running); if(stream != null) { FSound.FSOUND_Stream_Close(stream); } FSound.FSOUND_Close(); FMOD.destroy(); } } --- NEW FILE: SyncTest.java --- /* * Copyright (c) 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.File; import java.io.IOException; import java.nio.ByteBuffer; import org.lwjgl.BufferUtils; import org.lwjgl.Sys; import org.lwjgl.fmod3.FMOD; import org.lwjgl.fmod3.FMODException; import org.lwjgl.fmod3.FMusic; import org.lwjgl.fmod3.FMusicModule; import org.lwjgl.fmod3.FSound; import org.lwjgl.fmod3.callbacks.FMusicCallback; /** * $Id: SyncTest.java,v 1.1 2004/06/09 19:50:09 matzon Exp $ <br> * * @author Brian Matzon <br...@ma...> * @version $Revision: 1.1 $ */ public class SyncTest { /** Path to file to play */ private String filePath; /** Module instance loaded */ private FMusicModule module; /** Whether test is running */ private boolean running = true; /** Current row */ private int row; /** Current order */ private int order; /** Number of orders in the song */ private int numOrders; /** * Creates a new SyncTest * @param string */ public SyncTest(String filePath) { this.filePath = filePath; // create thread to exit when a key has been pressed Thread t = new Thread() { public void run() { try { System.in.read(); } catch (IOException ioe) { } running = false; } }; t.setDaemon(true); t.start(); } /** * * @param args */ public static void main(String[] args) { // check for file existance File file = new File(args[0]); if (!file.exists()) { System.out.println("No such file: " + args[0]); return; } // initialize FMOD try { System.out.println("Initializing FMOD"); FMOD.create(); } catch (FMODException fmode) { fmode.printStackTrace(); return; } // start actual test SyncTest sync = new SyncTest(args[0]); sync.executeTest(); } /** * Executes the test */ public void executeTest() { // do setup setup(); // if we have a module - get going if (module != null) { // high priority... - might otherwise skip Sys.setProcessPriority(Sys.HIGH_PRIORITY); // go go go! run(); } // we're done - clean up destroy(); } /** * Setup FMOD */ private void setup() { 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; } // load module System.out.println("Loading " + filePath); module = FMusic.FMUSIC_LoadSong(filePath); if (module == null) { System.out.println("Unable to load " + filePath + ": " + FMOD.FMOD_ErrorString(FSound.FSOUND_GetError())); return; } // get number of orders numOrders = FMusic.FMUSIC_GetNumOrders(module); // install order callback FMusic.FMUSIC_SetOrderCallback(module, new FMusicCallback() { public void FMUSIC_CALLBACK(FMusicModule module, int param) { order = param; } }, 1); // install row callback // will be called once PER CHANNEL! - but since we only set the row // no harm is done :) FMusic.FMUSIC_SetRowCallback(module, new FMusicCallback() { public void FMUSIC_CALLBACK(FMusicModule module, int param) { row = param; } }, 1); // try to add some userdata ByteBuffer buffer = BufferUtils.createByteBuffer(24); buffer.putInt(1).putInt(2).putInt(3).putInt(4).putInt(5).putInt(6).rewind(); FMusic.FMUSIC_SetUserData(module, buffer); } /** * Update status of module - spew it out in console */ private void update() { // mark as not running when finished if(FMusic.FMUSIC_IsFinished(module)) { running = false; } int patternLength = FMusic.FMUSIC_GetPatternLength(module, order); int time = FMusic.FMUSIC_GetTime(module) / 1000; int time2 = FMusic.FMUSIC_GetTime(module) % 1000 / 10; double cpu = Math.round(FSound.FSOUND_GetCPUUsage() * 100.0) / 100.0; System.out.println("O: " + ((order < 10) ? "0" : "") + order + "/" + numOrders + " | R: " + ((row < 10) ? "0" : "") + row + "/" + patternLength + " | T: " + time + "." + ((time2 < 10) ? "0" : "") + time2 + " | BPM: " + FMusic.FMUSIC_GetBPM(module) + " | Play: " + FMusic.FMUSIC_IsFinished(module) + " | C: " + FSound.FSOUND_GetChannelsPlaying() + " | CPU: " + cpu); } /** * Runs the actual test - that is, play | update ad nausea */ private void run() { // play FMusic.FMUSIC_PlaySong(module); // loop, printing update, if we actually changed row int lastRow = row; while(running) { if(lastRow != row) { lastRow = row; update(); } else { pause(5); } } } /** * @param i */ private void pause(long i) { try { Thread.sleep(i); } catch (InterruptedException inte) { } } // clean up our own mess private void destroy() { if(module != null) { // retrieve userdata ByteBuffer buffer = FMusic.FMUSIC_GetUserData(module, 24); // should contain 1,2,3,4,5,6 for(int i=0; i<6; i++) { System.out.println(buffer.getInt()); } FMusic.FMUSIC_FreeSong(module); } FSound.FSOUND_Close(); FMOD.destroy(); } } --- NEW FILE: CDPlayer.java --- /* * Copyright (c) 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.BufferedReader; import java.io.InputStreamReader; import java.util.StringTokenizer; import org.lwjgl.fmod3.FMOD; import org.lwjgl.fmod3.FMODException; import org.lwjgl.fmod3.FSound; /** * $Id: CDPlayer.java,v 1.1 2004/06/09 19:50:09 matzon Exp $ * <br> * @author Brian Matzon <br...@ma...> * @version $Revision: 1.1 $ */ public class CDPlayer { public static void main(String[] args) { 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"); return; } boolean running = true; String token = null; BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); do { System.out.println("FMOD CD Player test. Press a key corresponding to action"); System.out.println("1: FSOUND_CD_Eject <drive>"); System.out.println("2: FSOUND_CD_Play <drive> <track>"); System.out.println("3: FSOUND_CD_Stop <drive>"); System.out.println("4: FSOUND_CD_GetNumTracks <drive>"); System.out.println("5: FSOUND_CD_GetPaused <drive>"); System.out.println("6: FSOUND_CD_GetTrack <drive>"); System.out.println("7: FSOUND_CD_GetTrackLength <drive> <track>"); System.out.println("8: FSOUND_CD_GetTrackTime <drive>"); System.out.println("9: FSOUND_CD_SetPaused <drive>"); System.out.println("10: FSOUND_CD_SetPlayMode <drive> <mode>"); System.out.println("11: FSOUND_CD_SetTrackTime <drive> <milliseconds>"); System.out.println("12: FSOUND_CD_SetVolume <drive> <volume>"); System.out.println("0: Exit"); try { StringTokenizer st = new StringTokenizer(br.readLine().trim()); token = st.nextToken(); switch (Integer.parseInt(token)) { case 0: running = false; break; case 1: FSound.FSOUND_CD_OpenTray(st.nextToken().charAt(0), true); break; case 2: FSound.FSOUND_CD_Play(st.nextToken().charAt(0), Integer.parseInt(st.nextToken())); break; case 3: FSound.FSOUND_CD_Stop(st.nextToken().charAt(0)); break; case 4: System.out.println(FSound.FSOUND_CD_GetNumTracks(st.nextToken().charAt(0))); break; case 5: System.out.println(FSound.FSOUND_CD_GetPaused(st.nextToken().charAt(0))); break; case 6: System.out.println(FSound.FSOUND_CD_GetTrack(st.nextToken().charAt(0))); break; case 7: System.out.println(FSound.FSOUND_CD_GetTrackLength(st.nextToken().charAt(0), Integer.parseInt(st.nextToken()))); break; case 8: System.out.println(FSound.FSOUND_CD_GetTrackTime(st.nextToken().charAt(0))); break; case 9: FSound.FSOUND_CD_SetPaused(st.nextToken().charAt(0), Boolean.valueOf(st.nextToken()).booleanValue()); break; case 10: FSound.FSOUND_CD_SetPlayMode(st.nextToken().charAt(0), Integer.parseInt(st.nextToken())); break; case 11: FSound.FSOUND_CD_SetTrackTime(st.nextToken().charAt(0), Integer.parseInt(st.nextToken())); break; case 12: FSound.FSOUND_CD_SetVolume(st.nextToken().charAt(0), Integer.parseInt(st.nextToken())); break; default: System.out.println("No entry"); } } catch (Exception e) { } } while (running); FSound.FSOUND_Close(); FMOD.destroy(); } } |
|
From: Brian M. <ma...@us...> - 2004-06-09 19:50:17
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/fmod In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4708/test/fmod Removed Files: CDDAPlayer.java CDPlayer.java MusicPlayer.java StreamPlayer.java SyncTest.java Log Message: fmod -> fmod3 --- MusicPlayer.java DELETED --- --- StreamPlayer.java DELETED --- --- CDDAPlayer.java DELETED --- --- SyncTest.java DELETED --- --- CDPlayer.java DELETED --- |
|
From: Brian M. <ma...@us...> - 2004-06-09 19:50:17
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/fmod3/callbacks In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4708/fmod3/callbacks Added Files: FMusicCallback.java FSoundCloseCallback.java FSoundDSPCallback.java FSoundMetaDataCallback.java FSoundOpenCallback.java FSoundReadCallback.java FSoundSeekCallback.java FSoundStreamCallback.java FSoundTellCallback.java Log Message: fmod -> fmod3 --- NEW FILE: FSoundTellCallback.java --- /* * Copyright (c) 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.fmod3.callbacks; /** * This interface describes a callback interface to Fmod music * $Id: FSoundTellCallback.java,v 1.1 2004/06/09 19:50:08 matzon Exp $ * <br> * @author Brian Matzon <br...@ma...> * @version $Revision: 1.1 $ */ public interface FSoundTellCallback { public int FSOUND_TELLCALLBACK(int handle); } --- NEW FILE: FSoundDSPCallback.java --- /* * Copyright (c) 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.fmod3.callbacks; import java.nio.ByteBuffer; /** * This interface describes a callback interface to Fmod music * $Id: FSoundDSPCallback.java,v 1.1 2004/06/09 19:50:08 matzon Exp $ * <br> * @author Brian Matzon <br...@ma...> * @version $Revision: 1.1 $ */ public interface FSoundDSPCallback { public void FSOUND_DSPCALLBACK(ByteBuffer originalbuffer, ByteBuffer newbuffer, int length); } --- NEW FILE: FSoundCloseCallback.java --- /* * Copyright (c) 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.fmod3.callbacks; /** * This interface describes a callback interface to Fmod music * $Id: FSoundCloseCallback.java,v 1.1 2004/06/09 19:50:08 matzon Exp $ * <br> * @author Brian Matzon <br...@ma...> * @version $Revision: 1.1 $ */ public interface FSoundCloseCallback { public void FSOUND_CLOSECALLBACK(int handle); } --- NEW FILE: FMusicCallback.java --- /* * Copyright (c) 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.fmod3.callbacks; import org.lwjgl.fmod3.FMusicModule; /** * This interface describes a callback interface to Fmod music * $Id: FMusicCallback.java,v 1.1 2004/06/09 19:50:08 matzon Exp $ * <br> * @author Brian Matzon <br...@ma...> * @version $Revision: 1.1 $ */ public interface FMusicCallback { public void FMUSIC_CALLBACK(FMusicModule module, int param); } --- NEW FILE: FSoundSeekCallback.java --- /* * Copyright (c) 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.fmod3.callbacks; /** * This interface describes a callback interface to Fmod music * $Id: FSoundSeekCallback.java,v 1.1 2004/06/09 19:50:08 matzon Exp $ * <br> * @author Brian Matzon <br...@ma...> * @version $Revision: 1.1 $ */ public interface FSoundSeekCallback { public int FSOUND_SEEKCALLBACK(int handle, int pos, int mode); } --- NEW FILE: FSoundMetaDataCallback.java --- /* * Copyright (c) 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.fmod3.callbacks; import java.nio.ByteBuffer; import org.lwjgl.fmod3.FSoundStream; /** * This interface describes a callback interface to Fmod music * $Id: FSoundMetaDataCallback.java,v 1.1 2004/06/09 19:50:08 matzon Exp $ * <br> * @author Brian Matzon <br...@ma...> * @version $Revision: 1.1 $ */ public interface FSoundMetaDataCallback { public void FSOUND_STREAMCALLBACK(FSoundStream stream, ByteBuffer buff, int len); } --- NEW FILE: FSoundReadCallback.java --- /* * Copyright (c) 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.fmod3.callbacks; import java.nio.ByteBuffer; /** * This interface describes a callback interface to Fmod music * $Id: FSoundReadCallback.java,v 1.1 2004/06/09 19:50:08 matzon Exp $ * <br> * @author Brian Matzon <br...@ma...> * @version $Revision: 1.1 $ */ public interface FSoundReadCallback { public int FSOUND_READCALLBACK(ByteBuffer buffer, int size, int handle); } --- NEW FILE: FSoundStreamCallback.java --- /* * Copyright (c) 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.fmod3.callbacks; import java.nio.ByteBuffer; import org.lwjgl.fmod3.FSoundStream; /** * This interface describes a callback interface to Fmod music * $Id: FSoundStreamCallback.java,v 1.1 2004/06/09 19:50:08 matzon Exp $ * <br> * @author Brian Matzon <br...@ma...> * @version $Revision: 1.1 $ */ public interface FSoundStreamCallback { public void FSOUND_STREAMCALLBACK(FSoundStream stream, ByteBuffer buff, int len); } --- NEW FILE: FSoundOpenCallback.java --- /* * Copyright (c) 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.fmod3.callbacks; /** * This interface describes a callback interface to Fmod music * $Id: FSoundOpenCallback.java,v 1.1 2004/06/09 19:50:08 matzon Exp $ * <br> * @author Brian Matzon <br...@ma...> * @version $Revision: 1.1 $ */ public interface FSoundOpenCallback { public int FSOUND_OPENCALLBACK(String name); } |
|
From: Brian M. <ma...@us...> - 2004-06-09 19:50:17
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/fmod3 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4708/fmod3 Added Files: FMOD.java FMODException.java FMusic.java FMusicModule.java FSound.java FSoundDSPUnit.java FSoundReverbChannelProperties.java FSoundReverbProperties.java FSoundSample.java FSoundSampleLock.java FSoundStream.java FSoundSyncPoint.java FSoundTagField.java FSoundTocTag.java Log Message: fmod -> fmod3 --- NEW FILE: FMOD.java --- /* * Copyright (c) 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.fmod3; import java.io.File; import java.nio.FloatBuffer; import java.util.ArrayList; import java.util.HashMap; import java.util.StringTokenizer; import org.lwjgl.Sys; /** * $Id: FMOD.java,v 1.1 2004/06/09 19:50:07 matzon Exp $ * <br> * @author Brian Matzon <br...@ma...> * @version $Revision: 1.1 $ */ public class FMOD { /** Array of hashmaps for callbacks */ private static HashMap[] callbacks = new HashMap[17]; /** FMOD System level clear dsp unit */ static FSoundDSPUnit fmodClearUnit; /** FMOD System level clip and copy dsp unit */ static FSoundDSPUnit fmodClipAndCopyUnit; /** FMOD System level music dsp unit */ static FSoundDSPUnit fmodMusicUnit; /** FMOD System level sound effects dsp unit */ static FSoundDSPUnit fmodSFXUnit; /** FMOD System level FFT dsp unit */ static FSoundDSPUnit fmodFFTUnit; /** FMOD System level FFT buffer */ static FloatBuffer fmodFFTBuffer; /** Type defining the music callback entries in callback hashmap array */ public static final int FMUSIC_INSTCALLBACK = 0; /** Type defining the music callback entries in callback hashmap array */ public static final int FMUSIC_ORDERCALLBACK = 1; /** Type defining the music callback entries in callback hashmap array */ public static final int FMUSIC_ROWCALLBACK = 2; /** Type defining the music callback entries in callback hashmap array */ public static final int FMUSIC_ZXXCALLBACK = 3; /** Type defining the dsp callback entries in callback hashmap array */ public static final int FSOUND_DSPCALLBACK = 4; /** Type defining the stream callback entries in callback hashmap array */ public static final int FSOUND_STREAMCALLBACK = 5; /** Type defining the alloc callback entries in callback hashmap array */ public static final int FSOUND_ALLOCCALLBACK = 6; /** Type defining the realloc callback entries in callback hashmap array */ public static final int FSOUND_REALLOCCALLBACK = 7; /** Type defining the free callback entries in callback hashmap array */ public static final int FSOUND_FREECALLBACK = 8; /** Type defining the open callback entries in callback hashmap array */ public static final int FSOUND_OPENCALLBACK = 9; /** Type defining the close callback entries in callback hashmap array */ public static final int FSOUND_CLOSECALLBACK = 10; /** Type defining the metadata callback entries in callback hashmap array */ public static final int FSOUND_METADATACALLBACK = 11; /** Type defining the read callback entries in callback hashmap array */ public static final int FSOUND_READCALLBACK = 12; /** Type defining the seek callback entries in callback hashmap array */ public static final int FSOUND_SEEKCALLBACK = 13; /** Type defining the tell callback entries in callback hashmap array */ public static final int FSOUND_TELLCALLBACK = 14; /** Type defining the "end" callback entries in callback hashmap array */ public static final int FSOUND_ENDCALLBACK = 15; /** Type defining the "sync" callback entries in callback hashmap array */ public static final int FSOUND_SYNCCALLBACK = 16; /** Have we been created? */ protected static boolean created; /** No errors */ public static final int FMOD_ERR_NONE = 0; /** Cannot call this command after FSOUND_Init. Call FSOUND_Close first. */ public static final int FMOD_ERR_BUSY = 1; /** This command failed because FSOUND_Init was not called */ public static final int FMOD_ERR_UNINITIALIZED = 2; /** Error initializing output device. */ public static final int FMOD_ERR_INIT = 3; /** Error initializing output device, but more specifically, the output device is already in use and cannot be reused. */ public static final int FMOD_ERR_ALLOCATED = 4; /** Playing the sound failed. */ public static final int FMOD_ERR_PLAY = 5; /** Soundcard does not support the features needed for this soundsystem (16bit stereo output) */ public static final int FMOD_ERR_OUTPUT_FORMAT = 6; /** Error setting cooperative level for hardware. */ public static final int FMOD_ERR_COOPERATIVELEVEL = 7; /** Error creating hardware sound buffer. */ public static final int FMOD_ERR_CREATEBUFFER = 8; /** File not found */ public static final int FMOD_ERR_FILE_NOTFOUND = 9; /** Unknown file format */ public static final int FMOD_ERR_FILE_FORMAT = 10; /** Error loading file */ public static final int FMOD_ERR_FILE_BAD = 11; /** Not enough memory */ public static final int FMOD_ERR_MEMORY = 12; /** The version number of this file format is not supported */ public static final int FMOD_ERR_VERSION = 13; /** An invalid parameter was passed to this function */ public static final int FMOD_ERR_INVALID_PARAM = 14; /** Tried to use an EAX command on a non EAX enabled channel or output. */ public static final int FMOD_ERR_NO_EAX = 15; /** Failed to allocate a new channel */ public static final int FMOD_ERR_CHANNEL_ALLOC = 17; /** Recording is not supported on this machine */ public static final int FMOD_ERR_RECORD = 18; /** Required Mediaplayer codec is not installed */ public static final int FMOD_ERR_MEDIAPLAYER = 19; /** An error occured trying to open the specified CD device */ public static final int FMOD_ERR_CDDEVICE = 20; /** Whether we have been initialized */ private static boolean initialized; /** The native JNI library name */ private static String JNI_LIBRARY_NAME = "lwjgl-fmod3"; /** The native library name on win32 */ private static String FMOD_WIN32_LIBRARY_NAME = "fmod.dll"; /** The native library name on win32 */ private static String FMOD_LINUX_LIBRARY_NAME = "libfmod.so.0"; /** The native library name on win32 */ private static String FMOD_OSX_LIBRARY_NAME = "fmod_cfm.shlb"; /** Version of FMOD */ public static final String VERSION = "0.9a"; static { initialize(); } /** * Initializes the FMOD binding */ public static void initialize() { if (initialized) { return; } initialized = true; System.loadLibrary(JNI_LIBRARY_NAME); // check for mismatch String nativeVersion = getNativeLibraryVersion(); if (!nativeVersion.equals(VERSION)) { throw new LinkageError( "Version mismatch: jar version is '" + VERSION + "', native libary version is '" + nativeVersion + "'"); } // Initialize callback hashmaps for(int i=0; i<callbacks.length; i++) { callbacks[i] = new HashMap(); } } /** * Return the version of the native library */ private static native String getNativeLibraryVersion(); /** * @return true if AL has been created */ public static boolean isCreated() { return created; } /** * Creates an FMOD instance. */ public static void create() throws FMODException { if (created) { return; } // create, passing potential locations for native fmod library nCreate(constructFMODSearchPaths()); created = true; } /** * Retrieves an array of strings, with potential locations for * the native fmod library * @return array of strings, with potential locations for the native fmod library */ private static String[] constructFMODSearchPaths() { // miscellaneous values String libpath = System.getProperty("java.library.path"); String seperator = System.getProperty("path.separator"); String osName = System.getProperty("os.name"); // determine os library name String dllName = FMOD_WIN32_LIBRARY_NAME; if (osName.startsWith("Mac OS")) { dllName = FMOD_OSX_LIBRARY_NAME; } else if (osName.startsWith("Linux")) { dllName = FMOD_LINUX_LIBRARY_NAME; } // split, and rebuild library path to path + dll StringTokenizer st = new StringTokenizer(libpath, seperator); String[] paths = new String[st.countTokens() + 1]; //build paths for (int i = 0; i < paths.length - 1; i++) { paths[i] = st.nextToken() + File.separator + dllName; } //add cwd path paths[paths.length - 1] = dllName; return paths; } /** * Native method to create FMOD instance */ protected static native void nCreate(String[] paths); /** * Exit cleanly by calling destroy. */ public static void destroy() { if(!created) { return; } created = false; nDestroy(); } /** * Native method the destroy the FMOD */ protected static native void nDestroy(); /** * Registers a callback by its handle * * @param handle Handle to native object being monitored * @param callbackHandler Object to register as the call back handler */ static void registerCallback(int type, long handle, Object handled, Object callbackHandler) { Long callbackID = new Long(handle); ArrayList callbackList = (ArrayList) callbacks[type].get(callbackID); if (callbackList == null ) { if (callbackHandler == null) { Sys.log("No callbackhandlers registered for handle: " + handle); } else { callbackList = new ArrayList(); callbacks[type].put(callbackID, callbackList); } } // are we going to add or remove from the list? if(callbackHandler == null) { callbacks[type].remove(callbackID); } else { callbackList.add(new FMOD.WrappedCallback(handled, callbackHandler)); } } /** * Retrieves a call back handler by its native handle * @param handle Handle to native object being monitored * @return Call back handler, or null if no such handler */ static ArrayList getCallbacks(int type, long handle) { return (ArrayList) callbacks[type].get(new Long(handle)); } /** * Retrieves the errorcode desription for specified code * * @param errorcode errorcode to lookup * @return Description of errorcode */ public static native String FMOD_ErrorString(int errorcode); /** * Wrapper class for a callback handler, and the object associated */ static class WrappedCallback { Object handled; Object callback; WrappedCallback(Object handled, Object callback) { this.handled = handled; this.callback = callback; } } } --- NEW FILE: FSoundSyncPoint.java --- /* * Copyright (c) 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.fmod3; /** * This class is a representation of a SyncPoint in FMod. * $Id: FSoundSyncPoint.java,v 1.1 2004/06/09 19:50:07 matzon Exp $ * <br> * @author Brian Matzon <br...@ma...> * @version $Revision: 1.1 $ */ public class FSoundSyncPoint { /** Handle to syncpoint */ long syncpointHandle; /** * Creates a new FSoundSyncPoint * * @param syncpointHandle handle to syncpoint */ FSoundSyncPoint(long syncpointHandle) { this.syncpointHandle = syncpointHandle; } } --- NEW FILE: FMusic.java --- /* * Copyright (c) 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.fmod3; import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.nio.IntBuffer; import java.util.ArrayList; import org.lwjgl.fmod3.callbacks.FMusicCallback; /** * $Id: FMusic.java,v 1.1 2004/06/09 19:50:07 matzon Exp $ * <br> * @author Brian Matzon <br...@ma...> * @version $Revision: 1.1 $ */ public class FMusic { /** No song being played */ public static final int FMUSIC_TYPE_NONE = 0; /** Protracker / Fasttracker */ public static final int FMUSIC_TYPE_MOD = 1; /** ScreamTracker 3 */ public static final int FMUSIC_TYPE_S3M = 2; /** FastTracker 2 */ public static final int FMUSIC_TYPE_XM = 3; /** Impulse Tracker */ public static final int FMUSIC_TYPE_IT = 4; /** MIDI file */ public static final int FMUSIC_TYPE_MIDI = 5; /** FMOD Sample Bank file */ public static final int FMUSIC_TYPE_FSB = 6; /** * To load a module or bank with a given filename. FMUSIC Supports loading of * - .MOD (protracker/fasttracker modules) * - .S3M (screamtracker 3 modules) * - .XM (fasttracker 2 modules) * - .IT (impulse tracker modules) * - .MID (MIDI files) * - .RMI (MIDI files) * - .SGT (DirectMusic segment files) * - .FSB (FMOD Sample Bank files) * * @param name Filename of module to load * @return On success, a FMusicModule instance is returned. On failure, Null is returned */ public static FMusicModule FMUSIC_LoadSong(String name) { long result = nFMUSIC_LoadSong(name); if(result != FMUSIC_TYPE_NONE) { return new FMusicModule(result); } return null; } private static native long nFMUSIC_LoadSong(String name); /** * To load a module or bank with a given filename. FMUSIC Supports loading of * - .MOD (protracker/fasttracker modules) * - .S3M (screamtracker 3 modules) * - .XM (fasttracker 2 modules) * - .IT (impulse tracker modules) * - .MID (MIDI files) * - .RMI (MIDI files) * - .SGT (DirectMusic segment files) * - .FSB (FMOD Sample Bank files) * <p> * <i> * Loading a song from a memory handle is dangerous in one respect, if the data is corrupted or truncated, then FMUSIC could crash internally trying to load it. * On PlayStation 2 the data and length pointer must be 16 byte aligned for DMA purposes. * The samplelist and samplelistnum parameters are useful for limiting the amount of data fmod loads. This feature is for the FSB format only. It is especially useful if you have a bank of sounds and want to randomize the loading a bit by telling which sounds to load with random values, and consequently which not to load. * On PlayStation 2, samplelistnum has a limit of 1536 entries. * </i> * </p> * * @param data containing song to load. On PlayStation 2 data must be 16 byte aligned if loading from memory * @param offset Optional. 0 by default. If > 0, this value is used to specify an offset in a file, so fmod will seek before opening * @param length Optional. 0 by default. If > 0, this value is used to specify the length of a memory block when using FSOUND_LOADMEMORY, or it is the length of a file or file segment if the offset parameter is used. On PlayStation 2 this must be 16 byte aligned for memory loading * @param mode Mode for opening song. With module files, only FSOUND_LOADMEMORY, FSOUND_NONBLOCKING, FSOUND_LOOP_NORMAL, or FSOUND_LOOP_OFF are supported. For FSB files, FSOUND_2D, FSOUND_HW3D, FSOUND_FORCEMONO also work * @param sampleList Optional. Buffer of sample indicies to load. Leave as Null if you want all samples to be loaded (default behaviour). See Remarks for more on this * @return On success, a FMusicModule instance is returned. On failure, Null is returned */ public static FMusicModule FMUSIC_LoadSongEx(ByteBuffer data, int offset, int length, int mode, IntBuffer sampleList) { long result = nFMUSIC_LoadSongEx(data, data.position(), offset, length, mode, (sampleList != null) ? sampleList : null, (sampleList != null) ? sampleList.position() : 0, (sampleList != null) ? sampleList.remaining() : 0); if(result != FMUSIC_TYPE_NONE) { return new FMusicModule(result); } return null; } /** * @see #FMUSIC_LoadSongEx(ByteBuffer, int, int, int, IntBuffer) * @param name of song * @param offset Optional. 0 by default. If > 0, this value is used to specify an offset in a file, so fmod will seek before opening * @param length Optional. 0 by default. If > 0, this value is used to specify the length of a memory block when using FSOUND_LOADMEMORY, or it is the length of a file or file segment if the offset parameter is used. On PlayStation 2 this must be 16 byte aligned for memory loading * @param mode Mode for opening song. With module files, only FSOUND_LOADMEMORY, FSOUND_NONBLOCKING, FSOUND_LOOP_NORMAL, or FSOUND_LOOP_OFF are supported. For FSB files, FSOUND_2D, FSOUND_HW3D, FSOUND_FORCEMONO also work * @param sampleList Optional. Buffer of sample indicies to load. Leave as Null if you want all samples to be loaded (default behaviour). See Remarks for more on this * @return On success, a FMusicModule instance is returned. On failure, Null is returned */ public static FMusicModule FMUSIC_LoadSongEx(String name, int offset, int length, int mode, IntBuffer sampleList) { long result = nFMUSIC_LoadSongEx(name, offset, length, mode, (sampleList != null) ? sampleList : null, (sampleList != null) ? sampleList.position() : 0, (sampleList != null) ? sampleList.remaining() : 0); if(result != FMUSIC_TYPE_NONE) { return new FMusicModule(result); } return null; } private static native long nFMUSIC_LoadSongEx(ByteBuffer data, int dataOffset, int offset, int length, int mode, IntBuffer sampleList, int bufferOffset, int remaining); private static native long nFMUSIC_LoadSongEx(String name, int offset, int length, int mode, IntBuffer sampleList, int bufferOffset, int remaining); /** * If a mod is opened with FSOUND_NONBLOCKING, this function returns the state of the opening mod. * @param module Module to get the open state from * @return 0 = mod is opened and ready. -1 = mod handle passed in is invalid. -2 = mod is still opening -3 = mod failed to open. (file not found, out of memory or other error). */ public static int FMUSIC_GetOpenState(FMusicModule module) { return nFMUSIC_GetOpenState(module.moduleHandle); } private static native int nFMUSIC_GetOpenState(long module); /** * Frees memory allocated for a song and removes it from the FMUSIC system * @param module Module to be freed * @return On success, true is returned. On failure, false is returned */ public static boolean FMUSIC_FreeSong(FMusicModule module) { // when freeing a song, we automatically deregister any callbacks FMOD.registerCallback(FMOD.FMUSIC_INSTCALLBACK, module.moduleHandle, null, null); FMOD.registerCallback(FMOD.FMUSIC_ORDERCALLBACK, module.moduleHandle, null, null); FMOD.registerCallback(FMOD.FMUSIC_ROWCALLBACK, module.moduleHandle, null, null); FMOD.registerCallback(FMOD.FMUSIC_ZXXCALLBACK, module.moduleHandle, null, null); return nFMUSIC_FreeSong(module.moduleHandle); } private static native boolean nFMUSIC_FreeSong(long module); /** * Starts a song playing * @param module Module to be played * @return true if module succeeded playing. false if module failed playing */ public static boolean FMUSIC_PlaySong(FMusicModule module) { return nFMUSIC_PlaySong(module.moduleHandle); } private static native boolean nFMUSIC_PlaySong(long module); /** * Stops a song from playing. * @param module Module to be stopped * @return On success, true is returned. On failure, false is returned */ public static boolean FMUSIC_StopSong(FMusicModule module) { return nFMUSIC_StopSong(module.moduleHandle); } private static native boolean nFMUSIC_StopSong(long module); /** * Stops all songs from playing. This is useful if you have multiple songs playing at once and * want a quick way to stop them */ private static native void FMUSIC_StopAllSongs(); /** * Sets a user callback for any Zxx commands encountered in an S3M, XM or IT file. * <p> * <b>Remarks</b> * The value passed into the param parameter of the callback is the xx value specified in the Zxx * command by the musician * ------------ * It is important to note that this callback will be called from directly WITHIN the * mixer / music update thread, therefore it is imperative that whatever you do from this * callback be extremely efficient. If the routine takes too long then breakups in the sound * will occur, or it will basically stop mixing until you return from the function. * This sort of function is usually best for just setting a flag, or do some simple variable * manipulation, and then exiting, letting your main thread do what it needs to based on these * flags or variables. * ------------ * This callback is LATENCY adjusted, so that the callback happens when you HEAR the sound, not when it is mixed, for accurate synchronization. * Use FSOUND_INIT_DONTLATENCYADJUST if you want it to be called back at mix time, which is useful if you want to control the music interactively. * ------------ * Note : This function is not supported with the MIDI format. * @param module Module to set the callback for * @param callback The callback function you supply to get called upon execution of a Zxx command * @return On success, true is returned. On failure, false is returned */ public static boolean FMUSIC_SetZxxCallback(FMusicModule module, FMusicCallback callback) { FMOD.registerCallback(FMOD.FMUSIC_ZXXCALLBACK, module.moduleHandle, module, callback); return nFMUSIC_SetZxxCallback(module.moduleHandle); } private static native boolean nFMUSIC_SetZxxCallback(long module); /** * Sets a user callback to occur on every row divisible by the rowstep parameter, played from a MOD, S3M, XM or IT file. * <p> * <b>Remarks</b> * It is important to note that this callback will be called from directly WITHIN the * mixer / music update thread, therefore it is imperative that whatever you do from this * callback be extremely efficient. If the routine takes too long then breakups in the sound * will occur, or it will basically stop mixing until you return from the function. * This sort of function is usually best for just setting a flag, or do some simple variable * manipulation, and then exiting, letting your main thread do what it needs to based on these * flags or variables. * ------------ * This callback is LATENCY adjusted, so that the callback happens when you HEAR the sound, not when it is mixed, for accurate synchronization. * Use FSOUND_INIT_DONTLATENCYADJUST if you want it to be called back at mix time, which is useful if you want to control the music interactively. * ------------ * Note : This function is not supported with the MIDI format. * @param module Module to set the callback for * @param callback The callback function you supply to get called * @param rowstep Call the callback every multiple of this number of rows * @return On success, true is returned. On failure, false is returned */ public static boolean FMUSIC_SetRowCallback(FMusicModule module, FMusicCallback callback, int rowstep) { FMOD.registerCallback(FMOD.FMUSIC_ROWCALLBACK, module.moduleHandle, module, callback); return nFMUSIC_SetRowCallback(module.moduleHandle, rowstep); } private static native boolean nFMUSIC_SetRowCallback(long module, int rowstep); /** * Sets a user callback to occur on every order divisible by the orderstep parameter, played from a MOD, S3M, XM or IT file * <p> * <b>Remarks</b> * It is important to note that this callback will be called from directly WITHIN the * mixer / music update thread, therefore it is imperative that whatever you do from this * callback be extremely efficient. If the routine takes too long then breakups in the sound * will occur, or it will basically stop mixing until you return from the function. * This sort of function is usually best for just setting a flag, or do some simple variable * manipulation, and then exiting, letting your main thread do what it needs to based on these * flags or variables. * ------------ * This callback is LATENCY adjusted, so that the callback happens when you HEAR the sound, not when it is mixed, for accurate synchronization. * Use FSOUND_INIT_DONTLATENCYADJUST if you want it to be called back at mix time, which is useful if you want to control the music interactively. * ------------ * Note : This function is not supported with the MIDI format. * @param module Module to set the callback for * @param callback The callback function you supply to get called * @param orderstep Call the callback every multiple of this number of orders * @return On success, true is returned. On failure, false is returned */ public static boolean FMUSIC_SetOrderCallback(FMusicModule module, FMusicCallback callback, int orderstep) { FMOD.registerCallback(FMOD.FMUSIC_ORDERCALLBACK, module.moduleHandle, module, callback); return nFMUSIC_SetOrderCallback(module.moduleHandle, orderstep); } private static native boolean nFMUSIC_SetOrderCallback(long module, int orderstep); /** * Sets a user callback to occur every time a instrument is played, triggered from a MOD, S3M, XM or IT file. * <p> * <b>Remarks</b> * It is important to note that this callback will be called from directly WITHIN the * mixer / music update thread, therefore it is imperative that whatever you do from this * callback be extremely efficient. If the routine takes too long then breakups in the sound * will occur, or it will basically stop mixing until you return from the function. * This sort of function is usually best for just setting a flag, or do some simple variable * manipulation, and then exiting, letting your main thread do what it needs to based on these * flags or variables. * ------------ * This callback is LATENCY adjusted, so that the callback happens when you HEAR the sound, not when it is mixed, for accurate synchronization. * Use FSOUND_INIT_DONTLATENCYADJUST if you want it to be called back at mix time, which is useful if you want to control the music interactively. * ------------ * Note : This function is not supported with the MIDI format. * @param module Module set the callback for * @param callback The callback function you supply to get called * @param instrument Call the callback when this instrument number is triggered * @return On success, true is returned. On failure, false is returned */ public static boolean FMUSIC_SetInstCallback(FMusicModule module, FMusicCallback callback, int instrument) { FMOD.registerCallback(FMOD.FMUSIC_INSTCALLBACK, module.moduleHandle, module, callback); return nFMUSIC_SetInstCallback(module.moduleHandle, instrument); } private static native boolean nFMUSIC_SetInstCallback(long module, int instrument); /** * Replaces a mod's sample with a sample definition specified. * <p> * <b>Remarks</b> * Because of the instrument nature of some formats like XM, this function lists all the samples in order of instruments and their subsamples. * ie if instrument 1 has 2 samples and instrument 2 contains 3 samples, then sampno in this case would be 0 and 1 for instrument 1's samples, and 2,3 & 4 for instrument 2's samples. * ------------ * FMOD does not free the existing mod sample that you may be overwriting. If you do overwrite an existing handle, it may be lost, and you may incur a memory leak. It is a good idea to free the existing sample first before overwriting it. * ------------ * Important: For PlayStation 2, this function has to do a blocking query to the IOP, and can take significantly more time than a standard non blocking fmod function. This means it is best to cache the pointers for samples while loading, and not call this function in realtime. * ------------ * This function is not supported with the MIDI format. * </p> * @param module Module to set the sample for. * @param sampno index to sample inside module * @param sptr sample definition to replace mod sample * @return On success, true is returned. On failure, false is returned */ public static boolean FMUSIC_SetSample(FMusicModule module, int sampno, FSoundSample sptr) { return nFMUSIC_SetSample(module.moduleHandle, sampno, sptr.sampleHandle); } private static native boolean nFMUSIC_SetSample(long module, int sampno, long sptr); /** * Sets a user defined value to store with the music file to be retrieved later. * @param module Module to set user data for * @param userdata Value to store with music object * @return On success, true is returned. On failure, false is returned */ public static boolean FMUSIC_SetUserData(FMusicModule module, ByteBuffer userdata) { return nFMUSIC_SetUserData(module.moduleHandle, userdata, userdata.position()); } private static native boolean nFMUSIC_SetUserData(long module, ByteBuffer userdata, int offset); /** * This function helps with channel usage. If you are desperate for channels, and you are prepared to * let the music routines drop a few channels, then calling this function can help. * It basically doesnt try to play any new sounds if a certain channel limit is being played (including sound effects), * and the new sound is below a certain specified volume. * ie. * You set it to maxchannels = 16, and minvolume = 0x10. * In this case, the mod will play normally as long as the total number of channels being played inclusing sound effefcts is below 16 * (see FSOUND_GetChannelsPlaying). * If the number of channels playing exceeds 16 (through a change in the music, or extra sound effects * are spawned, then sounds with a musician specified volume of less than 0x10 will be ignored. * The volume is based on volume column/default volume/volume set commands in the mod. master volume, * envelope volumes etc are not taken into account (this gives more control over how it will work from the * tracker). * <p> * <b>Remarks</b> * maxchannels will default to the number of channels allocated by FSOUND, so this will never happen * by default. * minvolume will default to 0, so it will always succeed by default. * To see how many channels are currently being MIXED, use FSOUND_GetChannelsPlaying. * As a musician mentioned to me once, most of his default volumes are set fairly high, and any low end * volumes are usually echoes etc, and can afford to be dropped. * ------------ * Note : This function is not supported with the MIDI format. * </p> * @param module Module to set channel/volume optimization settings * @param maxchannels Channel count to be mixed before fmusic starts to drop channels from the song * @param minvolume If maxchannels is exceeded, then music channels with volumes below this value will not be played. Range is 0-64. This is the value the tracker displays. All trackers use 0-64 * @return On success, true is returned. On failure, false is returned */ public static boolean FMUSIC_OptimizeChannels(FMusicModule module, int maxchannels, int minvolume) { return nFMUSIC_OptimizeChannels(module.moduleHandle, maxchannels, minvolume); } private static native boolean nFMUSIC_OptimizeChannels(long module, int maxchannels, int minvolume); /** * Turns on reverb for MIDI/RMI files. * <p> * <b>Remarks</b> * Reverb may be enabled through software emulation in the future for MOD based formats. * </p> * @param reverb Set to true to turn MIDI reverb on, false to turn MIDI reverb off * @return On success, true is returned. On failure, false is returned */ public static native boolean FMUSIC_SetReverb(boolean reverb); /** * Sets looping mode for midi and mod files * <p> * <b>Remarks</b> * Defaults to TRUE. To disable looping you must call this function using FALSE as the parameter. * For midi files this only takes effect before FMUSIC_PlaySong is called. For mod files this * can be called at any time including during playback. * </p> * @param module Module to set looping for * @param looping Set to true to make it loop forever, or false to only have it play once * @return On success, true is returned. On failure, false is returned */ public static boolean FMUSIC_SetLooping(FMusicModule module, boolean looping) { return nFMUSIC_SetLooping(module.moduleHandle, looping); } private static native boolean nFMUSIC_SetLooping(long module, boolean looping); /** * Sets a songs order position / current playing position. * <p> * <b>Remarks</b> * Note : This function is not supported with the MIDI format. * </p> * @param module Module to have its order changed * @param order Order number to jump to * @return On success, true is returned. On failure, false is returned */ public static boolean FMUSIC_SetOrder(FMusicModule module, int order) { return nFMUSIC_SetOrder(module.moduleHandle, order); } private static native boolean nFMUSIC_SetOrder(long module, int order); /** * Pauses a song * @param module Module to be paused/unpaused * @param pause true - song should be PAUSED, false - song should be UNPAUSED * @return On success, true is returned. On failure, false is returned */ public static boolean FMUSIC_SetPaused(FMusicModule module, boolean pause) { return nFMUSIC_SetPaused(module.moduleHandle, pause); } private static native boolean nFMUSIC_SetPaused(long module, boolean pause); /** * Sets a songs master volume. * @param module Module to have its master volume set * @param volume value from 0-256. 0 = silence, 256 = full volume * @return On success, true is returned. On failure, false is returned */ public static boolean FMUSIC_SetMasterVolume(FMusicModule module, int volume) { return nFMUSIC_SetMasterVolume(module.moduleHandle, volume); } private static native boolean nFMUSIC_SetMasterVolume(long module, int volume); /** * Sets a songs master speed scale, so that the song can be sped up or slowed down. * @param module Module to have its speed scale set * @param speed Speed scale for song. 1.0 is default. Minimum is 0 (stopped), maximum is 10.0 * @return On success, true is returned. On failure, false is returned */ public static boolean FMUSIC_SetMasterSpeed(FMusicModule module, float speed) { return nFMUSIC_SetMasterSpeed(module.moduleHandle, speed); } private static native boolean nFMUSIC_SetMasterSpeed(long module, float speed); /** * Sets the master pan seperation for a module * @param module Module to set pan seperation for * @param pansep The pan scale. 1.0 means full pan seperation, 0 means mono * @return On success, true is returned. On failure, false is returned */ public static boolean FMUSIC_SetPanSeperation(FMusicModule module, float pansep) { return nFMUSIC_SetPanSeperation(module.moduleHandle, pansep); } private static native boolean nFMUSIC_SetPanSeperation(long module, float pansep); /** * Returns the name of the song set by the composer. With MIDI format, the filename is returned * @param module Module to retrieve name from * @return On success, the name of the song is returned. On failure, Null is returned */ public static String FMUSIC_GetName(FMusicModule module) { return nFMUSIC_GetName(module.moduleHandle); } private static native String nFMUSIC_GetName(long module); /** * Returns the format type a song * @param module Module to retrieve type from * @return FMusicType constant, FMUSIC_TYPE_NONE on failure */ public static int FMUSIC_GetType(FMusicModule module) { return nFMUSIC_GetType(module.moduleHandle); } private static native int nFMUSIC_GetType(long module); /** * Returns the number of orders in this song * @param module Module to retrieve number of orders from * @return On success, the number of orders in this song is returned. On failure, 0 is returned */ public static int FMUSIC_GetNumOrders(FMusicModule module) { return nFMUSIC_GetNumOrders(module.moduleHandle); } private static native int nFMUSIC_GetNumOrders(long module); /** * Returns the number of patterns contained in this song. * @param module Module to retrieve number of patterns from * @return On success, the number of patterns contained in this song is returned. On failure, 0 is returned */ public static int FMUSIC_GetNumPatterns(FMusicModule module) { return nFMUSIC_GetNumPatterns(module.moduleHandle); } private static native int nFMUSIC_GetNumPatterns(long module); /** * Returns the number of instruments contained in this song. * @param module Module to retrieve number of instruments from * @return On success, the number of instruments contained in this song is returned. On failure, 0 is returned. */ public static int FMUSIC_GetNumInstruments(FMusicModule module) { return nFMUSIC_GetNumInstruments(module.moduleHandle); } private static native int nFMUSIC_GetNumInstruments(long module); /** * Returns the number of samples contained in this song. * @param module Module to retrieve number of samples * @return Number of samples contained in this song. On failure, 0 is returned. */ public static int FMUSIC_GetNumSamples(FMusicModule module) { return nFMUSIC_GetNumSamples(module.moduleHandle); } private static native int nFMUSIC_GetNumSamples(long module); /** * Returns the number of channels within this songs pattern data * @param module Module to retrieve number of channels from * @return Number of channels within this songs pattern data. On failure, 0 is returned. */ public static int FMUSIC_GetNumChannels(FMusicModule module) { return nFMUSIC_GetNumChannels(module.moduleHandle); } private static native int nFMUSIC_GetNumChannels(long module); /** * Returns a reference to a sample inside a module. * Once you have access to the module's sample, you can do a lot of things * to it, including locking and modifying the data within; using the * FSOUND_Sample_ functionality * <p> * <b>Remarks</b> * Because of the instrument nature of some formats like XM, this * function lists all the samples in order of instruments and their subsamples. * ie if instrument 1 has 2 samples and instrument 2 contains 3 samples, then * sampno in this case would be 0 and 1 for instrument 1's samples, and 2,3 & 4 * for instrument 2's samples. * </p> * @param module Module to retrieve a sample handle from * @param sampno index to sample inside module * @return On success, a valid sample is returned. On failure, Null is returned. */ public static FSoundSample FMUSIC_GetSample(FMusicModule module, int sampno) { long result = nFMUSIC_GetSample(module.moduleHandle, sampno); if(result != 0) { return new FSoundSample(result); } return null; } private static native long nFMUSIC_GetSample(long module, int sampno); /** * Returns the the length in rows of the pattern for the specified order number * @param module Module to get pattern lenght from * @param orderno pattern at specified order * @return On success, the songs pattern length at the specified order is returned. On failure, 0 is returned */ public static int FMUSIC_GetPatternLength(FMusicModule module, int orderno) { return nFMUSIC_GetPatternLength(module.moduleHandle, orderno); } private static native int nFMUSIC_GetPatternLength(long module, int orderno); /** * Returns whether the song has completed playing, or when the last order has finished playing. * This stays set even if the song loops. * @param module Module that you want check if finished or not * @return true if module has finished playing. false if module has not finished playing. */ public static boolean FMUSIC_IsFinished(FMusicModule module) { return nFMUSIC_IsFinished(module.moduleHandle); } private static native boolean nFMUSIC_IsFinished(long module); /** * Returns whether the song is currently playing or not. * @param module Module to retrieve name from * @return true Song is playing. false Song is stopped. */ public static boolean FMUSIC_IsPlaying(FMusicModule module) { return nFMUSIC_IsPlaying(module.moduleHandle); } private static native boolean nFMUSIC_IsPlaying(long module); /** * Returns the song's current master volume * @param module Module to retrieve song master volume from * @return On success, the song's current master volume, from 0 (silence) to 256 (full volume) is returned. On failure, -1 is returned. */ public static int FMUSIC_GetMasterVolume(FMusicModule module) { return nFMUSIC_GetMasterVolume(module.moduleHandle); } private static native int nFMUSIC_GetMasterVolume(long module); /** * Returns the song's current global volume * <p> * <b>Remarks</b> * GLOBAL volume is not the same as MASTER volume. GLOBAL volume is an internal * overall volume which can be altered by the song itself (ie there might be commands * to fade in a particular part of the song by scaling all the volumes in the song * up slowly from nothing). * GLOBAL volume is different to MASTER volume in that the song can modify without * your permission, whereas MASTER volume is an overall scalar that you can control. * For general use, MASTER volume is more useful, but you may want to reset a song's * GLOBAL volume at certain times in the song. (for example the song might have faded * out by using GLOBAL volume and you want to reset it) * </p> * @param module Module to retrieve song global volume from * @return Songs current global volume, from 0 (silence) to the maximum value determined by the music format. Global volume * maximums are different in respect to each format, they range from 64 to 256. On failure, -1 is returned. */ public static int FMUSIC_GetGlobalVolume(FMusicModule module) { return nFMUSIC_GetGlobalVolume(module.moduleHandle); } private static native int nFMUSIC_GetGlobalVolume(long module); /** * Returns the song's current order number * @param module Module to retrieve current order number from * @return On success, the song's current order number is returned.On failure, -1 is returned */ public static int FMUSIC_GetOrder(FMusicModule module) { return nFMUSIC_GetOrder(module.moduleHandle); } private static native int nFMUSIC_GetOrder(long module); /** * Returns the song's current pattern number * @param module Module to retrieve current pattern number from * @return On success, The song's current pattern number is returned. On failure, -1 is returned */ public static int FMUSIC_GetPattern(FMusicModule module) { return nFMUSIC_GetPattern(module.moduleHandle); } private static native int nFMUSIC_GetPattern(long module); /** * Returns the song's current speed. * @param module Module to retrieve current song speed from * @return On success, The song's current speed is returned. On failure, -1 is returned */ public static int FMUSIC_GetSpeed(FMusicModule module) { return nFMUSIC_GetSpeed(module.moduleHandle); } private static native int nFMUSIC_GetSpeed(long module); /** * Returns the song's current BPM. * @param module Module to retrieve current song BPM from * @return On success, song's current BPM is returned. On failure, -1 is returned */ public static int FMUSIC_GetBPM(FMusicModule module) { return nFMUSIC_GetBPM(module.moduleHandle); } private static native int nFMUSIC_GetBPM(long module); /** * Returns the song's current row number * <p> * <b>Remarks</b> * This value is latency adjusted by default, and returns the number you are hearing, not the 'mix-time' value. * Use FSOUND_INIT_DONTLATENCYADJUST if you want the value at mix time, which is useful if you want to control the music interactively, or from a DSP callback. * </p> * @param module Module to retrieve current row from * @return On success, the song's current row number is returned. On failure, -1 is returned */ public static int FMUSIC_GetRow(FMusicModule module) { return nFMUSIC_GetRow(module.moduleHandle); } private static native int nFMUSIC_GetRow(long module); /** * Returns whether song is currently paused or not * @param module Module to get paused flag from * @return On success, true is returned to say the song is currently paused. On failure, false is returned to say the song is NOT currently paused */ public static boolean FMUSIC_GetPaused(FMusicModule module) { return nFMUSIC_GetPaused(module.moduleHandle); } private static native boolean nFMUSIC_GetPaused(long module); /** * Returns the time in milliseconds since the song was started. This is useful for * synchronizing purposes becuase it will be exactly the same every time, and it is * reliably retriggered upon starting the song. Trying to synchronize using other * windows timers can lead to varying results, and inexact performance. This fixes that * problem by actually using the number of samples sent to the soundcard as a reference * <p> * <b>Remarks</b> * This value is latency adjusted by default, and returns the number you are hearing, not the 'mix-time' value. * Use FSOUND_INIT_DONTLATENCYADJUST if you want the value at mix time, which is useful if you want to control the music interactively, or from a DSP callback * </p> * @param module Module to the song to get time from * @return On success, the time played in milliseconds is returned. On failure, -1 is returned */ public static int FMUSIC_GetTime(FMusicModule module) { return nFMUSIC_GetTime(module.moduleHandle); } private static native int nFMUSIC_GetTime(long module); /** * Returns the real FSOUND channel playing based on the mod's FMUSIC channel * <p> * <b>Remarks</b> * Note FMUSIC mod playback only allocates a real channel on a mod channel the first time an instrument is played. * NNA's will not register. This function only returns the primary real channel for the mod channel. * </p> * @param module Module to the song * @param modchannel channel index, to query the real channel from * @return On success, the channel index for the respective mod channel is returned. On failure, -1 is returned */ public static int FMUSIC_GetRealChannel(FMusicModule module, int modchannel) { return nFMUSIC_GetRealChannel(module.moduleHandle, modchannel); } private static native int nFMUSIC_GetRealChannel(long module, int modchannel); /** * Retrieves the data set by FMUSIC_SetUserData * @param module Module to get the open state from * @return On success, userdata set by FMUSIC_SetUserData is returned. On failure, Null is returned. */ public static ByteBuffer FMUSIC_GetUserData(FMusicModule module, int capacity) { ByteBuffer buffer = nFMUSIC_GetUserData(module.moduleHandle, capacity); buffer.order(ByteOrder.nativeOrder()); return buffer; } private static native ByteBuffer nFMUSIC_GetUserData(long module, int capacity); /** * This is the callback rutine called by the native implementation whenever a * register callback is notified. * * @param handle Handle to native object being monitored * @param param parameter passed to callback */ public static void music_instcallback(long modulehandle, int param) { // we got a callback - notify everybody ArrayList handlers = FMOD.getCallbacks(FMOD.FMUSIC_INSTCALLBACK, modulehandle); for(int i=0; i<handlers.size(); i++) { FMOD.WrappedCallback wCallback = (FMOD.WrappedCallback) handlers.get(i); FMusicCallback callback = (FMusicCallback) wCallback.callback; callback.FMUSIC_CALLBACK((FMusicModule) wCallback.handled, param); } } /** * This is the callback rutine called by the native implementation whenever a * register callback is notified. * * @param handle Handle to native object being monitored * @param param parameter passed to callback */ public static void music_ordercallback(long modulehandle, int param) { // we got a callback - notify everybody ArrayList handlers = FMOD.getCallbacks(FMOD.FMUSIC_ORDERCALLBACK, modulehandle); for(int i=0; i<handlers.size(); i++) { FMOD.WrappedCallback wCallback = (FMOD.WrappedCallback) handlers.get(i); FMusicCallback callback = (FMusicCallback) wCallback.callback; callback.FMUSIC_CALLBACK((FMusicModule) wCallback.handled, param); } } /** * This is the callback rutine called by the native implementation whenever a * register callback is notified. * * @param handle Handle to native object being monitored * @param param parameter passed to callback */ public static void music_rowcallback(long modulehandle, int param) { // we got a callback - notify everybody ArrayList handlers = FMOD.getCallbacks(FMOD.FMUSIC_ROWCALLBACK, modulehandle); for(int i=0; i<handlers.size(); i++) { FMOD.WrappedCallback wCallback = (FMOD.WrappedCallback) handlers.get(i); FMusicCallback callback = (FMusicCallback) wCallback.callback; callback.FMUSIC_CALLBACK((FMusicModule) wCallback.handled, param); } } /** * This is the callback rutine called by the native implementation whenever a * register callback is notified. * * @param handle Handle to native object being monitored * @param param parameter passed to callback */ public static void music_zxxcallback(long modulehandle, int param) { // we got a callback - notify everybody ArrayList handlers = FMOD.getCallbacks(FMOD.FMUSIC_ZXXCALLBACK, modulehandle); for(int i=0; i<handlers.size(); i++) { FMOD.WrappedCallback wCallback = (FMOD.WrappedCallback) handlers.get(i); FMusicCallback callback = (FMusicCallback) wCallback.callback; callback.FMUSIC_CALLBACK((FMusicModule) wCallback.handled, param); } } } --- NEW FILE: FMusicModule.java --- /* * Copyright (c) 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.fmod3; /** * This class is a representation of a Module in FMod. * $Id: FMusicModule.java,v 1.1 2004/06/09 19:50:07 matzon Exp $ * <br> * @author Brian Matzon <br...@ma...> * @version $Revision: 1.1 $ */ public class FMusicModule { /** Handle to module */ long moduleHandle; /** * Creates a new FMusicModule * * @param moduleHandle */ FMusicModule(long moduleHandle) { this.moduleHandle = moduleHandle; } } --- NEW FILE: FSoundReverbChannelProperties.java --- /* * Copyright (c) 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.fmod3; /** * This class is a representation of a Reverb channel property object in FMod. * $Id: FSoundReverbChannelProperties.java,v 1.1 2004/06/09 19:50:07 matzon Exp $ * <br> * @author Brian Matzon <br...@ma...> * @version $Revision: 1.1 $ */ public class FSoundReverbChannelProperties { /** Handle to stream */ long reverbHandle; /** * Creates a new FSoundStream * * @param streamHandle handle to stream */ FSoundReverbChannelProperties(long reverbHandle) { this.reverbHandle = reverbHandle; } } --- NEW FILE: FSoundTagField.java --- /* * Copyright (c) 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 OTHERWIS... [truncated message content] |
|
From: Brian M. <ma...@us...> - 2004-06-09 19:50:16
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/fmod/callbacks In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4708/fmod/callbacks Removed Files: FMusicCallback.java FSoundCloseCallback.java FSoundDSPCallback.java FSoundMetaDataCallback.java FSoundOpenCallback.java FSoundReadCallback.java FSoundSeekCallback.java FSoundStreamCallback.java FSoundTellCallback.java Log Message: fmod -> fmod3 --- FSoundTellCallback.java DELETED --- --- FSoundDSPCallback.java DELETED --- --- FSoundCloseCallback.java DELETED --- --- FMusicCallback.java DELETED --- --- FSoundSeekCallback.java DELETED --- --- FSoundMetaDataCallback.java DELETED --- --- FSoundReadCallback.java DELETED --- --- FSoundStreamCallback.java DELETED --- --- FSoundOpenCallback.java DELETED --- |
|
From: Brian M. <ma...@us...> - 2004-06-09 19:50:15
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/fmod In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4708/fmod Removed Files: FMOD.java FMODException.java FMusic.java FMusicModule.java FSound.java FSoundDSPUnit.java FSoundReverbChannelProperties.java FSoundReverbProperties.java FSoundSample.java FSoundSampleLock.java FSoundStream.java FSoundSyncPoint.java FSoundTagField.java FSoundTocTag.java Log Message: fmod -> fmod3 --- FMOD.java DELETED --- --- FSoundSyncPoint.java DELETED --- --- FMusic.java DELETED --- --- FMusicModule.java DELETED --- --- FSoundReverbChannelProperties.java DELETED --- --- FSoundTagField.java DELETED --- --- FSoundReverbProperties.java DELETED --- --- FSoundDSPUnit.java DELETED --- --- FSoundTocTag.java DELETED --- --- FSoundStream.java DELETED --- --- FSoundSample.java DELETED --- --- FMODException.java DELETED --- --- FSound.java DELETED --- --- FSoundSampleLock.java DELETED --- |
|
From: Brian M. <ma...@us...> - 2004-06-09 19:49:27
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/fmod3 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4287/fmod3 Log Message: Directory /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/fmod3 added to the repository |
|
From: Brian M. <ma...@us...> - 2004-06-09 19:48:21
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/fmod3/callbacks In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3433/callbacks Log Message: Directory /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/fmod3/callbacks added to the repository |
|
From: Brian M. <ma...@us...> - 2004-06-09 19:48:10
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/fmod3 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3247/fmod3 Log Message: Directory /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/fmod3 added to the repository |
|
From: Brian M. <ma...@us...> - 2004-06-09 19:47:03
|
Update of /cvsroot/java-game-lib/LWJGL/platform_build/win32_vs_net In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2357 Modified Files: lwjgl.suo lwjgl-fmod.vcproj Log Message: fmod -> fmod3 Index: lwjgl-fmod.vcproj =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/platform_build/win32_vs_net/lwjgl-fmod.vcproj,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- lwjgl-fmod.vcproj 7 Jun 2004 06:15:00 -0000 1.2 +++ lwjgl-fmod.vcproj 9 Jun 2004 19:46:54 -0000 1.3 @@ -82,7 +82,7 @@ <Tool Name="VCLinkerTool" IgnoreImportLibrary="TRUE" - OutputFile="..\..\libs\win32\lwjgl-fmod.dll" + OutputFile="..\..\libs\win32\lwjgl-fmod3.dll" LinkIncremental="1" IgnoreAllDefaultLibraries="FALSE" GenerateDebugInformation="FALSE" @@ -123,16 +123,16 @@ RelativePath="..\..\src\native\common\common_tools.cpp"> </File> <File - RelativePath="..\..\src\native\common\fmod\extfmod.cpp"> + RelativePath="..\..\src\native\common\fmod3\extfmod3.cpp"> </File> <File - RelativePath="..\..\src\native\common\fmod\org_lwjgl_fmod_FMOD.cpp"> + RelativePath="..\..\src\native\common\fmod3\org_lwjgl_fmod3_FMOD.cpp"> </File> <File - RelativePath="..\..\src\native\common\fmod\org_lwjgl_fmod_FMusic.cpp"> + RelativePath="..\..\src\native\common\fmod3\org_lwjgl_fmod3_FMusic.cpp"> </File> <File - RelativePath="..\..\src\native\common\fmod\org_lwjgl_fmod_FSound.cpp"> + RelativePath="..\..\src\native\common\fmod3\org_lwjgl_fmod3_FSound.cpp"> </File> </Filter> <Filter Index: lwjgl.suo =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/platform_build/win32_vs_net/lwjgl.suo,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 Binary files /tmp/cvsyVHOkR and /tmp/cvsQKA0MO differ |
|
From: Brian M. <ma...@us...> - 2004-06-09 19:45:24
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/win32 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1250 Modified Files: org_lwjgl_Display.cpp Log Message: removed obsolete getPlatform Index: org_lwjgl_Display.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/win32/org_lwjgl_Display.cpp,v retrieving revision 1.64 retrieving revision 1.65 diff -u -d -r1.64 -r1.65 --- org_lwjgl_Display.cpp 23 May 2004 13:54:55 -0000 1.64 +++ org_lwjgl_Display.cpp 9 Jun 2004 19:45:15 -0000 1.65 @@ -196,18 +196,6 @@ return ret; } - -/* - * Class: org_lwjgl_Display - * Method: getPlatform - * Signature: ()I - */ -JNIEXPORT jint JNICALL Java_org_lwjgl_Display_getPlatform - (JNIEnv * env, jclass clazz) -{ - return org_lwjgl_Display_PLATFORM_WGL; -} - /* * Class: org_lwjgl_Display * Method: setDisplayMode |
|
From: Brian M. <ma...@us...> - 2004-06-07 15:37:06
|
Update of /cvsroot/java-game-lib/CVSROOT In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7065 Modified Files: checkoutlist Log Message: reenabled cia Index: checkoutlist =================================================================== RCS file: /cvsroot/java-game-lib/CVSROOT/checkoutlist,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- checkoutlist 7 Jun 2004 06:24:43 -0000 1.8 +++ checkoutlist 7 Jun 2004 15:36:55 -0000 1.9 @@ -12,4 +12,4 @@ # # comment lines begin with '#' syncmail -#ciabot_cvs.pl \ No newline at end of file +ciabot_cvs.pl \ No newline at end of file |
|
From: Brian M. <ma...@us...> - 2004-06-07 06:24:52
|
Update of /cvsroot/java-game-lib/CVSROOT In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27762 Modified Files: checkoutlist Log Message: disable cia - need execution bit Index: checkoutlist =================================================================== RCS file: /cvsroot/java-game-lib/CVSROOT/checkoutlist,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- checkoutlist 7 Jun 2004 06:12:30 -0000 1.7 +++ checkoutlist 7 Jun 2004 06:24:43 -0000 1.8 @@ -12,4 +12,4 @@ # # comment lines begin with '#' syncmail -ciabot_cvs.pl \ No newline at end of file +#ciabot_cvs.pl \ No newline at end of file |
|
From: Brian M. <ma...@us...> - 2004-06-07 06:15:11
|
Update of /cvsroot/java-game-lib/LWJGL/platform_build/win32_vs_net In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26597 Modified Files: lwjgl.suo lwjgl-fmod.vcproj lwjgl.vcproj Log Message: updated with fmod changes Index: lwjgl.vcproj =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/platform_build/win32_vs_net/lwjgl.vcproj,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- lwjgl.vcproj 23 May 2004 13:49:26 -0000 1.4 +++ lwjgl.vcproj 7 Jun 2004 06:15:00 -0000 1.5 @@ -308,6 +308,9 @@ Name="ext" Filter=""> <File + RelativePath="..\..\src\native\common\ext\org_lwjgl_opengl_EXTBlendEquationSeparate.cpp"> + </File> + <File RelativePath="..\..\src\native\common\ext\org_lwjgl_opengl_EXTBlendFuncSeparate.cpp"> </File> <File Index: lwjgl-fmod.vcproj =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/platform_build/win32_vs_net/lwjgl-fmod.vcproj,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- lwjgl-fmod.vcproj 23 May 2004 13:49:26 -0000 1.1 +++ lwjgl-fmod.vcproj 7 Jun 2004 06:15:00 -0000 1.2 @@ -69,7 +69,7 @@ Name="VCCLCompilerTool" GlobalOptimizations="TRUE" FavorSizeOrSpeed="1" - AdditionalIncludeDirectories=""C:\Program Files\fmodapi372win\api\inc";C:\Java\j2sdk1.5.0\include;C:\Java\j2sdk1.5.0\include\win32" + AdditionalIncludeDirectories=""C:\Program Files\fmodapi373win\api\inc";C:\Java\j2sdk1.5.0\include;C:\Java\j2sdk1.5.0\include\win32" PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" ExceptionHandling="FALSE" RuntimeLibrary="4" @@ -84,6 +84,7 @@ IgnoreImportLibrary="TRUE" OutputFile="..\..\libs\win32\lwjgl-fmod.dll" LinkIncremental="1" + IgnoreAllDefaultLibraries="FALSE" GenerateDebugInformation="FALSE" OptimizeReferences="2" EnableCOMDATFolding="2" Index: lwjgl.suo =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/platform_build/win32_vs_net/lwjgl.suo,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 Binary files /tmp/cvs5KIkz4 and /tmp/cvsbzMPlt differ |
|
From: Brian M. <ma...@us...> - 2004-06-07 06:12:42
|
Update of /cvsroot/java-game-lib/CVSROOT In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26233 Modified Files: checkoutlist loginfo Log Message: support for cia Index: checkoutlist =================================================================== RCS file: /cvsroot/java-game-lib/CVSROOT/checkoutlist,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- checkoutlist 25 Jan 2004 09:42:16 -0000 1.6 +++ checkoutlist 7 Jun 2004 06:12:30 -0000 1.7 @@ -10,4 +10,6 @@ # # [<whitespace>]<filename><whitespace><error message><end-of-line> # -# comment lines begin with '#' \ No newline at end of file +# comment lines begin with '#' +syncmail +ciabot_cvs.pl \ No newline at end of file Index: loginfo =================================================================== RCS file: /cvsroot/java-game-lib/CVSROOT/loginfo,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- loginfo 25 Jan 2004 09:36:20 -0000 1.6 +++ loginfo 7 Jun 2004 06:12:30 -0000 1.7 @@ -24,4 +24,5 @@ #DEFAULT (echo ""; id; echo %s; date; cat) >> $CVSROOT/CVSROOT/commitlog # or #DEFAULT (echo ""; id; echo %{sVv}; date; cat) >> $CVSROOT/CVSROOT/commitlog -DEFAULT /cvsroot/sitedocs/CVSROOT/cvstools/syncmail -u %{sVv} jav...@li... \ No newline at end of file +DEFAULT /cvsroot/sitedocs/CVSROOT/cvstools/syncmail -u %{sVv} jav...@li... +ALL $CVSROOT/CVSROOT/ciabot_cvs.pl %{,,,s} $USER \ No newline at end of file |
|
From: Brian M. <ma...@us...> - 2004-06-07 06:12:27
|
Update of /cvsroot/java-game-lib/CVSROOT In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26204 Added Files: ciabot_cvs.pl Log Message: support for cia --- NEW FILE: ciabot_cvs.pl --- #!/usr/bin/perl -w # # ciabot -- Mail a CVS log message to a given address, for the purposes of CIA # # Loosely based on cvslog by Russ Allbery <rr...@st...> # Copyright 1998 Board of Trustees, Leland Stanford Jr. University # # Copyright 2001, 2003, 2004 Petr Baudis <pa...@uc...> # # This program is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License version 2, as published by the # Free Software Foundation. # # The master location of this file is # http://pasky.or.cz/~pasky/dev/cvs/ciabot.pl. # # This version has been modified a bit, and is available on CIA's web site: # http://cia.navi.cx/clients/cvs/ciabot_cvs.pl # # This program is designed to run from the loginfo CVS administration file. It # takes a log message, massaging it and mailing it to the address given below. # # Its record in the loginfo file should look like: # # ALL $CVSROOT/CVSROOT/ciabot_cvs.pl %{,,,s} $USER project from_email dest_email ignore_regexp # # IMPORTANT: The %{,,,s} in loginfo is new, and is required for proper operation. # # Make sure that you add the script to 'checkoutlist' and give it # 0755 permissions -before- committing it or adding it. # # Note that the last four parameters are optional, you can alternatively # change the defaults below in the configuration section. # use strict; use vars qw ($project $from_email $dest_email $rpc_uri $sendmail $sync_delay $xml_rpc $ignore_regexp $alt_local_message_target); ### Configuration # Project name (as known to CIA). $project = 'LWJGL'; # The from address in generated mails. $from_email = 'in...@lw...'; # Mail all reports to this address. $dest_email = 'ci...@ci...'; # If using XML-RPC, connect to this URI. $rpc_uri = 'http://cia.navi.cx/RPC2'; # Path to your USCD sendmail compatible binary (your mailer daemon created this # program somewhere). $sendmail = '/usr/sbin/sendmail'; # Number of seconds to wait for possible concurrent instances. CVS calls up # this script for each involved directory separately and this is the sync # delay. 5s looks as a safe value, but feel free to increase if you are running # this on a slower (or overloaded) machine or if you have really a lot of # directories. # Increasing this could be a very good idea if you're on Sourceforge ;) $sync_delay = 10; # This script can communicate with CIA either by mail or by an XML-RPC # interface. The XML-RPC interface is faster and more efficient, however you # need to have RPC::XML perl module installed, and some large CVS hosting sites # (like Savannah or Sourceforge) might not allow outgoing HTTP connections # while they allow outgoing mail. Also, this script will hang and eventually # not deliver the event at all if CIA server happens to be down, which is # unfortunately not an uncommon condition. $xml_rpc = 0; # You can make this bot to totally ignore events concerning the objects # specified below. Each object is composed of <module>/<path>/<filename>, # therefore file Manifest in root directory of module gentoo will be called # "gentoo/Manifest", while file src/bfu/inphist.c of module elinks will be # called "elinks/src/bfu/inphist.c". Easy, isn't it? # # This variable should contain regexp, against which will each object be # checked, and if the regexp is matched, the file is ignored. Therefore ie. to # ignore all changes in the two files above and everything concerning module # 'admin', use: # # $ignore_regexp = "^(gentoo/Manifest|elinks/src/bfu/inphist.c|admin/)"; $ignore_regexp = ""; # It can be useful to also grab the generated XML message by some other # programs and ie. autogenerate some content based on it. Here you can specify # a file to which it will be appended. $alt_local_message_target = ""; ### The code itself use vars qw ($user $module $tag @files $logmsg $message); my @dir; # This array stores all the affected directories my @dirfiles; # This array is mapped to the @dir array and contains files # affected in each directory # A nice nonprinting character we can use as a separator relatively safely. # The commas in loginfo above give us 4 commas and a space between file # names given to us on the command line. This is the separator used internally. # Now we can handle filenames containing spaces, and probably anything except # strings of 4 commas or the ASCII bell character. # # This was inspired by the suggestion in: # http://mail.gnu.org/archive/html/info-cvs/2003-04/msg00267.html # $" = "\7"; ### Input data loading # These arguments are from %s; first the relative path in the repository # and then the list of files modified. @files = split (' ,,,', ($ARGV[0] or '')); $dir[0] = shift @files or die "$0: no directory specified\n"; $dirfiles[0] = "@files" or die "$0: no files specified\n"; # Guess module name. $module = $dir[0]; $module =~ s#/.*##; # Figure out who is doing the update. $user = $ARGV[1]; # Use the optional parameters, if supplied. $project = $ARGV[2] if $ARGV[2]; $from_email = $ARGV[3] if $ARGV[3]; $dest_email = $ARGV[4] if $ARGV[4]; $ignore_regexp = $ARGV[5] if $ARGV[5]; # Parse stdin (what's interesting is the tag and log message) while (<STDIN>) { $tag = $1 if /^\s*Tag: ([a-zA-Z0-9_-]+)/; last if /^Log Message/; } $logmsg = ""; while (<STDIN>) { next unless ($_ and $_ ne "\n" and $_ ne "\r\n"); s/&/&/g; s/</</g; s/>/>/g; $logmsg .= $_; } ### Remove to-be-ignored files $dirfiles[0] = join (' ', grep { my $f = "$module/$dir[0]/$_"; $f !~ m/$ignore_regexp/; } split (/\s+/, $dirfiles[0]) ) if ($ignore_regexp); exit unless $dirfiles[0]; ### Sync between the multiple instances potentially being ran simultanously my $sum; # _VERY_ simple hash of the log message. It is really weak, but I'm # lazy and it's really sorta exceptional to even get more commits # running simultanously anyway. $sum = 0; map { $sum += ord $_ } split(//, $logmsg); my $syncfile; # Name of the file used for syncing $syncfile = "/tmp/cvscia.$project.$module.$sum"; if (-f $syncfile and -w $syncfile) { # The synchronization file for this file already exists, so we are not the # first ones. So let's just dump what we know and exit. open(FF, ">>$syncfile") or die "aieee... can't log, can't log! $syncfile blocked!"; print FF "$dirfiles[0]!@!$dir[0]\n"; close(FF); exit; } else { # We are the first one! Thus, we'll fork, exit the original instance, and # wait a bit with the new one. Then we'll grab what the others collected and # go on. # We don't need to care about permissions since all the instances of the one # commit will obviously live as the same user. # system("touch") in a different way open(FF, ">>$syncfile") or die "aieee... can't log, can't log! $syncfile blocked!"; close(FF); exit if (fork); sleep($sync_delay); open(FF, $syncfile); my ($dirnum) = 1; # 0 is the one we got triggerred for while (<FF>) { chomp; ($dirfiles[$dirnum], $dir[$dirnum]) = split(/!@!/); $dirnum++; } close(FF); unlink($syncfile); } ### Compose the mail message my ($VERSION) = '2.3'; my ($URL) = 'http://cia.navi.cx/clients/cvs/ciabot_cvs.pl'; my $ts = time; $message = <<EM <message> <generator> <name>CIA Perl client for CVS</name> <version>$VERSION</version> <url>$URL</url> </generator> <source> <project>$project</project> <module>$module</module> EM ; $message .= " <branch>$tag</branch>" if ($tag); $message .= <<EM </source> <timestamp> $ts </timestamp> <body> <commit> <author>$user</author> <files> EM ; for (my $dirnum = 0; $dirnum < @dir; $dirnum++) { map { $_ = $dir[$dirnum] . '/' . $_; s#^.*?/##; # weed out the module name s/&/&/g; s/</</g; s/>/>/g; $message .= " <file>$_</file>\n"; } split($", $dirfiles[$dirnum]); } $message .= <<EM </files> <log> $logmsg </log> </commit> </body> </message> EM ; ### Write the message to an alt-target if ($alt_local_message_target and open (ALT, ">>$alt_local_message_target")) { print ALT $message; close ALT; } ### Send out the XML-RPC message if ($xml_rpc) { # We gotta be careful from now on. We silence all the warnings because # RPC::XML code is crappy and works with undefs etc. $^W = 0; $RPC::XML::ERROR if (0); # silence perl's compile-time warning require RPC::XML; require RPC::XML::Client; my $rpc_client = new RPC::XML::Client $rpc_uri; my $rpc_request = RPC::XML::request->new('hub.deliver', $message); my $rpc_response = $rpc_client->send_request($rpc_request); unless (ref $rpc_response) { die "XML-RPC Error: $RPC::XML::ERROR\n"; } exit; } ### Send out the mail # Open our mail program open (MAIL, "| $sendmail -t -oi -oem") or die "Cannot execute $sendmail : " . ($?>>8); # The mail header print MAIL <<EOM; From: $from_email To: $dest_email Content-type: text/xml Subject: DeliverXML EOM print MAIL $message; # Close the mail close MAIL; die "$0: sendmail exit status " . ($? >> 8) . "\n" unless ($? == 0); # vi: set sw=2: |
|
From: Brian M. <ma...@us...> - 2004-06-02 21:40:58
|
Update of /cvsroot/java-game-lib/LWJGL/src/native/common/fmod In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32080/src/native/common/fmod Modified Files: org_lwjgl_fmod_FSound.cpp Log Message: updated to 3.73 Index: org_lwjgl_fmod_FSound.cpp =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/native/common/fmod/org_lwjgl_fmod_FSound.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- org_lwjgl_fmod_FSound.cpp 23 May 2004 19:45:00 -0000 1.3 +++ org_lwjgl_fmod_FSound.cpp 2 Jun 2004 21:40:47 -0000 1.4 @@ -1300,8 +1300,8 @@ * Method: FSOUND_CD_Eject * Signature: (C)Z */ -JNIEXPORT jboolean JNICALL Java_org_lwjgl_fmod_FSound_FSOUND_1CD_1Eject(JNIEnv * env, jclass clazz, jchar drive) { - return fmod_instance->FSOUND_CD_Eject(drive); +JNIEXPORT jboolean JNICALL Java_org_lwjgl_fmod_FSound_FSOUND_1CD_1OpenTray(JNIEnv * env, jclass clazz, jchar drive, jboolean open) { + return fmod_instance->FSOUND_CD_OpenTray(drive, open); } /* |
|
From: Brian M. <ma...@us...> - 2004-06-02 21:39:58
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/fmod In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31846/src/java/org/lwjgl/fmod Modified Files: FSound.java Added Files: FSoundTocTag.java Log Message: updated to 3.73 --- NEW FILE: FSoundTocTag.java --- /* * Copyright (c) 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.fmod; /** * This class is a representation of a FSOUND_TOC_TAG property object in FMod. * $Id: FSoundTocTag.java,v 1.1 2004/06/02 21:39:42 matzon Exp $ * <br> * @author Brian Matzon <br...@ma...> * @version $Revision: 1.1 $ */ public class FSoundTocTag { /** Handle to toc */ long tocHandle; /* char name[4] // The string "TOC", just in case this structure is accidentally treated as a string int numtracks // The number of tracks on the CD int min[100] // The start offset of each track in minutes int sec[100] // The start offset of each track in seconds int frame[100] // The start offset of each track in frames */ /** * Creates a new FSoundTocTag * * @param tocHandle handle to TOC */ FSoundTocTag(long tocHandle) { this.tocHandle = tocHandle; } } Index: FSound.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/fmod/FSound.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- FSound.java 31 May 2004 12:42:07 -0000 1.3 +++ FSound.java 2 Jun 2004 21:39:42 -0000 1.4 @@ -317,6 +317,24 @@ | FSOUND_REVERB_FLAGS_DECAYHFLIMIT | FSOUND_REVERB_FLAGS_CORE0 | FSOUND_REVERB_FLAGS_CORE1); + /** A vorbis comment */ + public static final int FSOUND_TAGFIELD_VORBISCOMMENT = 0; + + /** Part of an ID3v1 tag */ + public static final int FSOUND_TAGFIELD_ID3V1 = 1; + + /** An ID3v2 frame */ + public static final int FSOUND_TAGFIELD_ID3V2 = 2; + + /** A SHOUTcast header line */ + public static final int FSOUND_TAGFIELD_SHOUTCAST = 3; + + /** An Icecast header line */ + public static final int FSOUND_TAGFIELD_ICECAST = 4; + + /** An Advanced Streaming Format header line */ + public static final int FSOUND_TAGFIELD_ASF = 5; + // Pre Initialization / Initialization / Enumeration // ====================================================== /** @@ -2656,16 +2674,12 @@ // ========================================================== /** * Opens/Closes the CD tray - * <p> - * <b>Remarks</b> - * Calling this when the CD tray is open will cause it to close. - * Calling this when the CD tray is closed will cause it to open. - * </p> * - * @param drive the drive ID to use. 0 is the default CD drive. Using D or E in single quotes would be D: or E: for example. + * @param drive The drive ID to use. 0 is the default CD drive. Using D or E in single quotes would be D: or E: for example. + * @param open If open is set to true, the CD tray will be opened. If open is set to false, the CD tray will be closed. * @return On success, true is is returned. On failure, false is returned. */ - public static native boolean FSOUND_CD_Eject(char drive); + public static native boolean FSOUND_CD_OpenTray(char drive, boolean open); /** * Returns the number of tracks on the currently inserted CD |
|
From: Brian M. <ma...@us...> - 2004-06-02 21:39:54
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/fmod In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31846/src/java/org/lwjgl/test/fmod Modified Files: CDPlayer.java Log Message: updated to 3.73 Index: CDPlayer.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/test/fmod/CDPlayer.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- CDPlayer.java 23 May 2004 14:03:07 -0000 1.1 +++ CDPlayer.java 2 Jun 2004 21:39:41 -0000 1.2 @@ -88,7 +88,7 @@ running = false; break; case 1: - FSound.FSOUND_CD_Eject(st.nextToken().charAt(0)); + FSound.FSOUND_CD_OpenTray(st.nextToken().charAt(0), true); break; case 2: FSound.FSOUND_CD_Play(st.nextToken().charAt(0), Integer.parseInt(st.nextToken())); |