diff --git a/src/java/org/lwjgl/fmod/FSound.java b/src/java/org/lwjgl/fmod/FSound.java index f0072539..ac39b17e 100644 --- a/src/java/org/lwjgl/fmod/FSound.java +++ b/src/java/org/lwjgl/fmod/FSound.java @@ -317,6 +317,24 @@ public class FSound { | 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 @@ public class FSound { // ========================================================== /** * Opens/Closes the CD tray - *

- * Remarks - * 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. - *

* - * @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 diff --git a/src/java/org/lwjgl/fmod/FSoundTocTag.java b/src/java/org/lwjgl/fmod/FSoundTocTag.java new file mode 100644 index 00000000..7a456654 --- /dev/null +++ b/src/java/org/lwjgl/fmod/FSoundTocTag.java @@ -0,0 +1,61 @@ +/* + * 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$ + *
+ * @author Brian Matzon + * @version $Revision$ + */ +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; + } +} diff --git a/src/java/org/lwjgl/test/fmod/CDPlayer.java b/src/java/org/lwjgl/test/fmod/CDPlayer.java index 77eb1b27..8e8e3166 100644 --- a/src/java/org/lwjgl/test/fmod/CDPlayer.java +++ b/src/java/org/lwjgl/test/fmod/CDPlayer.java @@ -88,7 +88,7 @@ public class CDPlayer { 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())); diff --git a/src/native/common/fmod/org_lwjgl_fmod_FSound.cpp b/src/native/common/fmod/org_lwjgl_fmod_FSound.cpp index b6db4a60..bd8dc1b9 100644 --- a/src/native/common/fmod/org_lwjgl_fmod_FSound.cpp +++ b/src/native/common/fmod/org_lwjgl_fmod_FSound.cpp @@ -1300,8 +1300,8 @@ JNIEXPORT jint JNICALL Java_org_lwjgl_fmod_FSound_nFSOUND_1Stream_1SetTime(JNIEn * 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); } /*