view OpenAL32/Include/alEffect.h @ 0:f9476ff7637e

initial forking of open-al to create multiple listeners
author Robert McIntyre <rlm@mit.edu>
date Tue, 25 Oct 2011 13:02:31 -0700
parents
children
line wrap: on
line source
1 #ifndef _AL_EFFECT_H_
2 #define _AL_EFFECT_H_
4 #include "AL/al.h"
6 #ifdef __cplusplus
7 extern "C" {
8 #endif
10 enum {
11 EAXREVERB = 0,
12 REVERB,
13 ECHO,
14 MODULATOR,
15 DEDICATED,
17 MAX_EFFECTS
18 };
19 extern ALboolean DisabledEffects[MAX_EFFECTS];
21 extern ALfloat ReverbBoost;
22 extern ALboolean EmulateEAXReverb;
24 typedef struct ALeffect
25 {
26 // Effect type (AL_EFFECT_NULL, ...)
27 ALenum type;
29 union {
30 struct {
31 // Shared Reverb Properties
32 ALfloat Density;
33 ALfloat Diffusion;
34 ALfloat Gain;
35 ALfloat GainHF;
36 ALfloat DecayTime;
37 ALfloat DecayHFRatio;
38 ALfloat ReflectionsGain;
39 ALfloat ReflectionsDelay;
40 ALfloat LateReverbGain;
41 ALfloat LateReverbDelay;
42 ALfloat AirAbsorptionGainHF;
43 ALfloat RoomRolloffFactor;
44 ALboolean DecayHFLimit;
46 // Additional EAX Reverb Properties
47 ALfloat GainLF;
48 ALfloat DecayLFRatio;
49 ALfloat ReflectionsPan[3];
50 ALfloat LateReverbPan[3];
51 ALfloat EchoTime;
52 ALfloat EchoDepth;
53 ALfloat ModulationTime;
54 ALfloat ModulationDepth;
55 ALfloat HFReference;
56 ALfloat LFReference;
57 } Reverb;
59 struct {
60 ALfloat Delay;
61 ALfloat LRDelay;
63 ALfloat Damping;
64 ALfloat Feedback;
66 ALfloat Spread;
67 } Echo;
69 struct {
70 ALfloat Frequency;
71 ALfloat HighPassCutoff;
72 ALint Waveform;
73 } Modulator;
75 struct {
76 ALfloat Gain;
77 } Dedicated;
78 } Params;
80 // Index to itself
81 ALuint effect;
82 } ALeffect;
84 static __inline ALboolean IsReverbEffect(ALenum type)
85 { return type == AL_EFFECT_REVERB || type == AL_EFFECT_EAXREVERB; }
87 ALvoid ReleaseALEffects(ALCdevice *device);
89 #ifdef __cplusplus
90 }
91 #endif
93 #endif