aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/Include
diff options
context:
space:
mode:
Diffstat (limited to 'OpenAL32/Include')
-rw-r--r--OpenAL32/Include/alAuxEffectSlot.h50
-rw-r--r--OpenAL32/Include/alEffect.h57
-rw-r--r--OpenAL32/Include/alFilter.h55
-rw-r--r--OpenAL32/Include/alListener.h3
-rw-r--r--OpenAL32/Include/alMain.h1
-rw-r--r--OpenAL32/Include/alSource.h33
6 files changed, 199 insertions, 0 deletions
diff --git a/OpenAL32/Include/alAuxEffectSlot.h b/OpenAL32/Include/alAuxEffectSlot.h
new file mode 100644
index 00000000..e34d787d
--- /dev/null
+++ b/OpenAL32/Include/alAuxEffectSlot.h
@@ -0,0 +1,50 @@
+#ifndef _AL_AUXEFFECTSLOT_H_
+#define _AL_AUXEFFECTSLOT_H_
+
+#include "alEffect.h"
+#include "AL/al.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define AL_EFFECTSLOT_EFFECT 0x0001
+#define AL_EFFECTSLOT_GAIN 0x0002
+#define AL_EFFECTSLOT_AUXILIARY_SEND_AUTO 0x0003
+
+#define AL_EFFECTSLOT_NULL 0x0000
+
+typedef struct ALeffectslot_struct
+{
+ ALeffect effect;
+
+ ALfloat Gain;
+ ALboolean AuxSendAuto;
+
+ // Index to itself
+ ALuint effectslot;
+
+ struct ALeffectslot_struct *next;
+} ALeffectslot;
+
+AL_API ALvoid AL_APIENTRY alGenAuxiliaryEffectSlots(ALsizei n, ALuint *effectslots);
+AL_API ALvoid AL_APIENTRY alDeleteAuxiliaryEffectSlots(ALsizei n, ALuint *effectslots);
+AL_API ALboolean AL_APIENTRY alIsAuxiliaryEffectSlot(ALuint effectslot);
+
+AL_API ALvoid AL_APIENTRY alAuxiliaryEffectSloti(ALuint effectslot, ALenum param, ALint iValue);
+AL_API ALvoid AL_APIENTRY alAuxiliaryEffectSlotiv(ALuint effectslot, ALenum param, ALint *piValues);
+AL_API ALvoid AL_APIENTRY alAuxiliaryEffectSlotf(ALuint effectslot, ALenum param, ALfloat flValue);
+AL_API ALvoid AL_APIENTRY alAuxiliaryEffectSlotfv(ALuint effectslot, ALenum param, ALfloat *pflValues);
+
+AL_API ALvoid AL_APIENTRY alGetAuxiliaryEffectSloti(ALuint effectslot, ALenum param, ALint *piValue);
+AL_API ALvoid AL_APIENTRY alGetAuxiliaryEffectSlotiv(ALuint effectslot, ALenum param, ALint *piValues);
+AL_API ALvoid AL_APIENTRY alGetAuxiliaryEffectSlotf(ALuint effectslot, ALenum param, ALfloat *pflValue);
+AL_API ALvoid AL_APIENTRY alGetAuxiliaryEffectSlotfv(ALuint effectslot, ALenum param, ALfloat *pflValues);
+
+ALvoid ReleaseALAuxiliaryEffectSlots(ALvoid);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/OpenAL32/Include/alEffect.h b/OpenAL32/Include/alEffect.h
new file mode 100644
index 00000000..d42f5adc
--- /dev/null
+++ b/OpenAL32/Include/alEffect.h
@@ -0,0 +1,57 @@
+#ifndef _AL_EFFECT_H_
+#define _AL_EFFECT_H_
+
+#include "AL/al.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define AL_EFFECT_TYPE 0x8001
+
+#define AL_EFFECT_NULL 0x0000
+#define AL_EFFECT_REVERB 0x0001
+#define AL_EFFECT_CHORUS 0x0002
+#define AL_EFFECT_DISTORTION 0x0003
+#define AL_EFFECT_ECHO 0x0004
+#define AL_EFFECT_FLANGER 0x0005
+#define AL_EFFECT_FREQUENCY_SHIFTER 0x0006
+#define AL_EFFECT_VOCAL_MORPHER 0x0007
+#define AL_EFFECT_PITCH_SHIFTER 0x0008
+#define AL_EFFECT_RING_MODULATOR 0x0009
+#define AL_EFFECT_AUTOWAH 0x000A
+#define AL_EFFECT_COMPRESSOR 0x000B
+#define AL_EFFECT_EQUALIZER 0x000C
+
+typedef struct ALeffect_struct
+{
+ // Effect type (AL_EFFECT_NULL, ...)
+ ALenum type;
+
+ // Index to itself
+ ALuint effect;
+
+ struct ALeffect_struct *next;
+} ALeffect;
+
+AL_API ALvoid AL_APIENTRY alGenEffects(ALsizei n, ALuint *effects);
+AL_API ALvoid AL_APIENTRY alDeleteEffects(ALsizei n, ALuint *effects);
+AL_API ALboolean AL_APIENTRY alIsEffect(ALuint effect);
+
+AL_API ALvoid AL_APIENTRY alEffecti(ALuint effect, ALenum param, ALint iValue);
+AL_API ALvoid AL_APIENTRY alEffectiv(ALuint effect, ALenum param, ALint *piValues);
+AL_API ALvoid AL_APIENTRY alEffectf(ALuint effect, ALenum param, ALfloat flValue);
+AL_API ALvoid AL_APIENTRY alEffectfv(ALuint effect, ALenum param, ALfloat *pflValues);
+
+AL_API ALvoid AL_APIENTRY alGetEffecti(ALuint effect, ALenum param, ALint *piValue);
+AL_API ALvoid AL_APIENTRY alGetEffectiv(ALuint effect, ALenum param, ALint *piValues);
+AL_API ALvoid AL_APIENTRY alGetEffectf(ALuint effect, ALenum param, ALfloat *pflValue);
+AL_API ALvoid AL_APIENTRY alGetEffectfv(ALuint effect, ALenum param, ALfloat *pflValues);
+
+ALvoid ReleaseALEffects(ALvoid);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/OpenAL32/Include/alFilter.h b/OpenAL32/Include/alFilter.h
new file mode 100644
index 00000000..038304e8
--- /dev/null
+++ b/OpenAL32/Include/alFilter.h
@@ -0,0 +1,55 @@
+#ifndef _AL_FILTER_H_
+#define _AL_FILTER_H_
+
+#include "AL/al.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define AL_FILTER_TYPE 0x8001
+
+#define AL_FILTER_NULL 0x0000
+#define AL_FILTER_LOWPASS 0x0001
+#define AL_FILTER_HIGHPASS 0x0002
+#define AL_FILTER_BANDPASS 0x0003
+
+#define AL_LOWPASS_GAIN 0x0001
+#define AL_LOWPASS_GAINHF 0x0002
+
+
+typedef struct ALfilter_struct
+{
+ // Filter type (AL_FILTER_NULL, ...)
+ ALenum type;
+
+ ALfloat Gain;
+ ALfloat GainHF;
+
+ // Index to itself
+ ALuint filter;
+
+ struct ALfilter_struct *next;
+} ALfilter;
+
+AL_API ALvoid AL_APIENTRY alGenFilters(ALsizei n, ALuint *filters);
+AL_API ALvoid AL_APIENTRY alDeleteFilters(ALsizei n, ALuint *filters);
+AL_API ALboolean AL_APIENTRY alIsFilter(ALuint filter);
+
+AL_API ALvoid AL_APIENTRY alFilteri(ALuint filter, ALenum param, ALint iValue);
+AL_API ALvoid AL_APIENTRY alFilteriv(ALuint filter, ALenum param, ALint *piValues);
+AL_API ALvoid AL_APIENTRY alFilterf(ALuint filter, ALenum param, ALfloat flValue);
+AL_API ALvoid AL_APIENTRY alFilterfv(ALuint filter, ALenum param, ALfloat *pflValues);
+
+AL_API ALvoid AL_APIENTRY alGetFilteri(ALuint filter, ALenum param, ALint *piValue);
+AL_API ALvoid AL_APIENTRY alGetFilteriv(ALuint filter, ALenum param, ALint *piValues);
+AL_API ALvoid AL_APIENTRY alGetFilterf(ALuint filter, ALenum param, ALfloat *pflValue);
+AL_API ALvoid AL_APIENTRY alGetFilterfv(ALuint filter, ALenum param, ALfloat *pflValues);
+
+ALvoid ReleaseALFilters(ALvoid);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/OpenAL32/Include/alListener.h b/OpenAL32/Include/alListener.h
index 2075e612..d22261fa 100644
--- a/OpenAL32/Include/alListener.h
+++ b/OpenAL32/Include/alListener.h
@@ -7,6 +7,8 @@
extern "C" {
#endif
+#define AL_METERS_PER_UNIT 0x20004
+
typedef struct ALlistener_struct
{
ALfloat Position[3];
@@ -14,6 +16,7 @@ typedef struct ALlistener_struct
ALfloat Forward[3];
ALfloat Up[3];
ALfloat Gain;
+ ALfloat MetersPerUnit;
} ALlistener;
#ifdef __cplusplus
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h
index d8611a71..a1857c97 100644
--- a/OpenAL32/Include/alMain.h
+++ b/OpenAL32/Include/alMain.h
@@ -105,6 +105,7 @@ extern char _alDebug[256];
#define SWMIXER_OUTPUT_RATE 44100
#define SPEEDOFSOUNDMETRESPERSEC (343.3f)
+#define AIRABSORBGAINHF (0.994f)
typedef struct {
ALCboolean (*OpenPlayback)(ALCdevice*, const ALCchar*);
diff --git a/OpenAL32/Include/alSource.h b/OpenAL32/Include/alSource.h
index 5edbfd1e..09651fa5 100644
--- a/OpenAL32/Include/alSource.h
+++ b/OpenAL32/Include/alSource.h
@@ -3,8 +3,22 @@
#define AL_NUM_SOURCE_PARAMS 128
+/* This cannot be changed without working on the code! */
+#define MAX_SENDS 1
+
+#include "alFilter.h"
+#include "alAuxEffectSlot.h"
#include "AL/al.h"
+#define AL_DIRECT_FILTER 0x20005
+#define AL_AUXILIARY_SEND_FILTER 0x20006
+#define AL_AIR_ABSORPTION_FACTOR 0x20007
+#define AL_ROOM_ROLLOFF_FACTOR 0x20008
+#define AL_CONE_OUTER_GAINHF 0x20009
+#define AL_DIRECT_FILTER_GAINHF_AUTO 0x2000A
+#define AL_AUXILIARY_SEND_FILTER_GAIN_AUTO 0x2000B
+#define AL_AUXILIARY_SEND_FILTER_GAINHF_AUTO 0x2000C
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -50,6 +64,25 @@ typedef struct ALsource
ALuint BuffersPlayed; // Number of buffers played on this loop
ALuint BufferPosition; // Read position in audio data of current buffer
+ ALfilter DirectFilter;
+
+ struct {
+ ALeffectslot Slot;
+ ALfilter WetFilter;
+ } Send[MAX_SENDS];
+
+ ALfloat LastDrySample;
+ ALfloat LastWetSample;
+
+ ALboolean DryGainHFAuto;
+ ALboolean WetGainAuto;
+ ALboolean WetGainHFAuto;
+ ALfloat OuterGainHF;
+
+ ALfloat AirAbsorptionFactor;
+
+ ALfloat RoomRolloffFactor;
+
// Index to itself
ALuint source;