Java Code Examples for org.lwjgl.openal.EFX10#alEffectf()
The following examples show how to use
org.lwjgl.openal.EFX10#alEffectf() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: LwjglAudioRenderer.java From MikuMikuStudio with BSD 2-Clause "Simplified" License | 5 votes |
public void setEnvironment(Environment env){ checkDead(); synchronized (threadLock){ while (!threadLock.get()){ try { threadLock.wait(); } catch (InterruptedException ex) { } } if (audioDisabled || !supportEfx) return; EFX10.alEffectf(reverbFx, EFX10.AL_REVERB_DENSITY, env.getDensity()); EFX10.alEffectf(reverbFx, EFX10.AL_REVERB_DIFFUSION, env.getDiffusion()); EFX10.alEffectf(reverbFx, EFX10.AL_REVERB_GAIN, env.getGain()); EFX10.alEffectf(reverbFx, EFX10.AL_REVERB_GAINHF, env.getGainHf()); EFX10.alEffectf(reverbFx, EFX10.AL_REVERB_DECAY_TIME, env.getDecayTime()); EFX10.alEffectf(reverbFx, EFX10.AL_REVERB_DECAY_HFRATIO, env.getDecayHFRatio()); EFX10.alEffectf(reverbFx, EFX10.AL_REVERB_REFLECTIONS_GAIN, env.getReflectGain()); EFX10.alEffectf(reverbFx, EFX10.AL_REVERB_REFLECTIONS_DELAY, env.getReflectDelay()); EFX10.alEffectf(reverbFx, EFX10.AL_REVERB_LATE_REVERB_GAIN, env.getLateReverbGain()); EFX10.alEffectf(reverbFx, EFX10.AL_REVERB_LATE_REVERB_DELAY, env.getLateReverbDelay()); EFX10.alEffectf(reverbFx, EFX10.AL_REVERB_AIR_ABSORPTION_GAINHF, env.getAirAbsorbGainHf()); EFX10.alEffectf(reverbFx, EFX10.AL_REVERB_ROOM_ROLLOFF_FACTOR, env.getRoomRolloffFactor()); // attach effect to slot EFX10.alAuxiliaryEffectSloti(reverbFxSlot, EFX10.AL_EFFECTSLOT_EFFECT, reverbFx); } }
Example 2
Source File: SoundPhysics.java From Sound-Physics with GNU General Public License v3.0 | 4 votes |
/** * Applies the parameters in the enum ReverbParams to the main reverb effect. */ protected static void setReverbParams(ReverbParams r, int auxFXSlot, int reverbSlot) { /* EFX10.alEffectf(reverbSlot, EFX10.AL_REVERB_DECAY_TIME, r.decayTime); //Set default parameters EFX10.alEffectf(reverbSlot, EFX10.AL_REVERB_DENSITY, r.density); EFX10.alEffectf(reverbSlot, EFX10.AL_REVERB_DIFFUSION, r.diffusion); EFX10.alEffectf(reverbSlot, EFX10.AL_REVERB_GAIN, r.gain); EFX10.alEffectf(reverbSlot, EFX10.AL_REVERB_GAINHF, r.gainHF); EFX10.alEffectf(reverbSlot, EFX10.AL_REVERB_DECAY_HFRATIO, r.decayHFRatio); EFX10.alEffectf(reverbSlot, EFX10.AL_REVERB_REFLECTIONS_GAIN, r.reflectionsGain); EFX10.alEffectf(reverbSlot, EFX10.AL_REVERB_REFLECTIONS_DELAY, r.reflectionsDelay); EFX10.alEffectf(reverbSlot, EFX10.AL_REVERB_LATE_REVERB_GAIN, r.lateReverbGain); EFX10.alEffectf(reverbSlot, EFX10.AL_REVERB_LATE_REVERB_DELAY, r.lateReverbDelay); EFX10.alEffectf(reverbSlot, EFX10.AL_REVERB_AIR_ABSORPTION_GAINHF, r.airAbsorptionGainHF); EFX10.alEffectf(reverbSlot, EFX10.AL_REVERB_ROOM_ROLLOFF_FACTOR, r.roomRolloffFactor); EFX10.alEffecti(reverbSlot, EFX10.AL_REVERB_DECAY_HFLIMIT, AL10.AL_TRUE); */ EFX10.alEffectf(reverbSlot, EFX10.AL_EAXREVERB_DENSITY, r.density); //Set default parameters checkErrorLog("Error while assigning reverb density: " + r.density); EFX10.alEffectf(reverbSlot, EFX10.AL_EAXREVERB_DIFFUSION, r.diffusion); //Set default parameters checkErrorLog("Error while assigning reverb diffusion: " + r.diffusion); EFX10.alEffectf(reverbSlot, EFX10.AL_EAXREVERB_GAIN, r.gain); //Set default parameters checkErrorLog("Error while assigning reverb gain: " + r.gain); EFX10.alEffectf(reverbSlot, EFX10.AL_EAXREVERB_GAINHF, r.gainHF); //Set default parameters checkErrorLog("Error while assigning reverb gainHF: " + r.gainHF); EFX10.alEffectf(reverbSlot, EFX10.AL_EAXREVERB_DECAY_TIME, r.decayTime); //Set default parameters checkErrorLog("Error while assigning reverb decayTime: " + r.decayTime); EFX10.alEffectf(reverbSlot, EFX10.AL_EAXREVERB_DECAY_HFRATIO, r.decayHFRatio); //Set default parameters checkErrorLog("Error while assigning reverb decayHFRatio: " + r.decayHFRatio); EFX10.alEffectf(reverbSlot, EFX10.AL_EAXREVERB_REFLECTIONS_GAIN, r.reflectionsGain); //Set default parameters checkErrorLog("Error while assigning reverb reflectionsGain: " + r.reflectionsGain); EFX10.alEffectf(reverbSlot, EFX10.AL_EAXREVERB_LATE_REVERB_GAIN, r.lateReverbGain); //Set default parameters checkErrorLog("Error while assigning reverb lateReverbGain: " + r.lateReverbGain); EFX10.alEffectf(reverbSlot, EFX10.AL_EAXREVERB_LATE_REVERB_DELAY, r.lateReverbDelay); //Set default parameters checkErrorLog("Error while assigning reverb lateReverbDelay: " + r.lateReverbDelay); EFX10.alEffectf(reverbSlot, EFX10.AL_EAXREVERB_AIR_ABSORPTION_GAINHF, r.airAbsorptionGainHF); //Set default parameters checkErrorLog("Error while assigning reverb airAbsorptionGainHF: " + r.airAbsorptionGainHF); EFX10.alEffectf(reverbSlot, EFX10.AL_EAXREVERB_ROOM_ROLLOFF_FACTOR, r.roomRolloffFactor); //Set default parameters checkErrorLog("Error while assigning reverb roomRolloffFactor: " + r.roomRolloffFactor); //Attach updated effect object EFX10.alAuxiliaryEffectSloti(auxFXSlot, EFX10.AL_EFFECTSLOT_EFFECT, reverbSlot); }
Example 3
Source File: LwjglEFX.java From jmonkeyengine with BSD 3-Clause "New" or "Revised" License | 4 votes |
@Override public void alEffectf(int effect, int param, float value) { EFX10.alEffectf(effect, param, value); }