📄 auralattributes.java
字号:
/** * For AuralAttributes component objects, specifies that this object * allows the writing of it's reverb coefficient. * * @since Java 3D 1.3 */ public static final int ALLOW_REVERB_COEFFICIENT_WRITE = CapabilityBits.AURAL_ATTRIBUTES_ALLOW_REVERB_COEFFICIENT_WRITE; /** * For AuralAttributes component objects, specifies that this object * allows the reading of it's reverberation delay information. */ public static final int ALLOW_REVERB_DELAY_READ = CapabilityBits.AURAL_ATTRIBUTES_ALLOW_REVERB_DELAY_READ; /** * For AuralAttributes component objects, specifies that this object * allows the writing of it's reverberation delay information. */ public static final int ALLOW_REVERB_DELAY_WRITE = CapabilityBits.AURAL_ATTRIBUTES_ALLOW_REVERB_DELAY_WRITE; /** * For AuralAttributes component objects, specifies that this object * allows the reading of it's reverb order (feedback loop) information. */ public static final int ALLOW_REVERB_ORDER_READ = CapabilityBits.AURAL_ATTRIBUTES_ALLOW_REVERB_ORDER_READ; /** * For AuralAttributes component objects, specifies that this object * allows the writing of it's reverb order (feedback loop) information. */ public static final int ALLOW_REVERB_ORDER_WRITE = CapabilityBits.AURAL_ATTRIBUTES_ALLOW_REVERB_ORDER_WRITE; /** * For AuralAttributes component objects, specifies that this object * allows the reading of it's reverb decay time information. * * @since Java 3D 1.3 */ public static final int ALLOW_DECAY_TIME_READ = CapabilityBits.AURAL_ATTRIBUTES_ALLOW_DECAY_TIME_READ; /** * For AuralAttributes component objects, specifies that this object * allows the writing of it's reverb decay time information. * * @since Java 3D 1.3 */ public static final int ALLOW_DECAY_TIME_WRITE = CapabilityBits.AURAL_ATTRIBUTES_ALLOW_DECAY_TIME_WRITE; /** * For AuralAttributes component objects, specifies that this object * allows the reading of it's reverb decay filter information. * * @since Java 3D 1.3 */ public static final int ALLOW_DECAY_FILTER_READ = CapabilityBits.AURAL_ATTRIBUTES_ALLOW_DECAY_FILTER_READ; /** * For AuralAttributes component objects, specifies that this object * allows the writing of it's reverb decay filter information. * * @since Java 3D 1.3 */ public static final int ALLOW_DECAY_FILTER_WRITE = CapabilityBits.AURAL_ATTRIBUTES_ALLOW_DECAY_FILTER_WRITE; /** * For AuralAttributes component objects, specifies that this object * allows the reading of it's reverb diffusion information. * * @since Java 3D 1.3 */ public static final int ALLOW_DIFFUSION_READ = CapabilityBits.AURAL_ATTRIBUTES_ALLOW_DIFFUSION_READ; /** * For AuralAttributes component objects, specifies that this object * allows the writing of it's reverb diffusion information. * * @since Java 3D 1.3 */ public static final int ALLOW_DIFFUSION_WRITE = CapabilityBits.AURAL_ATTRIBUTES_ALLOW_DIFFUSION_WRITE; /** * For AuralAttributes component objects, specifies that this object * allows the reading of it's reverb density information. * * @since Java 3D 1.3 */ public static final int ALLOW_DENSITY_READ = CapabilityBits.AURAL_ATTRIBUTES_ALLOW_DENSITY_READ; /** * For AuralAttributes component objects, specifies that this object * allows the writing of it's reverb density information. * * @since Java 3D 1.3 */ public static final int ALLOW_DENSITY_WRITE = CapabilityBits.AURAL_ATTRIBUTES_ALLOW_DENSITY_WRITE; /** * For AuralAttributes component objects, specifies that this object * allows the reading of it's frequency cutoff information. */ public static final int ALLOW_DISTANCE_FILTER_READ = CapabilityBits.AURAL_ATTRIBUTES_ALLOW_DISTANCE_FILTER_READ; /** * For AuralAttributes component objects, specifies that this object * allows the writing of it's frequency cutoff information. */ public static final int ALLOW_DISTANCE_FILTER_WRITE = CapabilityBits.AURAL_ATTRIBUTES_ALLOW_DISTANCE_FILTER_WRITE; /** * For AuralAttributes component objects, specifies that this object * allows the reading of it's frequency scale factor information. */ public static final int ALLOW_FREQUENCY_SCALE_FACTOR_READ = CapabilityBits.AURAL_ATTRIBUTES_ALLOW_FREQUENCY_SCALE_FACTOR_READ; /** * For AuralAttributes component objects, specifies that this object * allows the writing of it's frequency scale factor information. */ public static final int ALLOW_FREQUENCY_SCALE_FACTOR_WRITE = CapabilityBits.AURAL_ATTRIBUTES_ALLOW_FREQUENCY_SCALE_FACTOR_WRITE; /** * For AuralAttributes component objects, specifies that this object * allows the reading of it's velocity scale factor information. */ public static final int ALLOW_VELOCITY_SCALE_FACTOR_READ = CapabilityBits.AURAL_ATTRIBUTES_ALLOW_VELOCITY_SCALE_FACTOR_READ; /** * For AuralAttributes component objects, specifies that this object * allows the writing of it's velocity scale factor information. */ public static final int ALLOW_VELOCITY_SCALE_FACTOR_WRITE = CapabilityBits.AURAL_ATTRIBUTES_ALLOW_VELOCITY_SCALE_FACTOR_WRITE; // Array for setting default read capabilities private static final int[] readCapabilities = { ALLOW_ATTRIBUTE_GAIN_READ, ALLOW_DECAY_FILTER_READ, ALLOW_DECAY_TIME_READ, ALLOW_DENSITY_READ, ALLOW_DIFFUSION_READ, ALLOW_DISTANCE_FILTER_READ, ALLOW_FREQUENCY_SCALE_FACTOR_READ, ALLOW_REFLECTION_COEFFICIENT_READ, ALLOW_REFLECTION_DELAY_READ, ALLOW_REVERB_COEFFICIENT_READ, ALLOW_REVERB_DELAY_READ, ALLOW_REVERB_ORDER_READ, ALLOW_ROLLOFF_READ, ALLOW_VELOCITY_SCALE_FACTOR_READ }; /** ***************** * * Constructors * * ******************/ /** * Constructs and initializes a new AuralAttributes object using default * parameters. The following default values are used: * <ul> * attribute gain: 1.0<br> * rolloff: 1.0<br> * reflection coeff: 0.0<br> * reflection delay: 20.0<br> * reverb coeff: 1.0<br> * reverb delay: 40.0<br> * decay time: 1000.0<br> * decay filter: 5000.0<> * diffusion: 1.0<br> * density: 1.0<br> * reverb bounds: null<br> * reverb order: 0<br> * distance filtering: null (no filtering performed)<br> * frequency scale factor: 1.0<br> * velocity scale factor: 0.0<br> * </ul> */ public AuralAttributes() { // Just use default values // set default read capabilities setDefaultReadCapabilities(readCapabilities); } /** * Constructs and initializes a new AuralAttributes object using specified * parameters including an array of Point2f for the distanceFilter. * @param gain amplitude scale factor * @param rolloff atmospheric (changing speed of sound) scale factor * @param reflectionCoefficient reflective/absorptive factor applied to reflections * @param reverbDelay delay time before start of reverberation * @param reverbOrder limit to number of reflections added to reverb signal * @param distanceFilter frequency cutoff * @param frequencyScaleFactor applied to change of pitch * @param velocityScaleFactor applied to velocity of sound in relation to listener */ public AuralAttributes(float gain, float rolloff, float reflectionCoefficient, float reverbDelay, int reverbOrder, Point2f[] distanceFilter, float frequencyScaleFactor, float velocityScaleFactor) { // set default read capabilities setDefaultReadCapabilities(readCapabilities); ((AuralAttributesRetained)this.retained).setAttributeGain(gain); ((AuralAttributesRetained)this.retained).setRolloff(rolloff); ((AuralAttributesRetained)this.retained).setReflectionCoefficient( reflectionCoefficient); ((AuralAttributesRetained)this.retained).setReverbDelay(reverbDelay); ((AuralAttributesRetained)this.retained).setReverbOrder(reverbOrder); ((AuralAttributesRetained)this.retained).setDistanceFilter( distanceFilter); ((AuralAttributesRetained)this.retained).setFrequencyScaleFactor( frequencyScaleFactor); ((AuralAttributesRetained)this.retained).setVelocityScaleFactor( velocityScaleFactor); } /** * Constructs and initializes a new AuralAttributes object using specified * parameters with separate float arrays for components of distanceFilter. * @param gain amplitude scale factor * @param rolloff atmospheric (changing speed of sound) scale factor * @param reflectionCoefficient reflection/absorption factor applied to reflections * @param reverbDelay delay time before start of reverberation * @param reverbOrder limit to number of reflections added to reverb signal * @param distance filter frequency cutoff distances * @param frequencyCutoff distance filter frequency cutoff * @param frequencyScaleFactor applied to velocity/wave-length * @param velocityScaleFactor applied to velocity of sound in relation to listener */ public AuralAttributes(float gain, float rolloff, float reflectionCoefficient, float reverbDelay, int reverbOrder, float[] distance, float[] frequencyCutoff, float frequencyScaleFactor, float velocityScaleFactor) { // set default read capabilities setDefaultReadCapabilities(readCapabilities); ((AuralAttributesRetained)this.retained).setAttributeGain(gain); ((AuralAttributesRetained)this.retained).setRolloff(rolloff); ((AuralAttributesRetained)this.retained).setReflectionCoefficient( reflectionCoefficient); ((AuralAttributesRetained)this.retained).setReverbDelay(reverbDelay); ((AuralAttributesRetained)this.retained).setReverbOrder(reverbOrder); ((AuralAttributesRetained)this.retained).setDistanceFilter(distance, frequencyCutoff); ((AuralAttributesRetained)this.retained).setFrequencyScaleFactor( frequencyScaleFactor); ((AuralAttributesRetained)this.retained).setVelocityScaleFactor( velocityScaleFactor); } /** * Constructs and initializes a new AuralAttributes object using specified * parameters with separate float arrays for components of distanceFilter * and full reverb parameters. * @param gain amplitude scale factor * @param rolloff atmospheric (changing speed of sound) scale factor * @param reflectionCoefficient factor applied to early reflections * @param reflectionDelay delay time before start of early reflections * @param reverbCoefficient factor applied to late reflections * @param reverbDelay delay time before start of late reverberation * @param decayTime time (in milliseconds) reverb takes to decay to -60bD * @param decayFilter reverb decay filter frequency cutoff * @param diffusion percentage of echo dispersement between min and max * @param density percentage of modal density between min and max * @param distance filter frequency cutoff distances * @param frequencyCutoff distance filter frequency cutoff * @param frequencyScaleFactor applied to velocity/wave-length * @param velocityScaleFactor applied to velocity of sound in relation to listener * @since Java 3D 1.3 */ public AuralAttributes(float gain, float rolloff, float reflectionCoefficient, float reflectionDelay, float reverbCoefficient, float reverbDelay, float decayTime, float decayFilter, float diffusion, float density, float[] distance, float[] frequencyCutoff, float frequencyScaleFactor, float velocityScaleFactor) { // set default read capabilities setDefaultReadCapabilities(readCapabilities); ((AuralAttributesRetained)this.retained).setAttributeGain(gain); ((AuralAttributesRetained)this.retained).setRolloff(rolloff); ((AuralAttributesRetained)this.retained).setReflectionCoefficient( reflectionCoefficient); ((AuralAttributesRetained)this.retained).setReflectionDelay( reflectionDelay); ((AuralAttributesRetained)this.retained).setReverbCoefficient( reverbCoefficient); ((AuralAttributesRetained)this.retained).setReverbDelay(
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -