From: Brian M. <ma...@us...> - 2002-09-02 22:06:20
|
Update of /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/openal/eax In directory usw-pr-cvs1:/tmp/cvs-serv26754/org/lwjgl/openal/eax Modified Files: BaseEAXConstants.java Added Files: EAXBufferProperties.java EAXListenerProperties.java Log Message: add: EAX support done - needs some cleaning, and possibly refactoring of constants... --- NEW FILE: EAXBufferProperties.java --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/openal/eax/EAXBufferProperties.java /* * Copyright (c) 2002 Light Weight Java Game Library Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'Light Weight Java Game Library' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.lwjgl.openal.eax; import org.lwjgl.Sys; import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.lang.reflect.*; /** * $Id: EAXBufferProperties.java,v 1.1 2002/09/02 22:06:13 matzon Exp $ * * This class encapsultaes the EAXBUFFERPROPERTIES struct * * @author Brian Matzon <br...@ma...> * @version $Revision: 1.1 $ */ public class EAXBufferProperties { /** ByteBuffer representing EAXBUFFERPROPERTIES */ protected ByteBuffer eaxBufferProperties; /** size needed by ByteBuffer to contain EAXBUFFERPROPERTIES */ protected static int EAXBUFFERPROPERTIES_SIZE; /** direct path level offset */ protected static int direct_offset; /** direct path level at high frequencies offset */ protected static int directHF_offset; /** room effect level offset */ protected static int room_offset; /** room effect level at high frequencies offset */ protected static int roomHF_offset; /** like DS3D flRolloffFactor but for room effect offset */ protected static int roomRolloffFactor_offset; /** main obstruction control (attenuation at high frequencies) offset */ protected static int obstruction_offset; /** obstruction low-frequency level re. main control offset */ protected static int obstructionLFRatio_offset; /** main occlusion control (attenuation at high frequencies) offset */ protected static int occlusion_offset; /** occlusion low-frequency level re. main control offset */ protected static int occlusionLFRatio_offset; /** occlusion room effect level re. main control offset */ protected static int occlusionRoomRatio_offset; /** outside sound cone level at high frequencies offset */ protected static int outsideVolumeHF_offset; /** multiplies DSPROPERTY_EAXLISTENER_AIRABSORPTIONHF offset */ protected static int airAbsorptionFactor_offset; /** modifies the behavior of properties offset */ protected static int flags_offset; static { System.loadLibrary(org.lwjgl.Sys.getLibraryName()); EAXBUFFERPROPERTIES_SIZE = sizeOfEaxBufferProperties(); assignOffsets(); } /** * Creates a new instance of EAXBufferProperties * * @param eaxBufferProperties address of EAXBUFFERPROPERTIES */ public EAXBufferProperties() { eaxBufferProperties = ByteBuffer.allocateDirect(EAXBUFFERPROPERTIES_SIZE); eaxBufferProperties.order(ByteOrder.nativeOrder()); } /** * Retireves the direct path level * * @return direct path level */ public long getDirect() { return eaxBufferProperties.getLong(direct_offset); } /** * Sets the direct path level * * @param direct direct path level to set to */ public void setDirect(long direct) { eaxBufferProperties.putLong(direct_offset, direct); } /** * Retireves the direct path level at high frequencies * * @return direct path level at high frequencies */ public long getDirectHF() { return eaxBufferProperties.getLong(directHF_offset); } /** * Sets the direct path level at high frequencies * * @param direct direct path level at high frequencies to set to */ public void setDirectHF(long directHF) { eaxBufferProperties.putLong(directHF_offset, directHF); } /** * Retireves the room effect level * * @return room effect level */ public long getRoom() { return eaxBufferProperties.getLong(room_offset); } /** * Sets the room effect level * * @param room room effect level to set to */ public void setRoom(long room) { eaxBufferProperties.putLong(room_offset, room); } /** * Retireves the room effect level at high frequencies * * @return room effect level at high frequencies */ public long getRoomHF() { return eaxBufferProperties.getLong(roomHF_offset); } /** * Sets the room effect level at high frequencies * * @param room room effect level at high frequencies to set to */ public void setRoomHF(long roomHF) { eaxBufferProperties.putLong(roomHF_offset, roomHF); } /** * Retireves the DS3D flRolloffFactor for room effect * * @return DS3D flRolloffFactor for room effect */ public float getRoomRolloffFactor() { return eaxBufferProperties.getFloat(roomRolloffFactor_offset); } /** * Sets the DS3D flRolloffFactor for room effect * * @param roomRolloffFactor DS3D flRolloffFactor for room effect to set to */ public void setRoomRolloffFactor(float roomRolloffFactor) { eaxBufferProperties.putFloat(roomRolloffFactor_offset, roomRolloffFactor); } /** * Retireves the main obstruction control (attenuation at high frequencies) * * @return main obstruction control (attenuation at high frequencies) */ public long getObstruction() { return eaxBufferProperties.getLong(obstruction_offset); } /** * Sets the main obstruction control (attenuation at high frequencies) * * @param obstruction main obstruction control (attenuation at high frequencies) to set to */ public void setObstruction(long obstruction) { eaxBufferProperties.putLong(obstruction_offset, obstruction); } /** * Retireves the obstruction low-frequency level re. main control * * @return obstruction low-frequency level re. main control */ public float getObstructionLFRatio() { return eaxBufferProperties.getFloat(obstructionLFRatio_offset); } /** * Sets the obstruction low-frequency level re. main control * * @param obstructionLFRatio obstruction low-frequency level re. main control to set to */ public void setObstructionLFRatio(float obstructionLFRatio) { eaxBufferProperties.putFloat(obstructionLFRatio_offset, obstructionLFRatio); } /** * Retireves the main occlusion control (attenuation at high frequencies) * * @return main occlusion control (attenuation at high frequencies) */ public long getOcclusion() { return eaxBufferProperties.getLong(occlusion_offset); } /** * Sets the main occlusion control (attenuation at high frequencies) * * @param occlusion main occlusion control (attenuation at high frequencies) to set to */ public void setOcclusion(long occlusion) { eaxBufferProperties.putLong(occlusion_offset, occlusion); } /** * Retireves the occlusion low-frequency level re. main control * * @return occlusion low-frequency level re. main control */ public float getOcclusionLFRatio() { return eaxBufferProperties.getFloat(occlusionLFRatio_offset); } /** * Sets the occlusion low-frequency level re. main control * * @param occlusionLFRatio occlusion low-frequency level re. main control to set to */ public void setOcclusionLFRatio(float occlusionLFRatio) { eaxBufferProperties.putFloat(occlusionLFRatio_offset, occlusionLFRatio); } /** * Retireves the occlusion room effect level re. main control * * @return occlusion room effect level re. main control */ public float getOcclusionRoomRatio() { return eaxBufferProperties.getFloat(occlusionRoomRatio_offset); } /** * Sets the OcclusionRoomRatio * * @param occlusionRoomRatio OcclusionRoomRatio to set to */ public void setOcclusionRoomRatio(float occlusionRoomRatio) { eaxBufferProperties.putFloat(occlusionRoomRatio_offset, occlusionRoomRatio); } /** * Retireves the OutsideVolumeHF * * @return OutsideVolumeHF */ public long getOutsideVolumeHF() { return eaxBufferProperties.getLong(outsideVolumeHF_offset); } /** * Sets the OutsideVolumeHF * * @param outsideVolumeHF OutsideVolumeHF to set to */ public void setOutsideVolumeHF(long outsideVolumeHF) { eaxBufferProperties.putLong(outsideVolumeHF_offset, outsideVolumeHF); } /** * Retireves the multiplier for DSPROPERTY_EAXLISTENER_AIRABSORPTIONHF * * @return multiplier for DSPROPERTY_EAXLISTENER_AIRABSORPTIONHF */ public float getAirAbsorptionFactor() { return eaxBufferProperties.getFloat(airAbsorptionFactor_offset); } /** * Sets the multiplier for DSPROPERTY_EAXLISTENER_AIRABSORPTIONHF * * @param airAbsorptionFactor multiplier for DSPROPERTY_EAXLISTENER_AIRABSORPTIONHF to set to */ public void setAirAbsorptionFactor(float airAbsorptionFactor) { eaxBufferProperties.putFloat(airAbsorptionFactor_offset, airAbsorptionFactor); } /** * Retireves the modifier for behavior of properties * * @return modifier for behavior of properties */ public long getFlags() { return eaxBufferProperties.getLong(flags_offset); } /** * Sets the modifier for behavior of properties * * @param flags modifier for behavior of properties to set to */ public void setFlags(long flags) { eaxBufferProperties.putLong(flags_offset, flags); } /** * Retrieves the address of this EAXBufferProperties */ public int getAddress() { return Sys.getDirectBufferAddress(eaxBufferProperties); } /** * Retrieves the size of the containing ByteBuffer */ public int getSize() { return EAXBUFFERPROPERTIES_SIZE; } /** * Retrieves the size of the EAXBUFFERPROPERTIES */ protected static native int sizeOfEaxBufferProperties(); /** * Sets the offsets to the fields */ protected static native void assignOffsets(); } --- NEW FILE: EAXListenerProperties.java --- CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/openal/eax/EAXListenerProperties.java /* * Copyright (c) 2002 Light Weight Java Game Library Project * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * * Neither the name of 'Light Weight Java Game Library' nor the names of * its contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package org.lwjgl.openal.eax; import org.lwjgl.Sys; import java.nio.ByteBuffer; import java.nio.ByteOrder; /** * $Id: EAXListenerProperties.java,v 1.1 2002/09/02 22:06:13 matzon Exp $ * * This class encapsultaes the EAXLISTENERPROPERTIES struct * * @author Brian Matzon <br...@ma...> * @version $Revision: 1.1 $ */ public class EAXListenerProperties { /** ByteBuffer representing EAXLISTENERPROPERTIES */ protected ByteBuffer eaxListenerProperties; /** size needed by ByteBuffer to contain EAXLISTENERPROPERTIES */ protected static int EAXLISTENERPROPERTIES_SIZE; /** room effect level offset */ protected static int room_offset; /** room effect level at high frequencies offset */ protected static int roomHF_offset; /**like DS3D flRolloffFactor but for room effect offset */ protected static int roomRolloffFactor_offset; /** reverberation decay time at low frequencies offset */ protected static int decayTime_offset; /** high-frequency to low-frequency decay time ratio offset */ protected static int decayHFRatio_offset; /** early reflections level relative to room effect offset */ protected static int reflections_offset; /** initial reflection delay time offset */ protected static int reflectionsDelay_offset; /** late reverberation level relative to room effect offset */ protected static int reverb_offset; /** late reverberation delay time relative to initial reflection offset */ protected static int reverbDelay_offset; /** sets all listener properties offset */ protected static int environment_offset; /** environment size in meters offset */ protected static int environmentSize_offset; /** environment diffusion offset */ protected static int environmentDiffusion_offset; /** change in level per meter at 5 kHz offset */ protected static int airAbsorptionHF_offset; /** modifies the behavior of properties offset */ protected static int flags_offset; static { System.loadLibrary(org.lwjgl.Sys.getLibraryName()); EAXLISTENERPROPERTIES_SIZE = sizeOfEaxListenerProperties(); assignOffsets(); } /** * Creates a new instance of EAXBufferProperties */ public EAXListenerProperties() { eaxListenerProperties = ByteBuffer.allocateDirect(EAXLISTENERPROPERTIES_SIZE); eaxListenerProperties.order(ByteOrder.nativeOrder()); } /** * Retireves the room effect level * * @return room effect level */ public long getRoom() { return eaxListenerProperties.getLong(room_offset); } /** * Sets the room effect level * * @param room room effect level to set to */ public void setRoom(long room) { eaxListenerProperties.putLong(room_offset, room); } /** * Retireves the room effect level at high frequencies * * @return room effect level at high frequencies */ public long getRoomHF() { return eaxListenerProperties.getLong(roomHF_offset); } /** * Sets the room effect level at high frequencies * * @param room room effect level at high frequencies to set to */ public void setRoomHF(long roomHF) { eaxListenerProperties.putLong(roomHF_offset, roomHF); } /** * Retireves the DS3D flRolloffFactor for room effect * * @return DS3D flRolloffFactor for room effect */ public float getRoomRolloffFactor() { return eaxListenerProperties.getFloat(roomRolloffFactor_offset); } /** * Sets the DS3D flRolloffFactor for room effect * * @param roomRolloffFactor DS3D flRolloffFactor for room effect to set to */ public void setRoomRolloffFactor(float roomRolloffFactor) { eaxListenerProperties.putFloat(roomRolloffFactor_offset, roomRolloffFactor); } /** * Retireves the reverberation decay time at low frequencies * * @return reverberation decay time at low frequencies */ public float getDecayTime() { return eaxListenerProperties.getFloat(decayTime_offset); } /** * Sets the reverberation decay time at low frequencies * * @param decayTime reverberation decay time at low frequencies to set to */ public void setDecayTime(float decayTime) { eaxListenerProperties.putFloat(decayTime_offset, decayTime); } /** * Retireves the high-frequency to low-frequency decay time ratio * * @return high-frequency to low-frequency decay time ratio */ public float getDecayTimeHFRatio() { return eaxListenerProperties.getFloat(decayHFRatio_offset); } /** * Sets the high-frequency to low-frequency decay time ratio * * @param decayTimeHFRatio high-frequency to low-frequency decay time ratio to set to */ public void setDecayTimeHFRatio(float decayTimeHFRatio) { eaxListenerProperties.putFloat(decayHFRatio_offset, decayTimeHFRatio); } /** * Retireves the early reflections level relative to room effect * * @return early reflections level relative to room effect */ public long getReflections() { return eaxListenerProperties.getLong(reflections_offset); } /** * Sets the early reflections level relative to room effect * * @param reflections early reflections level relative to room effect to set to */ public void setReflections(long reflections) { eaxListenerProperties.putLong(reflections_offset, reflections); } /** * Retireves the initial reflection delay time * * @return initial reflection delay time */ public float getReflectionsDelay() { return eaxListenerProperties.getFloat(reflectionsDelay_offset); } /** * Sets the initial reflection delay time * * @param reflectionsDelay initial reflection delay time to set to */ public void setReflectionsDelay(float reflectionsDelay) { eaxListenerProperties.putFloat(reflectionsDelay_offset, reflectionsDelay); } /** * Retireves the late reverberation level relative to room effect * * @return late reverberation level relative to room effect */ public long getReverb() { return eaxListenerProperties.getLong(reverb_offset); } /** * Sets the late reverberation level relative to room effect * * @param reverb late reverberation level relative to room effect to set to */ public void setReverb(long reverb) { eaxListenerProperties.putLong(reverb_offset, reverb); } /** * Retireves the late reverberation delay time relative to initial reflection * * @return late reverberation delay time relative to initial reflection */ public float getReverbDelay() { return eaxListenerProperties.getFloat(reverbDelay_offset); } /** * Sets the late reverberation delay time relative to initial reflection * * @param reverbDelay late reverberation delay time relative to initial reflection */ public void setReverbDelay(float reverbDelay) { eaxListenerProperties.putFloat(reverbDelay_offset, reverbDelay); } /** * Retireves the listener properties * * @return listener properties */ public long getEnvironment() { return eaxListenerProperties.getLong(environment_offset); } /** * Sets the listener properties * * @param environment listener properties to set to */ public void setEnvironment(long environment) { eaxListenerProperties.putLong(environment_offset, environment); } /** * Retireves the environment size in meters * * @return environment size in meters */ public float getEnvironmentSize() { return eaxListenerProperties.getFloat(environmentSize_offset); } /** * Sets the environment size in meters * * @param environmentSize environment size in meters to set to */ public void setEnvironmentSize(float environmentSize) { eaxListenerProperties.putFloat(environmentSize_offset, environmentSize); } /** * Retireves the environment diffusion * * @return environment diffusion */ public float getEnvironmentDiffusion() { return eaxListenerProperties.getFloat(environmentDiffusion_offset); } /** * Sets the environment diffusion * * @param environmentDiffusion environment diffusion to set to */ public void setEnvironmentDiffusion(float environmentDiffusion) { eaxListenerProperties.putFloat(environmentDiffusion_offset, environmentDiffusion); } /** * Retireves the change in level per meter at 5 kHz * * @return change in level per meter at 5 kHz */ public float getAirAbsorptionHF() { return eaxListenerProperties.getFloat(airAbsorptionHF_offset); } /** * Sets the change in level per meter at 5 kHz * * @param airAbsorptionHF change in level per meter at 5 kHz to set to */ public void setAirAbsorptionFactor(float airAbsorptionHF) { eaxListenerProperties.putFloat(airAbsorptionHF_offset, airAbsorptionHF); } /** * Retireves the modifier for behavior of properties * * @return modifier for behavior of properties */ public long getFlags() { return eaxListenerProperties.getLong(flags_offset); } /** * Sets the modifier for behavior of properties * * @param flags modifier for behavior of properties to set to */ public void setFlags(long flags) { eaxListenerProperties.putLong(flags_offset, flags); } /** * Retrieves the address of this EAXBufferProperties */ public int getAddress() { return Sys.getDirectBufferAddress(eaxListenerProperties); } /** * Retrieves the size of the containing ByteBuffer */ public int getSize() { return EAXLISTENERPROPERTIES_SIZE; } /** * Retrieves the size of the EAXLISTENERPROPERTIES */ protected static native int sizeOfEaxListenerProperties(); /** * Sets the offsets to the fields */ protected static native void assignOffsets(); } Index: BaseEAXConstants.java CVS Browser: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/java/org/lwjgl/openal/eax/BaseEAXConstants.java =================================================================== RCS file: /cvsroot/java-game-lib/LWJGL/src/java/org/lwjgl/openal/eax/BaseEAXConstants.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- BaseEAXConstants.java 2 Sep 2002 13:07:48 -0000 1.1 +++ BaseEAXConstants.java 2 Sep 2002 22:06:12 -0000 1.2 @@ -40,5 +40,273 @@ * @version $Revision$ */ public interface BaseEAXConstants { - //add some... + public static final int DSPROPERTY_EAXLISTENER_NONE = 0; + public static final int DSPROPERTY_EAXLISTENER_ALLPARAMETERS = 1; + public static final int DSPROPERTY_EAXLISTENER_ROOM = 2; + public static final int DSPROPERTY_EAXLISTENER_ROOMHF = 3; + public static final int DSPROPERTY_EAXLISTENER_ROOMROLLOFFFACTOR = 4; + public static final int DSPROPERTY_EAXLISTENER_DECAYTIME = 5; + public static final int DSPROPERTY_EAXLISTENER_DECAYHFRATIO = 6; + public static final int DSPROPERTY_EAXLISTENER_REFLECTIONS = 7; + public static final int DSPROPERTY_EAXLISTENER_REFLECTIONSDELAY = 8; + public static final int DSPROPERTY_EAXLISTENER_REVERB = 9; + public static final int DSPROPERTY_EAXLISTENER_REVERBDELAY = 10; + public static final int DSPROPERTY_EAXLISTENER_ENVIRONMENT = 11; + public static final int DSPROPERTY_EAXLISTENER_ENVIRONMENTSIZE = 12; + public static final int DSPROPERTY_EAXLISTENER_ENVIRONMENTDIFFUSION = 13; + public static final int DSPROPERTY_EAXLISTENER_AIRABSORPTIONHF = 14; + public static final int DSPROPERTY_EAXLISTENER_FLAGS = 15; + + /** changes take effect immediately */ + public static final int DSPROPERTY_EAXLISTENER_IMMEDIATE = 0x00000000; + + /** changes take effect later */ + public static final int DSPROPERTY_EAXLISTENER_DEFERRED = 0x80000000; + + public static final int DSPROPERTY_EAXLISTENER_COMMITDEFERREDSETTINGS = + (DSPROPERTY_EAXLISTENER_NONE | + DSPROPERTY_EAXLISTENER_IMMEDIATE); + + public static final int ENVIRONMENT_GENERIC = 0; + public static final int ENVIRONMENT_PADDEDCELL = 1; + public static final int ENVIRONMENT_ROOM = 2; + public static final int ENVIRONMENT_BATHROOM = 3; + public static final int ENVIRONMENT_LIVINGROOM = 4; + public static final int ENVIRONMENT_STONEROOM = 5; + public static final int ENVIRONMENT_AUDITORIUM = 6; + public static final int ENVIRONMENT_CONCERTHALL = 7; + public static final int ENVIRONMENT_CAVE = 8; + public static final int ENVIRONMENT_ARENA = 9; + public static final int ENVIRONMENT_HANGAR = 10; + public static final int ENVIRONMENT_CARPETEDHALLWAY = 11; + public static final int ENVIRONMENT_HALLWAY = 12; + public static final int ENVIRONMENT_STONECORRIDOR = 13; + public static final int ENVIRONMENT_ALLEY = 14; + public static final int ENVIRONMENT_FOREST = 15; + public static final int ENVIRONMENT_CITY = 16; + public static final int ENVIRONMENT_MOUNTAINS = 17; + public static final int ENVIRONMENT_QUARRY = 18; + public static final int ENVIRONMENT_PLAIN = 19; + public static final int ENVIRONMENT_PARKINGLOT = 20; + public static final int ENVIRONMENT_SEWERPIPE = 21; + public static final int ENVIRONMENT_UNDERWATER = 22; + public static final int ENVIRONMENT_DRUGGED = 23; + public static final int ENVIRONMENT_DIZZY = 24; + public static final int ENVIRONMENT_PSYCHOTIC = 25; + public static final int ENVIRONMENT_COUNT = 26; + + /** reverberation decay time */ + public static final int EAXLISTENERFLAGS_DECAYTIMESCALE = 0x00000001; + + /** reflection level */ + public static final int EAXLISTENERFLAGS_REFLECTIONSSCALE = 0x00000002; + + /** initial reflection delay time */ + public static final int EAXLISTENERFLAGS_REFLECTIONSDELAYSCALE = 0x00000004; + + /** reflections level */ + public static final int EAXLISTENERFLAGS_REVERBSCALE = 0x00000008; + + /** late reverberation delay time */ + public static final int EAXLISTENERFLAGS_REVERBDELAYSCALE = 0x00000010; + + /** This flag limits high-frequency decay time according to air absorption. */ + public static final int EAXLISTENERFLAGS_DECAYHFLIMIT = 0x00000020; + + /** reserved future use */ + public static final int EAXLISTENERFLAGS_RESERVED = 0xFFFFFFC0; + + // property ranges and defaults: + public static final int EAXLISTENER_MINROOM = -10000; + public static final int EAXLISTENER_MAXROOM = 0; + public static final int EAXLISTENER_DEFAULTROOM = -1000; + + public static final int EAXLISTENER_MINROOMHF = -10000; + public static final int EAXLISTENER_MAXROOMHF = 0; + public static final int EAXLISTENER_DEFAULTROOMHF = -100; + + public static final float EAXLISTENER_MINROOMROLLOFFFACTOR = 0.0f; + public static final float EAXLISTENER_MAXROOMROLLOFFFACTOR = 10.0f; + public static final float EAXLISTENER_DEFAULTROOMROLLOFFFACTOR = 0.0f; + + public static final float EAXLISTENER_MINDECAYTIME = 0.1f; + public static final float EAXLISTENER_MAXDECAYTIME = 20.0f; + public static final float EAXLISTENER_DEFAULTDECAYTIME = 1.49f; + + public static final float EAXLISTENER_MINDECAYHFRATIO = 0.1f; + public static final float EAXLISTENER_MAXDECAYHFRATIO = 2.0f; + public static final float EAXLISTENER_DEFAULTDECAYHFRATIO = 0.83f; + + public static final int EAXLISTENER_MINREFLECTIONS = -10000; + public static final int EAXLISTENER_MAXREFLECTIONS = 1000; + public static final int EAXLISTENER_DEFAULTREFLECTIONS = -2602; + + public static final float EAXLISTENER_MINREFLECTIONSDELAY = 0.0f; + public static final float EAXLISTENER_MAXREFLECTIONSDELAY = 0.3f; + public static final float EAXLISTENER_DEFAULTREFLECTIONSDELAY = 0.007f; + + public static final int EAXLISTENER_MINREVERB = -10000; + public static final int EAXLISTENER_MAXREVERB = 2000; + public static final int EAXLISTENER_DEFAULTREVERB = 200; + + public static final float EAXLISTENER_MINREVERBDELAY = 0.0f; + public static final float EAXLISTENER_MAXREVERBDELAY = 0.1f; + public static final float EAXLISTENER_DEFAULTREVERBDELAY = 0.011f; + + public static final int EAXLISTENER_MINENVIRONMENT = 0; + public static final int EAXLISTENER_MAXENVIRONMENT = (ENVIRONMENT_COUNT-1); + public static final int EAXLISTENER_DEFAULTENVIRONMENT = ENVIRONMENT_GENERIC; + + public static final float EAXLISTENER_MINENVIRONMENTSIZE = 1.0f; + public static final float EAXLISTENER_MAXENVIRONMENTSIZE = 100.0f; + public static final float EAXLISTENER_DEFAULTENVIRONMENTSIZE = 7.5f; + + public static final float EAXLISTENER_MINENVIRONMENTDIFFUSION = 0.0f; + public static final float EAXLISTENER_MAXENVIRONMENTDIFFUSION = 1.0f; + public static final float EAXLISTENER_DEFAULTENVIRONMENTDIFFUSION = 1.0f; + + public static final float EAXLISTENER_MINAIRABSORPTIONHF = -100.0f; + public static final float EAXLISTENER_MAXAIRABSORPTIONHF = 0.0f; + public static final float EAXLISTENER_DEFAULTAIRABSORPTIONHF = -5.0f; + + public static final int EAXLISTENER_DEFAULTFLAGS = + (EAXLISTENERFLAGS_DECAYTIMESCALE | + EAXLISTENERFLAGS_REFLECTIONSSCALE | + EAXLISTENERFLAGS_REFLECTIONSDELAYSCALE | + EAXLISTENERFLAGS_REVERBSCALE | + EAXLISTENERFLAGS_REVERBDELAYSCALE | + EAXLISTENERFLAGS_DECAYHFLIMIT); + + //------------------------------------ + public static final int DSPROPERTY_EAXBUFFER_NONE = 0; + public static final int DSPROPERTY_EAXBUFFER_ALLPARAMETERS = 1; + public static final int DSPROPERTY_EAXBUFFER_DIRECT = 2; + public static final int DSPROPERTY_EAXBUFFER_DIRECTHF = 3; + public static final int DSPROPERTY_EAXBUFFER_ROOM = 4; + public static final int DSPROPERTY_EAXBUFFER_ROOMHF = 5; + public static final int DSPROPERTY_EAXBUFFER_ROOMROLLOFFFACTOR = 6; + public static final int DSPROPERTY_EAXBUFFER_OBSTRUCTION = 7; + public static final int DSPROPERTY_EAXBUFFER_OBSTRUCTIONLFRATIO = 8; + public static final int DSPROPERTY_EAXBUFFER_OCCLUSION = 9; + public static final int DSPROPERTY_EAXBUFFER_OCCLUSIONLFRATIO = 10; + public static final int DSPROPERTY_EAXBUFFER_OCCLUSIONROOMRATIO = 11; + public static final int DSPROPERTY_EAXBUFFER_OUTSIDEVOLUMEHF = 12; + public static final int DSPROPERTY_EAXBUFFER_AIRABSORPTIONFACTOR = 13; + public static final int DSPROPERTY_EAXBUFFER_FLAGS = 14; + + /** changes take effect immediately */ + public static final int DSPROPERTY_EAXBUFFER_IMMEDIATE = 0x00000000; + + /** changes take effect later */ + public static final int DSPROPERTY_EAXBUFFER_DEFERRED = 0x80000000; + public static final int DSPROPERTY_EAXBUFFER_COMMITDEFERREDSETTINGS = + (DSPROPERTY_EAXBUFFER_NONE | + DSPROPERTY_EAXBUFFER_IMMEDIATE); + + /** affects DSPROPERTY_EAXBUFFER_DIRECTHF */ + public static final int EAXBUFFERFLAGS_DIRECTHFAUTO = 0x00000001; + + /** affects DSPROPERTY_EAXBUFFER_ROOM */ + public static final int EAXBUFFERFLAGS_ROOMAUTO = 0x00000002; + + /** affects DSPROPERTY_EAXBUFFER_ROOMHF */ + public static final int EAXBUFFERFLAGS_ROOMHFAUTO = 0x00000004; + + /** reserved future use */ + public static final int EAXBUFFERFLAGS_RESERVED = 0xFFFFFFF8; + + // property ranges and defaults: + + public static final int EAXBUFFER_MINDIRECT = -10000; + public static final int EAXBUFFER_MAXDIRECT = 1000; + public static final int EAXBUFFER_DEFAULTDIRECT = 0; + + public static final int EAXBUFFER_MINDIRECTHF = -10000; + public static final int EAXBUFFER_MAXDIRECTHF = 0; + public static final int EAXBUFFER_DEFAULTDIRECTHF = 0; + + public static final int EAXBUFFER_MINROOM = -10000; + public static final int EAXBUFFER_MAXROOM = 1000; + public static final int EAXBUFFER_DEFAULTROOM = 0; + + public static final int EAXBUFFER_MINROOMHF = -10000; + public static final int EAXBUFFER_MAXROOMHF = 0; + public static final int EAXBUFFER_DEFAULTROOMHF = 0; + + public static final float EAXBUFFER_MINROOMROLLOFFFACTOR = 0.0f; + public static final float EAXBUFFER_MAXROOMROLLOFFFACTOR = 10.f; + public static final float EAXBUFFER_DEFAULTROOMROLLOFFFACTOR = 0.0f; + + public static final int EAXBUFFER_MINOBSTRUCTION = -10000; + public static final int EAXBUFFER_MAXOBSTRUCTION = 0; + public static final int EAXBUFFER_DEFAULTOBSTRUCTION = 0; + + public static final float EAXBUFFER_MINOBSTRUCTIONLFRATIO = 0.0f; + public static final float EAXBUFFER_MAXOBSTRUCTIONLFRATIO = 1.0f; + public static final float EAXBUFFER_DEFAULTOBSTRUCTIONLFRATIO = 0.0f; + + public static final int EAXBUFFER_MINOCCLUSION = -10000; + public static final int EAXBUFFER_MAXOCCLUSION = 0; + public static final int EAXBUFFER_DEFAULTOCCLUSION = 0; + + public static final float EAXBUFFER_MINOCCLUSIONLFRATIO = 0.0f; + public static final float EAXBUFFER_MAXOCCLUSIONLFRATIO = 1.0f; + public static final float EAXBUFFER_DEFAULTOCCLUSIONLFRATIO = 0.25f; + + public static final float EAXBUFFER_MINOCCLUSIONROOMRATIO = 0.0f; + public static final float EAXBUFFER_MAXOCCLUSIONROOMRATIO = 10.0f; + public static final float EAXBUFFER_DEFAULTOCCLUSIONROOMRATIO = 0.5f; + + public static final int EAXBUFFER_MINOUTSIDEVOLUMEHF = -10000; + public static final int EAXBUFFER_MAXOUTSIDEVOLUMEHF = 0; + public static final int EAXBUFFER_DEFAULTOUTSIDEVOLUMEHF = 0; + + public static final float EAXBUFFER_MINAIRABSORPTIONFACTOR = 0.0f; + public static final float EAXBUFFER_MAXAIRABSORPTIONFACTOR = 10.0f; + public static final float EAXBUFFER_DEFAULTAIRABSORPTIONFACTOR = 1.0f; + + public static final int EAXBUFFER_DEFAULTFLAGS = + (EAXBUFFERFLAGS_DIRECTHFAUTO | + EAXBUFFERFLAGS_ROOMAUTO | + EAXBUFFERFLAGS_ROOMHFAUTO); + + // Single window material preset + public static final int MATERIAL_SINGLEWINDOW = -2800; + public static final float MATERIAL_SINGLEWINDOWLF = 0.71f; + public static final float MATERIAL_SINGLEWINDOWROOMRATIO = 0.43f; + + // Double window material preset + public static final int MATERIAL_DOUBLEWINDOW = -5000; + public static final float MATERIAL_DOUBLEWINDOWHF = 0.40f; + public static final float MATERIAL_DOUBLEWINDOWROOMRATIO = 0.24f; + + // Thin door material preset + public static final int MATERIAL_THINDOOR = -1800; + public static final float MATERIAL_THINDOORLF = 0.66f; + public static final float MATERIAL_THINDOORROOMRATIO = 0.66f; + + // Thick door material preset + public static final int MATERIAL_THICKDOOR = -4400; + public static final float MATERIAL_THICKDOORLF = 0.64f; + public static final float MATERIAL_THICKDOORROOMRTATION = 0.27f; + + // Wood wall material preset + public static final int MATERIAL_WOODWALL = -4000; + public static final float MATERIAL_WOODWALLLF = 0.50f; + public static final float MATERIAL_WOODWALLROOMRATIO = 0.30f; + + // Brick wall material preset + public static final int MATERIAL_BRICKWALL = -5000; + public static final float MATERIAL_BRICKWALLLF = 0.60f; + public static final float MATERIAL_BRICKWALLROOMRATIO = 0.24f; + + // Stone wall material preset + public static final int MATERIAL_STONEWALL = -6000; + public static final float MATERIAL_STONEWALLLF = 0.68f; + public static final float MATERIAL_STONEWALLROOMRATIO = 0.20f; + + // Curtain material preset + public static final int MATERIAL_CURTAIN = -1200; + public static final float MATERIAL_CURTAINLF = 0.15f; + public static final float MATERIAL_CURTAINROOMRATIO = 1.00f; } |