"fix": deactivate EAX for this test release
This commit is contained in:
parent
1526ad3a2a
commit
491133c7f1
|
@ -40,128 +40,4 @@
|
||||||
* @version $Revision$
|
* @version $Revision$
|
||||||
*/
|
*/
|
||||||
public class EAX extends CoreEAX {
|
public class EAX extends CoreEAX {
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets an EAX Value
|
|
||||||
*
|
|
||||||
* @param listener EAXListenerProperties to set values from
|
|
||||||
* @param property property being queried
|
|
||||||
* @param source the source to be queried
|
|
||||||
*/
|
|
||||||
public static void eaxSetProperty(EAXListenerProperties listener, int property, int source) {
|
|
||||||
System.out.println("EAX has been disapled for this release, due to \"issues\" with the implementation");
|
|
||||||
//CoreEAX.eaxSet(CoreEAX.LISTENER_GUID, property, source, listener.eaxListenerProperties, EAXListenerProperties.EAXLISTENERPROPERTIES_SIZE);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets an EAX Value
|
|
||||||
*
|
|
||||||
* @param buffer EAXBufferProperties to set values from
|
|
||||||
* @param property property being queried
|
|
||||||
* @param source the source to be queried
|
|
||||||
*/
|
|
||||||
public static void eaxSetProperty(EAXBufferProperties buffer, int property, int source) {
|
|
||||||
System.out.println("EAX has been disapled for this release, due to \"issues\" with the implementation");
|
|
||||||
//CoreEAX.eaxSet(CoreEAX.BUFFER_GUID, property, source, buffer.eaxBufferProperties, EAX.getSizeOfProperty(CoreEAX.BUFFER_GUID, property));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets an EAX Value
|
|
||||||
*
|
|
||||||
* @param listener EAXListenerProperties to set values on
|
|
||||||
* @param property property being queried
|
|
||||||
* @param source the source to be queried
|
|
||||||
*/
|
|
||||||
public static void eaxGetProperty(EAXListenerProperties listener, int property, int source) {
|
|
||||||
System.out.println("EAX has been disapled for this release, due to \"issues\" with the implementation");
|
|
||||||
//CoreEAX.eaxGet(CoreEAX.LISTENER_GUID, property, source, listener.eaxListenerProperties, EAX.getSizeOfProperty(CoreEAX.LISTENER_GUID, property));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets an EAX Value
|
|
||||||
*
|
|
||||||
* @param buffer EAXBufferProperties to set values on
|
|
||||||
* @param property property being queried
|
|
||||||
* @param source the source to be queried
|
|
||||||
*/
|
|
||||||
public static void eaxGetProperty(EAXBufferProperties buffer, int property, int source) {
|
|
||||||
System.out.println("EAX has been disapled for this release, due to \"issues\" with the implementation");
|
|
||||||
//CoreEAX.eaxGet(CoreEAX.BUFFER_GUID, property, source, buffer.eaxBufferProperties, EAX.getSizeOfProperty(CoreEAX.BUFFER_GUID, property));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Retrieves the size of the property
|
|
||||||
*
|
|
||||||
* @param guid Listener or Source guid
|
|
||||||
* @param property Property to determine size of
|
|
||||||
* @return size of property
|
|
||||||
*/
|
|
||||||
private static int getSizeOfProperty(int guid, int property) {
|
|
||||||
if (guid == CoreEAX.LISTENER_GUID) {
|
|
||||||
switch(property) {
|
|
||||||
case EAXListenerProperties.EAXLISTENER_NONE:
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
/* long */
|
|
||||||
case EAXListenerProperties.EAXLISTENER_ROOM:
|
|
||||||
case EAXListenerProperties.EAXLISTENER_ROOMHF:
|
|
||||||
case EAXListenerProperties.EAXLISTENER_REFLECTIONS:
|
|
||||||
case EAXListenerProperties.EAXLISTENER_REVERB:
|
|
||||||
|
|
||||||
/* float */
|
|
||||||
case EAXListenerProperties.EAXLISTENER_ROOMROLLOFFFACTOR:
|
|
||||||
case EAXListenerProperties.EAXLISTENER_DECAYTIME:
|
|
||||||
case EAXListenerProperties.EAXLISTENER_DECAYHFRATIO:
|
|
||||||
case EAXListenerProperties.EAXLISTENER_REFLECTIONSDELAY:
|
|
||||||
case EAXListenerProperties.EAXLISTENER_REVERBDELAY:
|
|
||||||
case EAXListenerProperties.EAXLISTENER_ENVIRONMENTSIZE:
|
|
||||||
case EAXListenerProperties.EAXLISTENER_ENVIRONMENTDIFFUSION:
|
|
||||||
case EAXListenerProperties.EAXLISTENER_AIRABSORPTIONHF:
|
|
||||||
|
|
||||||
/* unsigned long */
|
|
||||||
case EAXListenerProperties.EAXLISTENER_ENVIRONMENT:
|
|
||||||
case EAXListenerProperties.EAXLISTENER_FLAGS:
|
|
||||||
return 4;
|
|
||||||
|
|
||||||
case EAXListenerProperties.EAXLISTENER_ALLPARAMETERS:
|
|
||||||
return EAXListenerProperties.EAXLISTENERPROPERTIES_SIZE;
|
|
||||||
|
|
||||||
default:
|
|
||||||
throw new IllegalArgumentException("No such property '" + property + "'");
|
|
||||||
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
switch(property) {
|
|
||||||
case EAXBufferProperties.EAXBUFFER_NONE:
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
/* long */
|
|
||||||
case EAXBufferProperties.EAXBUFFER_DIRECT:
|
|
||||||
case EAXBufferProperties.EAXBUFFER_DIRECTHF:
|
|
||||||
case EAXBufferProperties.EAXBUFFER_ROOM:
|
|
||||||
case EAXBufferProperties.EAXBUFFER_ROOMHF:
|
|
||||||
case EAXBufferProperties.EAXBUFFER_OBSTRUCTION:
|
|
||||||
case EAXBufferProperties.EAXBUFFER_OCCLUSION:
|
|
||||||
case EAXBufferProperties.EAXBUFFER_OUTSIDEVOLUMEHF:
|
|
||||||
|
|
||||||
/* float */
|
|
||||||
case EAXBufferProperties.EAXBUFFER_ROOMROLLOFFFACTOR:
|
|
||||||
case EAXBufferProperties.EAXBUFFER_OBSTRUCTIONLFRATIO:
|
|
||||||
case EAXBufferProperties.EAXBUFFER_OCCLUSIONLFRATIO:
|
|
||||||
case EAXBufferProperties.EAXBUFFER_OCCLUSIONROOMRATIO:
|
|
||||||
case EAXBufferProperties.EAXBUFFER_AIRABSORPTIONFACTOR:
|
|
||||||
|
|
||||||
/* unsigned long */
|
|
||||||
case EAXBufferProperties.EAXBUFFER_FLAGS:
|
|
||||||
return 4;
|
|
||||||
|
|
||||||
case EAXBufferProperties.EAXBUFFER_ALLPARAMETERS:
|
|
||||||
return EAXBufferProperties.EAXBUFFERPROPERTIES_SIZE;
|
|
||||||
|
|
||||||
default:
|
|
||||||
throw new IllegalArgumentException("No such property '" + property + "'");
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
|
@ -46,399 +46,474 @@ import java.nio.ByteOrder;
|
||||||
*/
|
*/
|
||||||
public class EAXBufferProperties {
|
public class EAXBufferProperties {
|
||||||
|
|
||||||
/** ByteBuffer representing EAXBUFFERPROPERTIES */
|
/** ByteBuffer representing EAXBUFFERPROPERTIES */
|
||||||
protected ByteBuffer eaxBufferProperties;
|
protected ByteBuffer eaxBufferProperties;
|
||||||
|
|
||||||
/** size needed by ByteBuffer to contain EAXBUFFERPROPERTIES */
|
/** size needed by ByteBuffer to contain EAXBUFFERPROPERTIES */
|
||||||
protected static int EAXBUFFERPROPERTIES_SIZE;
|
protected static int EAXBUFFERPROPERTIES_SIZE;
|
||||||
|
|
||||||
/** direct path level offset */
|
/** direct path level offset */
|
||||||
protected static int direct_offset;
|
protected static int direct_offset;
|
||||||
|
|
||||||
/** direct path level at high frequencies offset */
|
/** direct path level at high frequencies offset */
|
||||||
protected static int directHF_offset;
|
protected static int directHF_offset;
|
||||||
|
|
||||||
/** room effect level offset */
|
/** room effect level offset */
|
||||||
protected static int room_offset;
|
protected static int room_offset;
|
||||||
|
|
||||||
/** room effect level at high frequencies offset */
|
/** room effect level at high frequencies offset */
|
||||||
protected static int roomHF_offset;
|
protected static int roomHF_offset;
|
||||||
|
|
||||||
/** like DS3D flRolloffFactor but for room effect offset */
|
/** like DS3D flRolloffFactor but for room effect offset */
|
||||||
protected static int roomRolloffFactor_offset;
|
protected static int roomRolloffFactor_offset;
|
||||||
|
|
||||||
/** main obstruction control (attenuation at high frequencies) offset */
|
/** main obstruction control (attenuation at high frequencies) offset */
|
||||||
protected static int obstruction_offset;
|
protected static int obstruction_offset;
|
||||||
|
|
||||||
/** obstruction low-frequency level re. main control offset */
|
/** obstruction low-frequency level re. main control offset */
|
||||||
protected static int obstructionLFRatio_offset;
|
protected static int obstructionLFRatio_offset;
|
||||||
|
|
||||||
/** main occlusion control (attenuation at high frequencies) offset */
|
/** main occlusion control (attenuation at high frequencies) offset */
|
||||||
protected static int occlusion_offset;
|
protected static int occlusion_offset;
|
||||||
|
|
||||||
/** occlusion low-frequency level re. main control offset */
|
/** occlusion low-frequency level re. main control offset */
|
||||||
protected static int occlusionLFRatio_offset;
|
protected static int occlusionLFRatio_offset;
|
||||||
|
|
||||||
/** occlusion room effect level re. main control offset */
|
/** occlusion room effect level re. main control offset */
|
||||||
protected static int occlusionRoomRatio_offset;
|
protected static int occlusionRoomRatio_offset;
|
||||||
|
|
||||||
/** outside sound cone level at high frequencies offset */
|
/** outside sound cone level at high frequencies offset */
|
||||||
protected static int outsideVolumeHF_offset;
|
protected static int outsideVolumeHF_offset;
|
||||||
|
|
||||||
/** multiplies DSPROPERTY_EAXLISTENER_AIRABSORPTIONHF offset */
|
/** multiplies DSPROPERTY_EAXLISTENER_AIRABSORPTIONHF offset */
|
||||||
protected static int airAbsorptionFactor_offset;
|
protected static int airAbsorptionFactor_offset;
|
||||||
|
|
||||||
/** modifies the behavior of properties offset */
|
/** modifies the behavior of properties offset */
|
||||||
protected static int flags_offset;
|
protected static int flags_offset;
|
||||||
|
|
||||||
public static final int EAXBUFFER_NONE = 0;
|
public static final int EAXBUFFER_NONE = 0;
|
||||||
public static final int EAXBUFFER_ALLPARAMETERS = 1;
|
public static final int EAXBUFFER_ALLPARAMETERS = 1;
|
||||||
public static final int EAXBUFFER_DIRECT = 2;
|
public static final int EAXBUFFER_DIRECT = 2;
|
||||||
public static final int EAXBUFFER_DIRECTHF = 3;
|
public static final int EAXBUFFER_DIRECTHF = 3;
|
||||||
public static final int EAXBUFFER_ROOM = 4;
|
public static final int EAXBUFFER_ROOM = 4;
|
||||||
public static final int EAXBUFFER_ROOMHF = 5;
|
public static final int EAXBUFFER_ROOMHF = 5;
|
||||||
public static final int EAXBUFFER_ROOMROLLOFFFACTOR = 6;
|
public static final int EAXBUFFER_ROOMROLLOFFFACTOR = 6;
|
||||||
public static final int EAXBUFFER_OBSTRUCTION = 7;
|
public static final int EAXBUFFER_OBSTRUCTION = 7;
|
||||||
public static final int EAXBUFFER_OBSTRUCTIONLFRATIO = 8;
|
public static final int EAXBUFFER_OBSTRUCTIONLFRATIO = 8;
|
||||||
public static final int EAXBUFFER_OCCLUSION = 9;
|
public static final int EAXBUFFER_OCCLUSION = 9;
|
||||||
public static final int EAXBUFFER_OCCLUSIONLFRATIO = 10;
|
public static final int EAXBUFFER_OCCLUSIONLFRATIO = 10;
|
||||||
public static final int EAXBUFFER_OCCLUSIONROOMRATIO = 11;
|
public static final int EAXBUFFER_OCCLUSIONROOMRATIO = 11;
|
||||||
public static final int EAXBUFFER_OUTSIDEVOLUMEHF = 12;
|
public static final int EAXBUFFER_OUTSIDEVOLUMEHF = 12;
|
||||||
public static final int EAXBUFFER_AIRABSORPTIONFACTOR = 13;
|
public static final int EAXBUFFER_AIRABSORPTIONFACTOR = 13;
|
||||||
public static final int EAXBUFFER_FLAGS = 14;
|
public static final int EAXBUFFER_FLAGS = 14;
|
||||||
|
|
||||||
/** changes take effect immediately */
|
/** changes take effect immediately */
|
||||||
public static final int EAXBUFFER_IMMEDIATE = 0x00000000;
|
public static final int EAXBUFFER_IMMEDIATE = 0x00000000;
|
||||||
|
|
||||||
/** changes take effect later */
|
/** changes take effect later */
|
||||||
public static final int EAXBUFFER_DEFERRED = 0x80000000;
|
public static final int EAXBUFFER_DEFERRED = 0x80000000;
|
||||||
public static final int EAXBUFFER_COMMITDEFERREDSETTINGS = (EAXBUFFER_NONE | EAXBUFFER_IMMEDIATE);
|
public static final int EAXBUFFER_COMMITDEFERREDSETTINGS =
|
||||||
|
(EAXBUFFER_NONE | EAXBUFFER_IMMEDIATE);
|
||||||
|
|
||||||
/** affects DSPROPERTY_EAXBUFFER_DIRECTHF */
|
/** affects DSPROPERTY_EAXBUFFER_DIRECTHF */
|
||||||
public static final int EAXBUFFER_FLAGS_DIRECTHFAUTO = 0x00000001;
|
public static final int EAXBUFFER_FLAGS_DIRECTHFAUTO = 0x00000001;
|
||||||
|
|
||||||
/** affects DSPROPERTY_EAXBUFFER_ROOM */
|
/** affects DSPROPERTY_EAXBUFFER_ROOM */
|
||||||
public static final int EAXBUFFER_FLAGS_ROOMAUTO = 0x00000002;
|
public static final int EAXBUFFER_FLAGS_ROOMAUTO = 0x00000002;
|
||||||
|
|
||||||
/** affects DSPROPERTY_EAXBUFFER_ROOMHF */
|
/** affects DSPROPERTY_EAXBUFFER_ROOMHF */
|
||||||
public static final int EAXBUFFER_FLAGS_ROOMHFAUTO = 0x00000004;
|
public static final int EAXBUFFER_FLAGS_ROOMHFAUTO = 0x00000004;
|
||||||
|
|
||||||
/** reserved future use */
|
/** reserved future use */
|
||||||
public static final int EAXBUFFER_FLAGS_RESERVED = 0xFFFFFFF8;
|
public static final int EAXBUFFER_FLAGS_RESERVED = 0xFFFFFFF8;
|
||||||
|
|
||||||
// property ranges and defaults:
|
// property ranges and defaults:
|
||||||
|
|
||||||
public static final int EAXBUFFER_MINDIRECT = -10000;
|
public static final int EAXBUFFER_MINDIRECT = -10000;
|
||||||
public static final int EAXBUFFER_MAXDIRECT = 1000;
|
public static final int EAXBUFFER_MAXDIRECT = 1000;
|
||||||
public static final int EAXBUFFER_DEFAULTDIRECT = 0;
|
public static final int EAXBUFFER_DEFAULTDIRECT = 0;
|
||||||
|
|
||||||
public static final int EAXBUFFER_MINDIRECTHF = -10000;
|
public static final int EAXBUFFER_MINDIRECTHF = -10000;
|
||||||
public static final int EAXBUFFER_MAXDIRECTHF = 0;
|
public static final int EAXBUFFER_MAXDIRECTHF = 0;
|
||||||
public static final int EAXBUFFER_DEFAULTDIRECTHF = 0;
|
public static final int EAXBUFFER_DEFAULTDIRECTHF = 0;
|
||||||
|
|
||||||
public static final int EAXBUFFER_MINROOM = -10000;
|
public static final int EAXBUFFER_MINROOM = -10000;
|
||||||
public static final int EAXBUFFER_MAXROOM = 1000;
|
public static final int EAXBUFFER_MAXROOM = 1000;
|
||||||
public static final int EAXBUFFER_DEFAULTROOM = 0;
|
public static final int EAXBUFFER_DEFAULTROOM = 0;
|
||||||
|
|
||||||
public static final int EAXBUFFER_MINROOMHF = -10000;
|
public static final int EAXBUFFER_MINROOMHF = -10000;
|
||||||
public static final int EAXBUFFER_MAXROOMHF = 0;
|
public static final int EAXBUFFER_MAXROOMHF = 0;
|
||||||
public static final int EAXBUFFER_DEFAULTROOMHF = 0;
|
public static final int EAXBUFFER_DEFAULTROOMHF = 0;
|
||||||
|
|
||||||
public static final float EAXBUFFER_MINROOMROLLOFFFACTOR = 0.0f;
|
public static final float EAXBUFFER_MINROOMROLLOFFFACTOR = 0.0f;
|
||||||
public static final float EAXBUFFER_MAXROOMROLLOFFFACTOR = 10.f;
|
public static final float EAXBUFFER_MAXROOMROLLOFFFACTOR = 10.f;
|
||||||
public static final float EAXBUFFER_DEFAULTROOMROLLOFFFACTOR = 0.0f;
|
public static final float EAXBUFFER_DEFAULTROOMROLLOFFFACTOR = 0.0f;
|
||||||
|
|
||||||
public static final int EAXBUFFER_MINOBSTRUCTION = -10000;
|
public static final int EAXBUFFER_MINOBSTRUCTION = -10000;
|
||||||
public static final int EAXBUFFER_MAXOBSTRUCTION = 0;
|
public static final int EAXBUFFER_MAXOBSTRUCTION = 0;
|
||||||
public static final int EAXBUFFER_DEFAULTOBSTRUCTION = 0;
|
public static final int EAXBUFFER_DEFAULTOBSTRUCTION = 0;
|
||||||
|
|
||||||
public static final float EAXBUFFER_MINOBSTRUCTIONLFRATIO = 0.0f;
|
public static final float EAXBUFFER_MINOBSTRUCTIONLFRATIO = 0.0f;
|
||||||
public static final float EAXBUFFER_MAXOBSTRUCTIONLFRATIO = 1.0f;
|
public static final float EAXBUFFER_MAXOBSTRUCTIONLFRATIO = 1.0f;
|
||||||
public static final float EAXBUFFER_DEFAULTOBSTRUCTIONLFRATIO = 0.0f;
|
public static final float EAXBUFFER_DEFAULTOBSTRUCTIONLFRATIO = 0.0f;
|
||||||
|
|
||||||
public static final int EAXBUFFER_MINOCCLUSION = -10000;
|
public static final int EAXBUFFER_MINOCCLUSION = -10000;
|
||||||
public static final int EAXBUFFER_MAXOCCLUSION = 0;
|
public static final int EAXBUFFER_MAXOCCLUSION = 0;
|
||||||
public static final int EAXBUFFER_DEFAULTOCCLUSION = 0;
|
public static final int EAXBUFFER_DEFAULTOCCLUSION = 0;
|
||||||
|
|
||||||
public static final float EAXBUFFER_MINOCCLUSIONLFRATIO = 0.0f;
|
public static final float EAXBUFFER_MINOCCLUSIONLFRATIO = 0.0f;
|
||||||
public static final float EAXBUFFER_MAXOCCLUSIONLFRATIO = 1.0f;
|
public static final float EAXBUFFER_MAXOCCLUSIONLFRATIO = 1.0f;
|
||||||
public static final float EAXBUFFER_DEFAULTOCCLUSIONLFRATIO = 0.25f;
|
public static final float EAXBUFFER_DEFAULTOCCLUSIONLFRATIO = 0.25f;
|
||||||
|
|
||||||
public static final float EAXBUFFER_MINOCCLUSIONROOMRATIO = 0.0f;
|
public static final float EAXBUFFER_MINOCCLUSIONROOMRATIO = 0.0f;
|
||||||
public static final float EAXBUFFER_MAXOCCLUSIONROOMRATIO = 10.0f;
|
public static final float EAXBUFFER_MAXOCCLUSIONROOMRATIO = 10.0f;
|
||||||
public static final float EAXBUFFER_DEFAULTOCCLUSIONROOMRATIO = 0.5f;
|
public static final float EAXBUFFER_DEFAULTOCCLUSIONROOMRATIO = 0.5f;
|
||||||
|
|
||||||
public static final int EAXBUFFER_MINOUTSIDEVOLUMEHF = -10000;
|
public static final int EAXBUFFER_MINOUTSIDEVOLUMEHF = -10000;
|
||||||
public static final int EAXBUFFER_MAXOUTSIDEVOLUMEHF = 0;
|
public static final int EAXBUFFER_MAXOUTSIDEVOLUMEHF = 0;
|
||||||
public static final int EAXBUFFER_DEFAULTOUTSIDEVOLUMEHF = 0;
|
public static final int EAXBUFFER_DEFAULTOUTSIDEVOLUMEHF = 0;
|
||||||
|
|
||||||
public static final float EAXBUFFER_MINAIRABSORPTIONFACTOR = 0.0f;
|
public static final float EAXBUFFER_MINAIRABSORPTIONFACTOR = 0.0f;
|
||||||
public static final float EAXBUFFER_MAXAIRABSORPTIONFACTOR = 10.0f;
|
public static final float EAXBUFFER_MAXAIRABSORPTIONFACTOR = 10.0f;
|
||||||
public static final float EAXBUFFER_DEFAULTAIRABSORPTIONFACTOR = 1.0f;
|
public static final float EAXBUFFER_DEFAULTAIRABSORPTIONFACTOR = 1.0f;
|
||||||
|
|
||||||
public static final int EAXBUFFER_DEFAULTFLAGS = ( EAXBUFFER_FLAGS_DIRECTHFAUTO |
|
public static final int EAXBUFFER_DEFAULTFLAGS =
|
||||||
EAXBUFFER_FLAGS_ROOMAUTO |
|
(EAXBUFFER_FLAGS_DIRECTHFAUTO
|
||||||
EAXBUFFER_FLAGS_ROOMHFAUTO);
|
| EAXBUFFER_FLAGS_ROOMAUTO
|
||||||
|
| EAXBUFFER_FLAGS_ROOMHFAUTO);
|
||||||
|
|
||||||
static {
|
static {
|
||||||
System.loadLibrary(org.lwjgl.Sys.getLibraryName());
|
System.loadLibrary(org.lwjgl.Sys.getLibraryName());
|
||||||
EAXBUFFERPROPERTIES_SIZE = sizeOfEaxBufferProperties();
|
EAXBUFFERPROPERTIES_SIZE = sizeOfEaxBufferProperties();
|
||||||
assignOffsets();
|
assignOffsets();
|
||||||
}
|
}
|
||||||
|
|
||||||
public EAXBufferProperties() {
|
public EAXBufferProperties() {
|
||||||
eaxBufferProperties = ByteBuffer.allocateDirect(EAXBUFFERPROPERTIES_SIZE);
|
eaxBufferProperties = ByteBuffer.allocateDirect(EAXBUFFERPROPERTIES_SIZE);
|
||||||
eaxBufferProperties.order(ByteOrder.nativeOrder());
|
eaxBufferProperties.order(ByteOrder.nativeOrder());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retireves the direct path level
|
* Sets an EAX Value
|
||||||
|
*
|
||||||
|
* @param property property being queried
|
||||||
|
* @param source the source to be queried
|
||||||
|
*/
|
||||||
|
public void eaxSet(int property, int source) {
|
||||||
|
EAX.eaxSet(
|
||||||
|
CoreEAX.BUFFER_GUID,
|
||||||
|
property,
|
||||||
|
source,
|
||||||
|
eaxBufferProperties,
|
||||||
|
EAXBUFFERPROPERTIES_SIZE);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets an EAX Value
|
||||||
|
*
|
||||||
|
* @param property property being queried
|
||||||
|
* @param source the source to be queried
|
||||||
|
*/
|
||||||
|
public void eaxGet(int property, int source) {
|
||||||
|
EAX.eaxGet(
|
||||||
|
CoreEAX.BUFFER_GUID,
|
||||||
|
property,
|
||||||
|
source,
|
||||||
|
eaxBufferProperties,
|
||||||
|
EAXBUFFERPROPERTIES_SIZE);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retireves the direct path level
|
||||||
|
*
|
||||||
|
* @return direct path level
|
||||||
|
*/
|
||||||
|
public int getDirect() {
|
||||||
|
return eaxBufferProperties.getInt(direct_offset);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the direct path level
|
||||||
|
*
|
||||||
|
* @param direct direct path level to set to
|
||||||
|
*/
|
||||||
|
public void setDirect(int direct) {
|
||||||
|
eaxBufferProperties.putInt(direct_offset, direct);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retireves the direct path level at high frequencies
|
||||||
|
*
|
||||||
|
* @return direct path level at high frequencies
|
||||||
|
*/
|
||||||
|
public int getDirectHF() {
|
||||||
|
return eaxBufferProperties.getInt(directHF_offset);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the direct path level at high frequencies
|
||||||
|
*
|
||||||
|
* @param directHF direct path level at high frequencies to set to
|
||||||
|
*/
|
||||||
|
public void setDirectHF(int directHF) {
|
||||||
|
eaxBufferProperties.putInt(directHF_offset, directHF);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retireves the room effect level
|
||||||
|
*
|
||||||
|
* @return room effect level
|
||||||
|
*/
|
||||||
|
public int getRoom() {
|
||||||
|
return eaxBufferProperties.getInt(room_offset);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the room effect level
|
||||||
|
*
|
||||||
|
* @param room room effect level to set to
|
||||||
|
*/
|
||||||
|
public void setRoom(int room) {
|
||||||
|
eaxBufferProperties.putInt(room_offset, room);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retireves the room effect level at high frequencies
|
||||||
|
*
|
||||||
|
* @return room effect level at high frequencies
|
||||||
|
*/
|
||||||
|
public int getRoomHF() {
|
||||||
|
return eaxBufferProperties.getInt(roomHF_offset);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the room effect level at high frequencies
|
||||||
|
*
|
||||||
|
* @param roomHF room effect level at high frequencies to set to
|
||||||
|
*/
|
||||||
|
public void setRoomHF(int roomHF) {
|
||||||
|
eaxBufferProperties.putInt(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 int getObstruction() {
|
||||||
|
return eaxBufferProperties.getInt(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(int obstruction) {
|
||||||
|
eaxBufferProperties.putInt(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 int getOcclusion() {
|
||||||
|
return eaxBufferProperties.getInt(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(int occlusion) {
|
||||||
|
eaxBufferProperties.putInt(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 int getOutsideVolumeHF() {
|
||||||
|
return eaxBufferProperties.getInt(outsideVolumeHF_offset);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the OutsideVolumeHF
|
||||||
|
*
|
||||||
|
* @param outsideVolumeHF OutsideVolumeHF to set to
|
||||||
|
*/
|
||||||
|
public void setOutsideVolumeHF(int outsideVolumeHF) {
|
||||||
|
eaxBufferProperties.putInt(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 int getFlags() {
|
||||||
|
return eaxBufferProperties.getInt(flags_offset);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the modifier for behavior of properties
|
||||||
|
*
|
||||||
|
* @param flags modifier for behavior of properties to set to
|
||||||
|
*/
|
||||||
|
public void setFlags(int flags) {
|
||||||
|
eaxBufferProperties.putInt(flags_offset, flags);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves the size of the containing ByteBuffer
|
||||||
|
*/
|
||||||
|
public static 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();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves the size of the property
|
||||||
*
|
*
|
||||||
* @return direct path level
|
* @param property Property to determine size of
|
||||||
|
* @return size of property
|
||||||
*/
|
*/
|
||||||
public int getDirect() {
|
private static int getSizeOfProperty(int property) {
|
||||||
return eaxBufferProperties.getInt(direct_offset);
|
switch (property) {
|
||||||
|
case EAXBufferProperties.EAXBUFFER_NONE :
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
/* long */
|
||||||
|
case EAXBufferProperties.EAXBUFFER_DIRECT :
|
||||||
|
case EAXBufferProperties.EAXBUFFER_DIRECTHF :
|
||||||
|
case EAXBufferProperties.EAXBUFFER_ROOM :
|
||||||
|
case EAXBufferProperties.EAXBUFFER_ROOMHF :
|
||||||
|
case EAXBufferProperties.EAXBUFFER_OBSTRUCTION :
|
||||||
|
case EAXBufferProperties.EAXBUFFER_OCCLUSION :
|
||||||
|
case EAXBufferProperties.EAXBUFFER_OUTSIDEVOLUMEHF :
|
||||||
|
|
||||||
|
/* float */
|
||||||
|
case EAXBufferProperties.EAXBUFFER_ROOMROLLOFFFACTOR :
|
||||||
|
case EAXBufferProperties.EAXBUFFER_OBSTRUCTIONLFRATIO :
|
||||||
|
case EAXBufferProperties.EAXBUFFER_OCCLUSIONLFRATIO :
|
||||||
|
case EAXBufferProperties.EAXBUFFER_OCCLUSIONROOMRATIO :
|
||||||
|
case EAXBufferProperties.EAXBUFFER_AIRABSORPTIONFACTOR :
|
||||||
|
|
||||||
|
/* unsigned long */
|
||||||
|
case EAXBufferProperties.EAXBUFFER_FLAGS :
|
||||||
|
return 4;
|
||||||
|
|
||||||
|
case EAXBufferProperties.EAXBUFFER_ALLPARAMETERS :
|
||||||
|
return EAXBufferProperties.EAXBUFFERPROPERTIES_SIZE;
|
||||||
|
|
||||||
|
default :
|
||||||
|
throw new IllegalArgumentException(
|
||||||
|
"No such property '" + property + "'");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
/**
|
|
||||||
* Sets the direct path level
|
|
||||||
*
|
|
||||||
* @param direct direct path level to set to
|
|
||||||
*/
|
|
||||||
public void setDirect(int direct) {
|
|
||||||
eaxBufferProperties.putInt(direct_offset, direct);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Retireves the direct path level at high frequencies
|
|
||||||
*
|
|
||||||
* @return direct path level at high frequencies
|
|
||||||
*/
|
|
||||||
public int getDirectHF() {
|
|
||||||
return eaxBufferProperties.getInt(directHF_offset);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the direct path level at high frequencies
|
|
||||||
*
|
|
||||||
* @param directHF direct path level at high frequencies to set to
|
|
||||||
*/
|
|
||||||
public void setDirectHF(int directHF) {
|
|
||||||
eaxBufferProperties.putInt(directHF_offset, directHF);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Retireves the room effect level
|
|
||||||
*
|
|
||||||
* @return room effect level
|
|
||||||
*/
|
|
||||||
public int getRoom() {
|
|
||||||
return eaxBufferProperties.getInt(room_offset);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the room effect level
|
|
||||||
*
|
|
||||||
* @param room room effect level to set to
|
|
||||||
*/
|
|
||||||
public void setRoom(int room) {
|
|
||||||
eaxBufferProperties.putInt(room_offset, room);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Retireves the room effect level at high frequencies
|
|
||||||
*
|
|
||||||
* @return room effect level at high frequencies
|
|
||||||
*/
|
|
||||||
public int getRoomHF() {
|
|
||||||
return eaxBufferProperties.getInt(roomHF_offset);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the room effect level at high frequencies
|
|
||||||
*
|
|
||||||
* @param roomHF room effect level at high frequencies to set to
|
|
||||||
*/
|
|
||||||
public void setRoomHF(int roomHF) {
|
|
||||||
eaxBufferProperties.putInt(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 int getObstruction() {
|
|
||||||
return eaxBufferProperties.getInt(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(int obstruction) {
|
|
||||||
eaxBufferProperties.putInt(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 int getOcclusion() {
|
|
||||||
return eaxBufferProperties.getInt(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(int occlusion) {
|
|
||||||
eaxBufferProperties.putInt(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 int getOutsideVolumeHF() {
|
|
||||||
return eaxBufferProperties.getInt(outsideVolumeHF_offset);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the OutsideVolumeHF
|
|
||||||
*
|
|
||||||
* @param outsideVolumeHF OutsideVolumeHF to set to
|
|
||||||
*/
|
|
||||||
public void setOutsideVolumeHF(int outsideVolumeHF) {
|
|
||||||
eaxBufferProperties.putInt(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 int getFlags() {
|
|
||||||
return eaxBufferProperties.getInt(flags_offset);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the modifier for behavior of properties
|
|
||||||
*
|
|
||||||
* @param flags modifier for behavior of properties to set to
|
|
||||||
*/
|
|
||||||
public void setFlags(int flags) {
|
|
||||||
eaxBufferProperties.putInt(flags_offset, flags);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Retrieves the size of the containing ByteBuffer
|
|
||||||
*/
|
|
||||||
public static 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();
|
|
||||||
}
|
}
|
|
@ -44,436 +44,473 @@ import java.nio.ByteOrder;
|
||||||
*/
|
*/
|
||||||
public class EAXListenerProperties {
|
public class EAXListenerProperties {
|
||||||
|
|
||||||
/** ByteBuffer representing EAXLISTENERPROPERTIES */
|
/** ByteBuffer representing EAXLISTENERPROPERTIES */
|
||||||
protected ByteBuffer eaxListenerProperties;
|
protected ByteBuffer eaxListenerProperties;
|
||||||
|
|
||||||
/** size needed by ByteBuffer to contain EAXLISTENERPROPERTIES */
|
/** size needed by ByteBuffer to contain EAXLISTENERPROPERTIES */
|
||||||
protected static int EAXLISTENERPROPERTIES_SIZE;
|
protected static int EAXLISTENERPROPERTIES_SIZE;
|
||||||
|
|
||||||
/** room effect level offset */
|
/** room effect level offset */
|
||||||
protected static int room_offset;
|
protected static int room_offset;
|
||||||
|
|
||||||
/** room effect level at high frequencies offset */
|
/** room effect level at high frequencies offset */
|
||||||
protected static int roomHF_offset;
|
protected static int roomHF_offset;
|
||||||
|
|
||||||
/**like DS3D flRolloffFactor but for room effect offset */
|
/**like DS3D flRolloffFactor but for room effect offset */
|
||||||
protected static int roomRolloffFactor_offset;
|
protected static int roomRolloffFactor_offset;
|
||||||
|
|
||||||
/** reverberation decay time at low frequencies offset */
|
/** reverberation decay time at low frequencies offset */
|
||||||
protected static int decayTime_offset;
|
protected static int decayTime_offset;
|
||||||
|
|
||||||
/** high-frequency to low-frequency decay time ratio offset */
|
/** high-frequency to low-frequency decay time ratio offset */
|
||||||
protected static int decayHFRatio_offset;
|
protected static int decayHFRatio_offset;
|
||||||
|
|
||||||
/** early reflections level relative to room effect offset */
|
/** early reflections level relative to room effect offset */
|
||||||
protected static int reflections_offset;
|
protected static int reflections_offset;
|
||||||
|
|
||||||
/** initial reflection delay time offset */
|
/** initial reflection delay time offset */
|
||||||
protected static int reflectionsDelay_offset;
|
protected static int reflectionsDelay_offset;
|
||||||
|
|
||||||
/** late reverberation level relative to room effect offset */
|
/** late reverberation level relative to room effect offset */
|
||||||
protected static int reverb_offset;
|
protected static int reverb_offset;
|
||||||
|
|
||||||
/** late reverberation delay time relative to initial reflection offset */
|
/** late reverberation delay time relative to initial reflection offset */
|
||||||
protected static int reverbDelay_offset;
|
protected static int reverbDelay_offset;
|
||||||
|
|
||||||
/** sets all listener properties offset */
|
/** sets all listener properties offset */
|
||||||
protected static int environment_offset;
|
protected static int environment_offset;
|
||||||
|
|
||||||
/** environment size in meters offset */
|
/** environment size in meters offset */
|
||||||
protected static int environmentSize_offset;
|
protected static int environmentSize_offset;
|
||||||
|
|
||||||
/** environment diffusion offset */
|
/** environment diffusion offset */
|
||||||
protected static int environmentDiffusion_offset;
|
protected static int environmentDiffusion_offset;
|
||||||
|
|
||||||
/** change in level per meter at 5 kHz offset */
|
/** change in level per meter at 5 kHz offset */
|
||||||
protected static int airAbsorptionHF_offset;
|
protected static int airAbsorptionHF_offset;
|
||||||
|
|
||||||
/** modifies the behavior of properties offset */
|
/** modifies the behavior of properties offset */
|
||||||
protected static int flags_offset;
|
protected static int flags_offset;
|
||||||
|
|
||||||
public static final int EAXLISTENER_NONE = 0;
|
public static final int EAXLISTENER_NONE = 0;
|
||||||
public static final int EAXLISTENER_ALLPARAMETERS = 1;
|
public static final int EAXLISTENER_ALLPARAMETERS = 1;
|
||||||
public static final int EAXLISTENER_ROOM = 2;
|
public static final int EAXLISTENER_ROOM = 2;
|
||||||
public static final int EAXLISTENER_ROOMHF = 3;
|
public static final int EAXLISTENER_ROOMHF = 3;
|
||||||
public static final int EAXLISTENER_ROOMROLLOFFFACTOR = 4;
|
public static final int EAXLISTENER_ROOMROLLOFFFACTOR = 4;
|
||||||
public static final int EAXLISTENER_DECAYTIME = 5;
|
public static final int EAXLISTENER_DECAYTIME = 5;
|
||||||
public static final int EAXLISTENER_DECAYHFRATIO = 6;
|
public static final int EAXLISTENER_DECAYHFRATIO = 6;
|
||||||
public static final int EAXLISTENER_REFLECTIONS = 7;
|
public static final int EAXLISTENER_REFLECTIONS = 7;
|
||||||
public static final int EAXLISTENER_REFLECTIONSDELAY = 8;
|
public static final int EAXLISTENER_REFLECTIONSDELAY = 8;
|
||||||
public static final int EAXLISTENER_REVERB = 9;
|
public static final int EAXLISTENER_REVERB = 9;
|
||||||
public static final int EAXLISTENER_REVERBDELAY = 10;
|
public static final int EAXLISTENER_REVERBDELAY = 10;
|
||||||
public static final int EAXLISTENER_ENVIRONMENT = 11;
|
public static final int EAXLISTENER_ENVIRONMENT = 11;
|
||||||
public static final int EAXLISTENER_ENVIRONMENTSIZE = 12;
|
public static final int EAXLISTENER_ENVIRONMENTSIZE = 12;
|
||||||
public static final int EAXLISTENER_ENVIRONMENTDIFFUSION = 13;
|
public static final int EAXLISTENER_ENVIRONMENTDIFFUSION = 13;
|
||||||
public static final int EAXLISTENER_AIRABSORPTIONHF = 14;
|
public static final int EAXLISTENER_AIRABSORPTIONHF = 14;
|
||||||
public static final int EAXLISTENER_FLAGS = 15;
|
public static final int EAXLISTENER_FLAGS = 15;
|
||||||
|
|
||||||
/** changes take effect immediately */
|
/** changes take effect immediately */
|
||||||
public static final int EAXLISTENER_IMMEDIATE = 0x00000000;
|
public static final int EAXLISTENER_IMMEDIATE = 0x00000000;
|
||||||
|
|
||||||
|
/** changes take effect later */
|
||||||
|
public static final int EAXLISTENER_DEFERRED = 0x80000000;
|
||||||
|
|
||||||
/** changes take effect later */
|
public static final int EAXLISTENER_COMMITDEFERREDSETTINGS =
|
||||||
public static final int EAXLISTENER_DEFERRED = 0x80000000;
|
(EAXLISTENER_NONE | EAXLISTENER_IMMEDIATE);
|
||||||
|
|
||||||
public static final int EAXLISTENER_COMMITDEFERREDSETTINGS = (EAXLISTENER_NONE | EAXLISTENER_IMMEDIATE);
|
/** reverberation decay time */
|
||||||
|
public static final int EAXLISTENERFLAGS_DECAYTIMESCALE = 0x00000001;
|
||||||
/** reverberation decay time */
|
|
||||||
public static final int EAXLISTENERFLAGS_DECAYTIMESCALE = 0x00000001;
|
/** reflection level */
|
||||||
|
public static final int EAXLISTENERFLAGS_REFLECTIONSSCALE = 0x00000002;
|
||||||
/** reflection level */
|
|
||||||
public static final int EAXLISTENERFLAGS_REFLECTIONSSCALE = 0x00000002;
|
/** initial reflection delay time */
|
||||||
|
public static final int EAXLISTENERFLAGS_REFLECTIONSDELAYSCALE = 0x00000004;
|
||||||
/** initial reflection delay time */
|
|
||||||
public static final int EAXLISTENERFLAGS_REFLECTIONSDELAYSCALE = 0x00000004;
|
/** reflections level */
|
||||||
|
public static final int EAXLISTENERFLAGS_REVERBSCALE = 0x00000008;
|
||||||
/** reflections level */
|
|
||||||
public static final int EAXLISTENERFLAGS_REVERBSCALE = 0x00000008;
|
/** late reverberation delay time */
|
||||||
|
public static final int EAXLISTENERFLAGS_REVERBDELAYSCALE = 0x00000010;
|
||||||
/** 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;
|
||||||
/** 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;
|
||||||
/** reserved future use */
|
|
||||||
public static final int EAXLISTENERFLAGS_RESERVED = 0xFFFFFFC0;
|
// property ranges and defaults:
|
||||||
|
public static final int EAXLISTENER_MINROOM = -10000;
|
||||||
// property ranges and defaults:
|
public static final int EAXLISTENER_MAXROOM = 0;
|
||||||
public static final int EAXLISTENER_MINROOM = -10000;
|
public static final int EAXLISTENER_DEFAULTROOM = -1000;
|
||||||
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_MINROOMHF = -10000;
|
public static final int EAXLISTENER_DEFAULTROOMHF = -100;
|
||||||
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_MINROOMROLLOFFFACTOR = 0.0f;
|
public static final float EAXLISTENER_DEFAULTROOMROLLOFFFACTOR = 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_MINDECAYTIME = 0.1f;
|
public static final float EAXLISTENER_DEFAULTDECAYTIME = 1.49f;
|
||||||
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_MINDECAYHFRATIO = 0.1f;
|
public static final float EAXLISTENER_DEFAULTDECAYHFRATIO = 0.83f;
|
||||||
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_MINREFLECTIONS = -10000;
|
public static final int EAXLISTENER_DEFAULTREFLECTIONS = -2602;
|
||||||
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_MINREFLECTIONSDELAY = 0.0f;
|
public static final float EAXLISTENER_DEFAULTREFLECTIONSDELAY = 0.007f;
|
||||||
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_MINREVERB = -10000;
|
public static final int EAXLISTENER_DEFAULTREVERB = 200;
|
||||||
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_MINREVERBDELAY = 0.0f;
|
public static final float EAXLISTENER_DEFAULTREVERBDELAY = 0.011f;
|
||||||
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 =
|
||||||
public static final int EAXLISTENER_MINENVIRONMENT = 0;
|
(EAX.EAX_ENVIRONMENT_COUNT - 1);
|
||||||
public static final int EAXLISTENER_MAXENVIRONMENT = (EAX.EAX_ENVIRONMENT_COUNT-1);
|
public static final int EAXLISTENER_DEFAULTENVIRONMENT =
|
||||||
public static final int EAXLISTENER_DEFAULTENVIRONMENT = EAX.EAX_ENVIRONMENT_GENERIC;
|
EAX.EAX_ENVIRONMENT_GENERIC;
|
||||||
|
|
||||||
public static final float EAXLISTENER_MINENVIRONMENTSIZE = 1.0f;
|
public static final float EAXLISTENER_MINENVIRONMENTSIZE = 1.0f;
|
||||||
public static final float EAXLISTENER_MAXENVIRONMENTSIZE = 100.0f;
|
public static final float EAXLISTENER_MAXENVIRONMENTSIZE = 100.0f;
|
||||||
public static final float EAXLISTENER_DEFAULTENVIRONMENTSIZE = 7.5f;
|
public static final float EAXLISTENER_DEFAULTENVIRONMENTSIZE = 7.5f;
|
||||||
|
|
||||||
public static final float EAXLISTENER_MINENVIRONMENTDIFFUSION = 0.0f;
|
public static final float EAXLISTENER_MINENVIRONMENTDIFFUSION = 0.0f;
|
||||||
public static final float EAXLISTENER_MAXENVIRONMENTDIFFUSION = 1.0f;
|
public static final float EAXLISTENER_MAXENVIRONMENTDIFFUSION = 1.0f;
|
||||||
public static final float EAXLISTENER_DEFAULTENVIRONMENTDIFFUSION = 1.0f;
|
public static final float EAXLISTENER_DEFAULTENVIRONMENTDIFFUSION = 1.0f;
|
||||||
|
|
||||||
public static final float EAXLISTENER_MINAIRABSORPTIONHF = -100.0f;
|
public static final float EAXLISTENER_MINAIRABSORPTIONHF = -100.0f;
|
||||||
public static final float EAXLISTENER_MAXAIRABSORPTIONHF = 0.0f;
|
public static final float EAXLISTENER_MAXAIRABSORPTIONHF = 0.0f;
|
||||||
public static final float EAXLISTENER_DEFAULTAIRABSORPTIONHF = -5.0f;
|
public static final float EAXLISTENER_DEFAULTAIRABSORPTIONHF = -5.0f;
|
||||||
|
|
||||||
public static final int EAXLISTENER_DEFAULTFLAGS = ( EAXLISTENERFLAGS_DECAYTIMESCALE |
|
public static final int EAXLISTENER_DEFAULTFLAGS =
|
||||||
EAXLISTENERFLAGS_REFLECTIONSSCALE |
|
(EAXLISTENERFLAGS_DECAYTIMESCALE
|
||||||
EAXLISTENERFLAGS_REFLECTIONSDELAYSCALE |
|
| EAXLISTENERFLAGS_REFLECTIONSSCALE
|
||||||
EAXLISTENERFLAGS_REVERBSCALE |
|
| EAXLISTENERFLAGS_REFLECTIONSDELAYSCALE
|
||||||
EAXLISTENERFLAGS_REVERBDELAYSCALE |
|
| EAXLISTENERFLAGS_REVERBSCALE
|
||||||
EAXLISTENERFLAGS_DECAYHFLIMIT);
|
| EAXLISTENERFLAGS_REVERBDELAYSCALE
|
||||||
static {
|
| EAXLISTENERFLAGS_DECAYHFLIMIT);
|
||||||
System.loadLibrary(org.lwjgl.Sys.getLibraryName());
|
static {
|
||||||
EAXLISTENERPROPERTIES_SIZE = sizeOfEaxListenerProperties();
|
System.loadLibrary(org.lwjgl.Sys.getLibraryName());
|
||||||
assignOffsets();
|
EAXLISTENERPROPERTIES_SIZE = sizeOfEaxListenerProperties();
|
||||||
}
|
assignOffsets();
|
||||||
|
}
|
||||||
public EAXListenerProperties() {
|
|
||||||
eaxListenerProperties = ByteBuffer.allocateDirect(EAXLISTENERPROPERTIES_SIZE);
|
public EAXListenerProperties() {
|
||||||
eaxListenerProperties.order(ByteOrder.nativeOrder());
|
eaxListenerProperties =
|
||||||
}
|
ByteBuffer.allocateDirect(EAXLISTENERPROPERTIES_SIZE);
|
||||||
|
eaxListenerProperties.order(ByteOrder.nativeOrder());
|
||||||
/**
|
}
|
||||||
* Retireves the room effect level
|
|
||||||
*
|
/**
|
||||||
* @return room effect level
|
* Sets an EAX Value
|
||||||
*/
|
*
|
||||||
public int getRoom() {
|
* @param property property being queried
|
||||||
return eaxListenerProperties.getInt(room_offset);
|
* @param source the source to be queried
|
||||||
}
|
*/
|
||||||
|
public void eaxSet(int property, int source) {
|
||||||
/**
|
EAX.eaxSet(
|
||||||
* Sets the room effect level
|
CoreEAX.LISTENER_GUID,
|
||||||
*
|
property,
|
||||||
* @param room room effect level to set to
|
source,
|
||||||
*/
|
eaxListenerProperties,
|
||||||
public void setRoom(int room) {
|
EAXLISTENERPROPERTIES_SIZE);
|
||||||
eaxListenerProperties.putInt(room_offset, room);
|
}
|
||||||
}
|
|
||||||
|
/**
|
||||||
/**
|
* Gets an EAX Value
|
||||||
* Retireves the room effect level at high frequencies
|
*
|
||||||
*
|
* @param property property being queried
|
||||||
* @return room effect level at high frequencies
|
* @param source the source to be queried
|
||||||
*/
|
*/
|
||||||
public int getRoomHF() {
|
public void eaxGet(int property, int source) {
|
||||||
return eaxListenerProperties.getInt(roomHF_offset);
|
EAX.eaxGet(
|
||||||
}
|
CoreEAX.LISTENER_GUID,
|
||||||
|
property,
|
||||||
/**
|
source,
|
||||||
* Sets the room effect level at high frequencies
|
eaxListenerProperties,
|
||||||
*
|
EAXLISTENERPROPERTIES_SIZE);
|
||||||
* @param roomHF room effect level at high frequencies to set to
|
}
|
||||||
*/
|
|
||||||
public void setRoomHF(int roomHF) {
|
/**
|
||||||
eaxListenerProperties.putInt(roomHF_offset, roomHF);
|
* Retireves the room effect level
|
||||||
}
|
*
|
||||||
|
* @return room effect level
|
||||||
/**
|
*/
|
||||||
* Retireves the DS3D flRolloffFactor for room effect
|
public int getRoom() {
|
||||||
*
|
return eaxListenerProperties.getInt(room_offset);
|
||||||
* @return DS3D flRolloffFactor for room effect
|
}
|
||||||
*/
|
|
||||||
public float getRoomRolloffFactor() {
|
/**
|
||||||
return eaxListenerProperties.getFloat(roomRolloffFactor_offset);
|
* Sets the room effect level
|
||||||
}
|
*
|
||||||
|
* @param room room effect level to set to
|
||||||
/**
|
*/
|
||||||
* Sets the DS3D flRolloffFactor for room effect
|
public void setRoom(int room) {
|
||||||
*
|
eaxListenerProperties.putInt(room_offset, room);
|
||||||
* @param roomRolloffFactor DS3D flRolloffFactor for room effect to set to
|
}
|
||||||
*/
|
|
||||||
public void setRoomRolloffFactor(float roomRolloffFactor) {
|
/**
|
||||||
eaxListenerProperties.putFloat(roomRolloffFactor_offset, roomRolloffFactor);
|
* Retireves the room effect level at high frequencies
|
||||||
}
|
*
|
||||||
|
* @return room effect level at high frequencies
|
||||||
/**
|
*/
|
||||||
* Retireves the reverberation decay time at low frequencies
|
public int getRoomHF() {
|
||||||
*
|
return eaxListenerProperties.getInt(roomHF_offset);
|
||||||
* @return reverberation decay time at low frequencies
|
}
|
||||||
*/
|
|
||||||
public float getDecayTime() {
|
/**
|
||||||
return eaxListenerProperties.getFloat(decayTime_offset);
|
* Sets the room effect level at high frequencies
|
||||||
}
|
*
|
||||||
|
* @param roomHF room effect level at high frequencies to set to
|
||||||
/**
|
*/
|
||||||
* Sets the reverberation decay time at low frequencies
|
public void setRoomHF(int roomHF) {
|
||||||
*
|
eaxListenerProperties.putInt(roomHF_offset, roomHF);
|
||||||
* @param decayTime reverberation decay time at low frequencies to set to
|
}
|
||||||
*/
|
|
||||||
public void setDecayTime(float decayTime) {
|
/**
|
||||||
eaxListenerProperties.putFloat(decayTime_offset, decayTime);
|
* Retireves the DS3D flRolloffFactor for room effect
|
||||||
}
|
*
|
||||||
|
* @return DS3D flRolloffFactor for room effect
|
||||||
/**
|
*/
|
||||||
* Retireves the high-frequency to low-frequency decay time ratio
|
public float getRoomRolloffFactor() {
|
||||||
*
|
return eaxListenerProperties.getFloat(roomRolloffFactor_offset);
|
||||||
* @return high-frequency to low-frequency decay time ratio
|
}
|
||||||
*/
|
|
||||||
public float getDecayTimeHFRatio() {
|
/**
|
||||||
return eaxListenerProperties.getFloat(decayHFRatio_offset);
|
* Sets the DS3D flRolloffFactor for room effect
|
||||||
}
|
*
|
||||||
|
* @param roomRolloffFactor DS3D flRolloffFactor for room effect to set to
|
||||||
/**
|
*/
|
||||||
* Sets the high-frequency to low-frequency decay time ratio
|
public void setRoomRolloffFactor(float roomRolloffFactor) {
|
||||||
*
|
eaxListenerProperties.putFloat(roomRolloffFactor_offset, roomRolloffFactor);
|
||||||
* @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 reverberation decay time at low frequencies
|
||||||
}
|
*
|
||||||
|
* @return reverberation decay time at low frequencies
|
||||||
/**
|
*/
|
||||||
* Retireves the early reflections level relative to room effect
|
public float getDecayTime() {
|
||||||
*
|
return eaxListenerProperties.getFloat(decayTime_offset);
|
||||||
* @return early reflections level relative to room effect
|
}
|
||||||
*/
|
|
||||||
public int getReflections() {
|
/**
|
||||||
return eaxListenerProperties.getInt(reflections_offset);
|
* Sets the reverberation decay time at low frequencies
|
||||||
}
|
*
|
||||||
|
* @param decayTime reverberation decay time at low frequencies to set to
|
||||||
/**
|
*/
|
||||||
* Sets the early reflections level relative to room effect
|
public void setDecayTime(float decayTime) {
|
||||||
*
|
eaxListenerProperties.putFloat(decayTime_offset, decayTime);
|
||||||
* @param reflections early reflections level relative to room effect to set to
|
}
|
||||||
*/
|
|
||||||
public void setReflections(int reflections) {
|
/**
|
||||||
eaxListenerProperties.putInt(reflections_offset, reflections);
|
* Retireves the high-frequency to low-frequency decay time ratio
|
||||||
}
|
*
|
||||||
|
* @return high-frequency to low-frequency decay time ratio
|
||||||
/**
|
*/
|
||||||
* Retireves the initial reflection delay time
|
public float getDecayTimeHFRatio() {
|
||||||
*
|
return eaxListenerProperties.getFloat(decayHFRatio_offset);
|
||||||
* @return initial reflection delay time
|
}
|
||||||
*/
|
|
||||||
public float getReflectionsDelay() {
|
/**
|
||||||
return eaxListenerProperties.getFloat(reflectionsDelay_offset);
|
* Sets the high-frequency to low-frequency decay time ratio
|
||||||
}
|
*
|
||||||
|
* @param decayTimeHFRatio high-frequency to low-frequency decay time ratio to set to
|
||||||
/**
|
*/
|
||||||
* Sets the initial reflection delay time
|
public void setDecayTimeHFRatio(float decayTimeHFRatio) {
|
||||||
*
|
eaxListenerProperties.putFloat(decayHFRatio_offset, decayTimeHFRatio);
|
||||||
* @param reflectionsDelay initial reflection delay time to set to
|
}
|
||||||
*/
|
|
||||||
public void setReflectionsDelay(float reflectionsDelay) {
|
/**
|
||||||
eaxListenerProperties.putFloat(reflectionsDelay_offset, reflectionsDelay);
|
* Retireves the early reflections level relative to room effect
|
||||||
}
|
*
|
||||||
|
* @return early reflections level relative to room effect
|
||||||
/**
|
*/
|
||||||
* Retireves the late reverberation level relative to room effect
|
public int getReflections() {
|
||||||
*
|
return eaxListenerProperties.getInt(reflections_offset);
|
||||||
* @return late reverberation level relative to room effect
|
}
|
||||||
*/
|
|
||||||
public int getReverb() {
|
/**
|
||||||
return eaxListenerProperties.getInt(reverb_offset);
|
* Sets the early reflections level relative to room effect
|
||||||
}
|
*
|
||||||
|
* @param reflections early reflections level relative to room effect to set to
|
||||||
/**
|
*/
|
||||||
* Sets the late reverberation level relative to room effect
|
public void setReflections(int reflections) {
|
||||||
*
|
eaxListenerProperties.putInt(reflections_offset, reflections);
|
||||||
* @param reverb late reverberation level relative to room effect to set to
|
}
|
||||||
*/
|
|
||||||
public void setReverb(int reverb) {
|
/**
|
||||||
eaxListenerProperties.putInt(reverb_offset, reverb);
|
* Retireves the initial reflection delay time
|
||||||
}
|
*
|
||||||
|
* @return initial reflection delay time
|
||||||
/**
|
*/
|
||||||
* Retireves the late reverberation delay time relative to initial reflection
|
public float getReflectionsDelay() {
|
||||||
*
|
return eaxListenerProperties.getFloat(reflectionsDelay_offset);
|
||||||
* @return late reverberation delay time relative to initial reflection
|
}
|
||||||
*/
|
|
||||||
public float getReverbDelay() {
|
/**
|
||||||
return eaxListenerProperties.getFloat(reverbDelay_offset);
|
* Sets the initial reflection delay time
|
||||||
}
|
*
|
||||||
|
* @param reflectionsDelay initial reflection delay time to set to
|
||||||
/**
|
*/
|
||||||
* Sets the late reverberation delay time relative to initial reflection
|
public void setReflectionsDelay(float reflectionsDelay) {
|
||||||
*
|
eaxListenerProperties.putFloat(reflectionsDelay_offset, reflectionsDelay);
|
||||||
* @param reverbDelay late reverberation delay time relative to initial reflection
|
}
|
||||||
*/
|
|
||||||
public void setReverbDelay(float reverbDelay) {
|
/**
|
||||||
eaxListenerProperties.putFloat(reverbDelay_offset, reverbDelay);
|
* Retireves the late reverberation level relative to room effect
|
||||||
}
|
*
|
||||||
|
* @return late reverberation level relative to room effect
|
||||||
/**
|
*/
|
||||||
* Retireves the listener properties
|
public int getReverb() {
|
||||||
*
|
return eaxListenerProperties.getInt(reverb_offset);
|
||||||
* @return listener properties
|
}
|
||||||
*/
|
|
||||||
public int getEnvironment() {
|
/**
|
||||||
return eaxListenerProperties.getInt(environment_offset);
|
* Sets the late reverberation level relative to room effect
|
||||||
}
|
*
|
||||||
|
* @param reverb late reverberation level relative to room effect to set to
|
||||||
/**
|
*/
|
||||||
* Sets the listener properties
|
public void setReverb(int reverb) {
|
||||||
*
|
eaxListenerProperties.putInt(reverb_offset, reverb);
|
||||||
* @param environment listener properties to set to
|
}
|
||||||
*/
|
|
||||||
public void setEnvironment(int environment) {
|
/**
|
||||||
eaxListenerProperties.putInt(environment_offset, environment);
|
* Retireves the late reverberation delay time relative to initial reflection
|
||||||
}
|
*
|
||||||
|
* @return late reverberation delay time relative to initial reflection
|
||||||
/**
|
*/
|
||||||
* Retireves the environment size in meters
|
public float getReverbDelay() {
|
||||||
*
|
return eaxListenerProperties.getFloat(reverbDelay_offset);
|
||||||
* @return environment size in meters
|
}
|
||||||
*/
|
|
||||||
public float getEnvironmentSize() {
|
/**
|
||||||
return eaxListenerProperties.getFloat(environmentSize_offset);
|
* Sets the late reverberation delay time relative to initial reflection
|
||||||
}
|
*
|
||||||
|
* @param reverbDelay late reverberation delay time relative to initial reflection
|
||||||
/**
|
*/
|
||||||
* Sets the environment size in meters
|
public void setReverbDelay(float reverbDelay) {
|
||||||
*
|
eaxListenerProperties.putFloat(reverbDelay_offset, reverbDelay);
|
||||||
* @param environmentSize environment size in meters to set to
|
}
|
||||||
*/
|
|
||||||
public void setEnvironmentSize(float environmentSize) {
|
/**
|
||||||
eaxListenerProperties.putFloat(environmentSize_offset, environmentSize);
|
* Retireves the listener properties
|
||||||
}
|
*
|
||||||
|
* @return listener properties
|
||||||
/**
|
*/
|
||||||
* Retireves the environment diffusion
|
public int getEnvironment() {
|
||||||
*
|
return eaxListenerProperties.getInt(environment_offset);
|
||||||
* @return environment diffusion
|
}
|
||||||
*/
|
|
||||||
public float getEnvironmentDiffusion() {
|
/**
|
||||||
return eaxListenerProperties.getFloat(environmentDiffusion_offset);
|
* Sets the listener properties
|
||||||
}
|
*
|
||||||
|
* @param environment listener properties to set to
|
||||||
/**
|
*/
|
||||||
* Sets the environment diffusion
|
public void setEnvironment(int environment) {
|
||||||
*
|
eaxListenerProperties.putInt(environment_offset, environment);
|
||||||
* @param environmentDiffusion environment diffusion to set to
|
}
|
||||||
*/
|
|
||||||
public void setEnvironmentDiffusion(float environmentDiffusion) {
|
/**
|
||||||
eaxListenerProperties.putFloat(environmentDiffusion_offset, environmentDiffusion);
|
* Retireves the environment size in meters
|
||||||
}
|
*
|
||||||
|
* @return environment size in meters
|
||||||
/**
|
*/
|
||||||
* Retireves the change in level per meter at 5 kHz
|
public float getEnvironmentSize() {
|
||||||
*
|
return eaxListenerProperties.getFloat(environmentSize_offset);
|
||||||
* @return change in level per meter at 5 kHz
|
}
|
||||||
*/
|
|
||||||
public float getAirAbsorptionHF() {
|
/**
|
||||||
return eaxListenerProperties.getFloat(airAbsorptionHF_offset);
|
* Sets the environment size in meters
|
||||||
}
|
*
|
||||||
|
* @param environmentSize environment size in meters to set to
|
||||||
/**
|
*/
|
||||||
* Sets the change in level per meter at 5 kHz
|
public void setEnvironmentSize(float environmentSize) {
|
||||||
*
|
eaxListenerProperties.putFloat(environmentSize_offset, environmentSize);
|
||||||
* @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 environment diffusion
|
||||||
}
|
*
|
||||||
|
* @return environment diffusion
|
||||||
/**
|
*/
|
||||||
* Retireves the modifier for behavior of properties
|
public float getEnvironmentDiffusion() {
|
||||||
*
|
return eaxListenerProperties.getFloat(environmentDiffusion_offset);
|
||||||
* @return modifier for behavior of properties
|
}
|
||||||
*/
|
|
||||||
public int getFlags() {
|
/**
|
||||||
return eaxListenerProperties.getInt(flags_offset);
|
* Sets the environment diffusion
|
||||||
}
|
*
|
||||||
|
* @param environmentDiffusion environment diffusion to set to
|
||||||
/**
|
*/
|
||||||
* Sets the modifier for behavior of properties
|
public void setEnvironmentDiffusion(float environmentDiffusion) {
|
||||||
*
|
eaxListenerProperties.putFloat(
|
||||||
* @param flags modifier for behavior of properties to set to
|
environmentDiffusion_offset,
|
||||||
*/
|
environmentDiffusion);
|
||||||
public void setFlags(int flags) {
|
}
|
||||||
eaxListenerProperties.putInt(flags_offset, flags);
|
|
||||||
}
|
/**
|
||||||
|
* Retireves the change in level per meter at 5 kHz
|
||||||
/**
|
*
|
||||||
* Retrieves the size of the containing ByteBuffer
|
* @return change in level per meter at 5 kHz
|
||||||
*/
|
*/
|
||||||
public int getSize() {
|
public float getAirAbsorptionHF() {
|
||||||
return EAXLISTENERPROPERTIES_SIZE;
|
return eaxListenerProperties.getFloat(airAbsorptionHF_offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the size of the EAXLISTENERPROPERTIES
|
* Sets the change in level per meter at 5 kHz
|
||||||
*/
|
*
|
||||||
protected static native int sizeOfEaxListenerProperties();
|
* @param airAbsorptionHF change in level per meter at 5 kHz to set to
|
||||||
|
*/
|
||||||
/**
|
public void setAirAbsorptionFactor(float airAbsorptionHF) {
|
||||||
* Sets the offsets to the fields
|
eaxListenerProperties.putFloat(airAbsorptionHF_offset, airAbsorptionHF);
|
||||||
*/
|
}
|
||||||
protected static native void assignOffsets();
|
|
||||||
|
/**
|
||||||
|
* Retireves the modifier for behavior of properties
|
||||||
|
*
|
||||||
|
* @return modifier for behavior of properties
|
||||||
|
*/
|
||||||
|
public int getFlags() {
|
||||||
|
return eaxListenerProperties.getInt(flags_offset);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the modifier for behavior of properties
|
||||||
|
*
|
||||||
|
* @param flags modifier for behavior of properties to set to
|
||||||
|
*/
|
||||||
|
public void setFlags(int flags) {
|
||||||
|
eaxListenerProperties.putInt(flags_offset, flags);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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();
|
||||||
}
|
}
|
|
@ -104,10 +104,14 @@ JNIEXPORT void JNICALL Java_org_lwjgl_openal_eax_CoreEAX_setGUID (JNIEnv *env, j
|
||||||
*/
|
*/
|
||||||
JNIEXPORT jint JNICALL Java_org_lwjgl_openal_eax_CoreEAX_eaxGet (JNIEnv *env, jclass clazz, jint propertySetID, jint property, jint source, jobject value, jint size) {
|
JNIEXPORT jint JNICALL Java_org_lwjgl_openal_eax_CoreEAX_eaxGet (JNIEnv *env, jclass clazz, jint propertySetID, jint property, jint source, jobject value, jint size) {
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
/*
|
||||||
jint result = (jint) eaxGet((const struct _GUID*)propertySetID, (ALuint) property, (ALuint) source, (ALvoid*) env->GetDirectBufferAddress(value), (ALuint) size);
|
jint result = (jint) eaxGet((const struct _GUID*)propertySetID, (ALuint) property, (ALuint) source, (ALvoid*) env->GetDirectBufferAddress(value), (ALuint) size);
|
||||||
CHECK_AL_ERROR
|
CHECK_AL_ERROR
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
*/
|
||||||
|
printf("Method currently deactivated. Fixed soon\n");
|
||||||
|
return -1;
|
||||||
#else
|
#else
|
||||||
ThrowException(env, "EAX extensions not supported");
|
ThrowException(env, "EAX extensions not supported");
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -123,10 +127,14 @@ JNIEXPORT jint JNICALL Java_org_lwjgl_openal_eax_CoreEAX_eaxGet (JNIEnv *env, jc
|
||||||
*/
|
*/
|
||||||
JNIEXPORT jint JNICALL Java_org_lwjgl_openal_eax_CoreEAX_eaxSet (JNIEnv *env, jclass clazz, jint propertySetID, jint property, jint source, jobject value, jint size) {
|
JNIEXPORT jint JNICALL Java_org_lwjgl_openal_eax_CoreEAX_eaxSet (JNIEnv *env, jclass clazz, jint propertySetID, jint property, jint source, jobject value, jint size) {
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
/*
|
||||||
jint result = (jint) eaxSet((const struct _GUID*)propertySetID, (ALuint) property, (ALuint) source, env->GetDirectBufferAddress(value), (ALuint) size);
|
jint result = (jint) eaxSet((const struct _GUID*)propertySetID, (ALuint) property, (ALuint) source, env->GetDirectBufferAddress(value), (ALuint) size);
|
||||||
CHECK_AL_ERROR
|
CHECK_AL_ERROR
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
*/
|
||||||
|
printf("Method currently deactivated. Fixed soon\n");
|
||||||
|
return -1;
|
||||||
#else
|
#else
|
||||||
ThrowException(env, "EAX extensions not supported");
|
ThrowException(env, "EAX extensions not supported");
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue