Fix "no remove aqua speed" bug when player leaves the water
[ryzomcore.git] / nel / src / sound / driver / openal / ext_al.h
blob8750736c8b5a52f45c1119a9b6d70fe0ec3bec5a
1 // NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
2 // Copyright (C) 2010 Winch Gate Property Limited
3 //
4 // This source file has been modified by the following contributors:
5 // Copyright (C) 2019 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
6 //
7 // This program is free software: you can redistribute it and/or modify
8 // it under the terms of the GNU Affero General Public License as
9 // published by the Free Software Foundation, either version 3 of the
10 // License, or (at your option) any later version.
12 // This program is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU Affero General Public License for more details.
17 // You should have received a copy of the GNU Affero General Public License
18 // along with this program. If not, see <http://www.gnu.org/licenses/>.
20 #ifndef NL_EXT_AL_H
21 #define NL_EXT_AL_H
23 #ifndef EFX_CREATIVE_AVAILABLE
24 #define EFX_CREATIVE_AVAILABLE 0
25 #endif
27 #ifndef EAX_AVAILABLE
28 #define EAX_AVAILABLE 0
29 #endif
31 #if EAX_AVAILABLE
32 # define OPENAL
33 # ifdef NL_OS_WINDOWS
34 # include <objbase.h>
35 # endif
36 # include <eax.h>
37 #endif
38 #if EFX_CREATIVE_AVAILABLE
39 # include <AL/efx-creative.h>
40 # include <AL/EFX-Util.h>
41 #endif
43 extern "C"
46 void alExtInit();
47 void alExtInitDevice(ALCdevice *device);
49 #if EAX_AVAILABLE
50 // EAX
51 extern bool AlExtEax;
52 extern EAXSet eaxSet;
53 extern EAXGet eaxGet;
54 #endif
56 // ALC_ENUMERATION_EXT
57 extern bool AlEnumerationExt;
59 // ALC_ENUMERATE_ALL_EXT
60 extern bool AlEnumerateAllExt;
61 #ifndef ALC_DEFAULT_ALL_DEVICES_SPECIFIER
62 # define ALC_DEFAULT_ALL_DEVICES_SPECIFIER 0x1012
63 #endif
64 #ifndef ALC_ALL_DEVICES_SPECIFIER
65 # define ALC_ALL_DEVICES_SPECIFIER 0x1013
66 #endif
68 // EAX-RAM (see OpenAL Programmer's Guide.pdf and http://icculus.org/alextreg/)
69 extern bool AlExtXRam;
70 typedef ALboolean (AL_APIENTRY *EAXSetBufferMode)(ALsizei n, ALuint *buffers, ALint value);
71 extern EAXSetBufferMode eaxSetBufferMode;
72 typedef ALenum (AL_APIENTRY *EAXGetBufferMode)(ALuint buffer, ALint *value);
73 extern EAXGetBufferMode eaxGetBufferMode;
75 // ALC_EXT_EFX (see Effects Extension Guide.pdf and http://icculus.org/alextreg/)
76 extern bool AlExtEfx;
77 #define ALC_MAX_AUXILIARY_SENDS 0x20003
78 typedef void (AL_APIENTRY *LPALGENEFXOBJECTS)(ALsizei n, ALuint* objects);
79 typedef void (AL_APIENTRY *LPALDELETEEFXOBJECTS)(ALsizei n, ALuint* objects);
80 typedef ALboolean (AL_APIENTRY *LPALISEFXOBJECT)(ALuint id);
81 typedef void (AL_APIENTRY *LPALEFXOBJECTI)(ALuint id, ALenum param, ALint value);
82 typedef void (AL_APIENTRY *LPALEFXOBJECTIV)(ALuint id, ALenum param, ALint* values);
83 typedef void (AL_APIENTRY *LPALEFXOBJECTF)(ALuint id, ALenum param, ALfloat value);
84 typedef void (AL_APIENTRY *LPALEFXOBJECTFV)(ALuint id, ALenum param, ALfloat* values);
85 typedef void (AL_APIENTRY *LPALGETEFXOBJECTI)(ALuint id, ALenum pname, ALint* value);
86 typedef void (AL_APIENTRY *LPALGETEFXOBJECTIV)(ALuint id, ALenum pname, ALint* values);
87 typedef void (AL_APIENTRY *LPALGETEFXOBJECTF)(ALuint id, ALenum pname, ALfloat* value);
88 typedef void (AL_APIENTRY *LPALGETEFXOBJECTFV)(ALuint id, ALenum pname, ALfloat* values);
89 // source objects
90 #define AL_DIRECT_FILTER 0x20005
91 #define AL_AUXILIARY_SEND_FILTER 0x20006
92 #define AL_AIR_ABSORPTION_FACTOR 0x20007
93 #define AL_ROOM_ROLLOFF_FACTOR 0x20008
94 #define AL_CONE_OUTER_GAINHF 0x20009
95 #define AL_DIRECT_FILTER_GAINHF_AUTO 0x2000A
96 #define AL_AUXILIARY_SEND_FILTER_GAIN_AUTO 0x2000B
97 #define AL_AUXILIARY_SEND_FILTER_GAINHF_AUTO 0x2000C
98 // effect objects
99 extern LPALGENEFXOBJECTS alGenEffects;
100 extern LPALDELETEEFXOBJECTS alDeleteEffects;
101 extern LPALISEFXOBJECT alIsEffect;
102 extern LPALEFXOBJECTI alEffecti;
103 extern LPALEFXOBJECTIV alEffectiv;
104 extern LPALEFXOBJECTF alEffectf;
105 extern LPALEFXOBJECTFV alEffectfv;
106 extern LPALGETEFXOBJECTI alGetEffecti;
107 extern LPALGETEFXOBJECTIV alGetEffectiv;
108 extern LPALGETEFXOBJECTF alGetEffectf;
109 extern LPALGETEFXOBJECTFV alGetEffectfv;
110 #define AL_EFFECT_FIRST_PARAMETER 0x0000
111 #define AL_EFFECT_LAST_PARAMETER 0x8000
112 #define AL_EFFECT_TYPE 0x8001
113 #define AL_EFFECT_NULL 0x0000
114 #define AL_EFFECT_REVERB 0x0001
115 #define AL_REVERB_DENSITY 0x0001
116 #define AL_REVERB_DIFFUSION 0x0002
117 #define AL_REVERB_GAIN 0x0003
118 #define AL_REVERB_GAINHF 0x0004
119 #define AL_REVERB_DECAY_TIME 0x0005
120 #define AL_REVERB_DECAY_HFRATIO 0x0006
121 #define AL_REVERB_REFLECTIONS_GAIN 0x0007
122 #define AL_REVERB_REFLECTIONS_DELAY 0x0008
123 #define AL_REVERB_LATE_REVERB_GAIN 0x0009
124 #define AL_REVERB_LATE_REVERB_DELAY 0x000A
125 #define AL_REVERB_AIR_ABSORPTION_GAINHF 0x000B
126 #define AL_REVERB_ROOM_ROLLOFF_FACTOR 0x000C
127 #define AL_REVERB_DECAY_HFLIMIT 0x000D
128 // filter objects
129 extern LPALGENEFXOBJECTS alGenFilters;
130 extern LPALDELETEEFXOBJECTS alDeleteFilters;
131 extern LPALISEFXOBJECT alIsFilter;
132 extern LPALEFXOBJECTI alFilteri;
133 extern LPALEFXOBJECTIV alFilteriv;
134 extern LPALEFXOBJECTF alFilterf;
135 extern LPALEFXOBJECTFV alFilterfv;
136 extern LPALGETEFXOBJECTI alGetFilteri;
137 extern LPALGETEFXOBJECTIV alGetFilteriv;
138 extern LPALGETEFXOBJECTF alGetFilterf;
139 extern LPALGETEFXOBJECTFV alGetFilterfv;
140 #define AL_LOWPASS_GAIN 0x0001
141 #define AL_LOWPASS_GAINHF 0x0002
142 #define AL_HIGHPASS_GAIN 0x0001
143 #define AL_HIGHPASS_GAINLF 0x0002
144 #define AL_BANDPASS_GAIN 0x0001
145 #define AL_BANDPASS_GAINLF 0x0002
146 #define AL_BANDPASS_GAINHF 0x0003
147 #define AL_FILTER_FIRST_PARAMETER 0x0000
148 #define AL_FILTER_LAST_PARAMETER 0x8000
149 #define AL_FILTER_TYPE 0x8001
150 #define AL_FILTER_NULL 0x0000
151 #define AL_FILTER_LOWPASS 0x0001
152 #define AL_FILTER_HIGHPASS 0x0002
153 #define AL_FILTER_BANDPASS 0x0003
154 // submix objects
155 extern LPALGENEFXOBJECTS alGenAuxiliaryEffectSlots;
156 extern LPALDELETEEFXOBJECTS alDeleteAuxiliaryEffectSlots;
157 extern LPALISEFXOBJECT alIsAuxiliaryEffectSlot;
158 extern LPALEFXOBJECTI alAuxiliaryEffectSloti;
159 extern LPALEFXOBJECTIV alAuxiliaryEffectSlotiv;
160 extern LPALEFXOBJECTF alAuxiliaryEffectSlotf;
161 extern LPALEFXOBJECTFV alAuxiliaryEffectSlotfv;
162 extern LPALGETEFXOBJECTI alGetAuxiliaryEffectSloti;
163 extern LPALGETEFXOBJECTIV alGetAuxiliaryEffectSlotiv;
164 extern LPALGETEFXOBJECTF alGetAuxiliaryEffectSlotf;
165 extern LPALGETEFXOBJECTFV alGetAuxiliaryEffectSlotfv;
166 #define AL_EFFECTSLOT_EFFECT 0x0001
167 #define AL_EFFECTSLOT_GAIN 0x0002
168 #define AL_EFFECTSLOT_AUXILIARY_SEND_AUTO 0x0003
169 #define AL_EFFECTSLOT_NULL 0x0000
173 #endif /* #ifndef NL_EXT_AL_H */
175 /* end of file */