0

- Updated flibitEFX from latest flibit2D build.

- The underwater effect is now just a low-pass filter. Reverb == bleh.
This commit is contained in:
Ethan Lee
2012-02-11 16:11:16 -05:00
parent db06230dc5
commit 7b4507d00d
2 changed files with 3 additions and 8 deletions

Binary file not shown.

View File

@@ -42,8 +42,7 @@ import java.nio.FloatBuffer;
import java.nio.IntBuffer; import java.nio.IntBuffer;
import java.nio.ShortBuffer; import java.nio.ShortBuffer;
import com.flibitijibibo.flibitEFX.EFXEffectUnderwater; import com.flibitijibibo.flibitEFX.EFXFilterLowPass;
import com.flibitijibibo.flibitEFX.EFXFilterUnderwater;
import org.lwjgl.LWJGLException; import org.lwjgl.LWJGLException;
import org.lwjgl.openal.AL; import org.lwjgl.openal.AL;
import org.lwjgl.openal.AL10; import org.lwjgl.openal.AL10;
@@ -70,8 +69,7 @@ public final class LWJGLSoundImpl implements Sound {
/** EFX Variables */ /** EFX Variables */
private int currentEffectIndex; private int currentEffectIndex;
private int currentFilterIndex; private int currentFilterIndex;
private EFXEffectUnderwater underwaterEffect; private EFXFilterLowPass underwaterFilter;
private EFXFilterUnderwater underwaterFilter;
// singleton // singleton
private LWJGLSoundImpl() { private LWJGLSoundImpl() {
@@ -156,15 +154,13 @@ public final class LWJGLSoundImpl implements Sound {
private void initOpenALExtensions() private void initOpenALExtensions()
{ {
Com.Printf("... using EFX effects:\n"); Com.Printf("... using EFX effects:\n");
underwaterEffect = new EFXEffectUnderwater(); underwaterFilter = new EFXFilterLowPass();
underwaterFilter = new EFXFilterUnderwater();
} }
void exitOpenAL() void exitOpenAL()
{ {
// Unload EFX Effects // Unload EFX Effects
underwaterEffect.killEffect();
underwaterFilter.killFilter(); underwaterFilter.killFilter();
// Release the context and the device. // Release the context and the device.
@@ -266,7 +262,6 @@ public final class LWJGLSoundImpl implements Sound {
// Detect EFX Conditions // Detect EFX Conditions
if ((GameBase.gi.pointcontents.pointcontents(origin)& Defines.MASK_WATER)!= 0) { if ((GameBase.gi.pointcontents.pointcontents(origin)& Defines.MASK_WATER)!= 0) {
currentEffectIndex = underwaterEffect.getIndex();
currentFilterIndex = underwaterFilter.getIndex(); currentFilterIndex = underwaterFilter.getIndex();
} }
else { else {