aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/Include
diff options
context:
space:
mode:
Diffstat (limited to 'OpenAL32/Include')
-rw-r--r--OpenAL32/Include/alAuxEffectSlot.h2
-rw-r--r--OpenAL32/Include/alEcho.h24
-rw-r--r--OpenAL32/Include/alEffect.h34
3 files changed, 60 insertions, 0 deletions
diff --git a/OpenAL32/Include/alAuxEffectSlot.h b/OpenAL32/Include/alAuxEffectSlot.h
index a818bb47..8dfa9418 100644
--- a/OpenAL32/Include/alAuxEffectSlot.h
+++ b/OpenAL32/Include/alAuxEffectSlot.h
@@ -5,6 +5,7 @@
#include "alEffect.h"
#include "alFilter.h"
#include "alReverb.h"
+#include "alEcho.h"
#ifdef __cplusplus
extern "C" {
@@ -24,6 +25,7 @@ typedef struct ALeffectslot
ALboolean AuxSendAuto;
ALverbState *ReverbState;
+ ALechoState *EchoState;
ALfloat WetBuffer[BUFFERSIZE];
diff --git a/OpenAL32/Include/alEcho.h b/OpenAL32/Include/alEcho.h
new file mode 100644
index 00000000..34896ea7
--- /dev/null
+++ b/OpenAL32/Include/alEcho.h
@@ -0,0 +1,24 @@
+#ifndef AL_ECHO_H
+#define AL_ECHO_H
+
+#include "AL/al.h"
+#include "AL/alc.h"
+#include "alMain.h"
+#include "alEffect.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct ALechoState ALechoState;
+
+ALechoState *EchoCreate(ALCcontext *Context);
+ALvoid EchoDestroy(ALechoState *State);
+ALvoid EchoUpdate(ALCcontext *Context, struct ALeffectslot *Slot, ALeffect *Effect);
+ALvoid EchoProcess(ALechoState *State, ALuint SamplesToDo, const ALfloat *SamplesIn, ALfloat (*SamplesOut)[OUTPUTCHANNELS]);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/OpenAL32/Include/alEffect.h b/OpenAL32/Include/alEffect.h
index 5f6723bc..6dd1b766 100644
--- a/OpenAL32/Include/alEffect.h
+++ b/OpenAL32/Include/alEffect.h
@@ -37,9 +37,33 @@ extern "C" {
#define AL_REVERB_ROOM_ROLLOFF_FACTOR 0x000C
#define AL_REVERB_DECAY_HFLIMIT 0x000D
+#define AL_ECHO_DELAY 0x0001
+#define AL_ECHO_LRDELAY 0x0002
+#define AL_ECHO_DAMPING 0x0003
+#define AL_ECHO_FEEDBACK 0x0004
+#define AL_ECHO_SPREAD 0x0005
+
+#define AL_ECHO_MIN_DELAY (0.0f)
+#define AL_ECHO_MAX_DELAY (0.207f)
+#define AL_ECHO_DEFAULT_DELAY (0.1f)
+#define AL_ECHO_MIN_LRDELAY (0.0f)
+#define AL_ECHO_MAX_LRDELAY (0.404f)
+#define AL_ECHO_DEFAULT_LRDELAY (0.1f)
+#define AL_ECHO_MIN_DAMPING (0.0f)
+#define AL_ECHO_MAX_DAMPING (0.99f)
+#define AL_ECHO_DEFAULT_DAMPING (0.5f)
+#define AL_ECHO_MIN_FEEDBACK (0.0f)
+#define AL_ECHO_MAX_FEEDBACK (1.0f)
+#define AL_ECHO_DEFAULT_FEEDBACK (0.5f)
+#define AL_ECHO_MIN_SPREAD (-1.0f)
+#define AL_ECHO_MAX_SPREAD (1.0f)
+#define AL_ECHO_DEFAULT_SPREAD (-1.0f)
+
enum {
REVERB = 0,
+ ECHO,
+
MAX_EFFECTS
};
extern ALboolean DisabledEffects[MAX_EFFECTS];
@@ -67,6 +91,16 @@ typedef struct ALeffect_struct
ALboolean DecayHFLimit;
} Reverb;
+ struct {
+ ALfloat Delay;
+ ALfloat LRDelay;
+
+ ALfloat Damping;
+ ALfloat Feedback;
+
+ ALfloat Spread;
+ } Echo;
+
// Index to itself
ALuint effect;