zenilib: zenilib/jni/external/openal-soft/examples/alreverb.c Source File

zenilib 0.5.3.0

- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
alreverb.c
Go to the documentation of this file.
1 /*
2 * OpenAL Reverb Example
3 *
4 * Copyright (c) 2012 by Chris Robinson <chris.kcat@gmail.com>
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to deal
8 * in the Software without restriction, including without limitation the rights
9 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 * copies of the Software, and to permit persons to whom the Software is
11 * furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included in
14 * all copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 * THE SOFTWARE.
23 */
24
25 /* This file contains an example for applying reverb to a sound. */
26
27 #include <stdio.h>
28 #include <assert.h>
29 #ifdef _WIN32
30 #define WIN32_LEAN_AND_MEAN
31 #include <windows.h>
32 #else
33 #include <unistd.h>
34 #define Sleep(x) usleep((x)*1000)
35 #endif
36
37 #include "AL/al.h"
38 #include "AL/alc.h"
39 #include "AL/alext.h"
40 #include "AL/efx-presets.h"
41
42 #include "common/alhelpers.h"
43 #include "common/alffmpeg.h"
44
45
46 LPALBUFFERSAMPLESSOFT alBufferSamplesSOFT = wrap_BufferSamples;
47 LPALISBUFFERFORMATSUPPORTEDSOFT alIsBufferFormatSupportedSOFT;
48
49 /* Effect object functions */
50 LPALGENEFFECTS alGenEffects;
51 LPALDELETEEFFECTS alDeleteEffects;
52 LPALISEFFECT alIsEffect;
53 LPALEFFECTI alEffecti;
54 LPALEFFECTIV alEffectiv;
55 LPALEFFECTF alEffectf;
56 LPALEFFECTFV alEffectfv;
57 LPALGETEFFECTI alGetEffecti;
58 LPALGETEFFECTIV alGetEffectiv;
59 LPALGETEFFECTF alGetEffectf;
60 LPALGETEFFECTFV alGetEffectfv;
61
62 /* Auxiliary Effect Slot object functions */
63 LPALGENAUXILIARYEFFECTSLOTS alGenAuxiliaryEffectSlots;
64 LPALDELETEAUXILIARYEFFECTSLOTS alDeleteAuxiliaryEffectSlots;
65 LPALISAUXILIARYEFFECTSLOT alIsAuxiliaryEffectSlot;
66 LPALAUXILIARYEFFECTSLOTI alAuxiliaryEffectSloti;
67 LPALAUXILIARYEFFECTSLOTIV alAuxiliaryEffectSlotiv;
68 LPALAUXILIARYEFFECTSLOTF alAuxiliaryEffectSlotf;
69 LPALAUXILIARYEFFECTSLOTFV alAuxiliaryEffectSlotfv;
70 LPALGETAUXILIARYEFFECTSLOTI alGetAuxiliaryEffectSloti;
71 LPALGETAUXILIARYEFFECTSLOTIV alGetAuxiliaryEffectSlotiv;
72 LPALGETAUXILIARYEFFECTSLOTF alGetAuxiliaryEffectSlotf;
73 LPALGETAUXILIARYEFFECTSLOTFV alGetAuxiliaryEffectSlotfv;
74
75
76 /* LoadEffect loads the given reverb properties into a new OpenAL effect
77 * object, and returns the new effect ID. */
78 static ALuint LoadEffect(const EFXEAXREVERBPROPERTIES *reverb)
79 {
80 ALuint effect = 0;
81 ALenum err;
82
83 /* Create the effect object and check if we can do EAX reverb. */
84 alGenEffects(1, &effect);
85 if(alGetEnumValue("AL_EFFECT_EAXREVERB") != 0)
86 {
87 printf("Using EAX Reverb\n");
88
89 /* EAX Reverb is available. Set the EAX effect type then load the
90 * reverb properties. */
91 alEffecti(effect, AL_EFFECT_TYPE, AL_EFFECT_EAXREVERB);
92
93 alEffectf(effect, AL_EAXREVERB_DENSITY, reverb->flDensity);
94 alEffectf(effect, AL_EAXREVERB_DIFFUSION, reverb->flDiffusion);
95 alEffectf(effect, AL_EAXREVERB_GAIN, reverb->flGain);
96 alEffectf(effect, AL_EAXREVERB_GAINHF, reverb->flGainHF);
97 alEffectf(effect, AL_EAXREVERB_GAINLF, reverb->flGainLF);
98 alEffectf(effect, AL_EAXREVERB_DECAY_TIME, reverb->flDecayTime);
99 alEffectf(effect, AL_EAXREVERB_DECAY_HFRATIO, reverb->flDecayHFRatio);
100 alEffectf(effect, AL_EAXREVERB_DECAY_LFRATIO, reverb->flDecayLFRatio);
101 alEffectf(effect, AL_EAXREVERB_REFLECTIONS_GAIN, reverb->flReflectionsGain);
102 alEffectf(effect, AL_EAXREVERB_REFLECTIONS_DELAY, reverb->flReflectionsDelay);
103 alEffectfv(effect, AL_EAXREVERB_REFLECTIONS_PAN, reverb->flReflectionsPan);
104 alEffectf(effect, AL_EAXREVERB_LATE_REVERB_GAIN, reverb->flLateReverbGain);
105 alEffectf(effect, AL_EAXREVERB_LATE_REVERB_DELAY, reverb->flLateReverbDelay);
106 alEffectfv(effect, AL_EAXREVERB_LATE_REVERB_PAN, reverb->flLateReverbPan);
107 alEffectf(effect, AL_EAXREVERB_ECHO_TIME, reverb->flEchoTime);
108 alEffectf(effect, AL_EAXREVERB_ECHO_DEPTH, reverb->flEchoDepth);
109 alEffectf(effect, AL_EAXREVERB_MODULATION_TIME, reverb->flModulationTime);
110 alEffectf(effect, AL_EAXREVERB_MODULATION_DEPTH, reverb->flModulationDepth);
111 alEffectf(effect, AL_EAXREVERB_AIR_ABSORPTION_GAINHF, reverb->flAirAbsorptionGainHF);
112 alEffectf(effect, AL_EAXREVERB_HFREFERENCE, reverb->flHFReference);
113 alEffectf(effect, AL_EAXREVERB_LFREFERENCE, reverb->flLFReference);
114 alEffectf(effect, AL_EAXREVERB_ROOM_ROLLOFF_FACTOR, reverb->flRoomRolloffFactor);
115 alEffecti(effect, AL_EAXREVERB_DECAY_HFLIMIT, reverb->iDecayHFLimit);
116 }
117 else
118 {
119 printf("Using Standard Reverb\n");
120
121 /* No EAX Reverb. Set the standard reverb effect type then load the
122 * available reverb properties. */
123 alEffecti(effect, AL_EFFECT_TYPE, AL_EFFECT_REVERB);
124
125 alEffectf(effect, AL_REVERB_DENSITY, reverb->flDensity);
126 alEffectf(effect, AL_REVERB_DIFFUSION, reverb->flDiffusion);
127 alEffectf(effect, AL_REVERB_GAIN, reverb->flGain);
128 alEffectf(effect, AL_REVERB_GAINHF, reverb->flGainHF);
129 alEffectf(effect, AL_REVERB_DECAY_TIME, reverb->flDecayTime);
130 alEffectf(effect, AL_REVERB_DECAY_HFRATIO, reverb->flDecayHFRatio);
131 alEffectf(effect, AL_REVERB_REFLECTIONS_GAIN, reverb->flReflectionsGain);
132 alEffectf(effect, AL_REVERB_REFLECTIONS_DELAY, reverb->flReflectionsDelay);
133 alEffectf(effect, AL_REVERB_LATE_REVERB_GAIN, reverb->flLateReverbGain);
134 alEffectf(effect, AL_REVERB_LATE_REVERB_DELAY, reverb->flLateReverbDelay);
135 alEffectf(effect, AL_REVERB_AIR_ABSORPTION_GAINHF, reverb->flAirAbsorptionGainHF);
136 alEffectf(effect, AL_REVERB_ROOM_ROLLOFF_FACTOR, reverb->flRoomRolloffFactor);
137 alEffecti(effect, AL_REVERB_DECAY_HFLIMIT, reverb->iDecayHFLimit);
138 }
139
140 /* Check if an error occured, and clean up if so. */
141 err = alGetError();
142 if(err != AL_NO_ERROR)
143 {
144 fprintf(stderr, "OpenAL error: %s\n", alGetString(err));
145 if(alIsEffect(effect))
146 alDeleteEffects(1, &effect);
147 return 0;
148 }
149
150 return effect;
151 }
152
153
154 /* LoadBuffer loads the named audio file into an OpenAL buffer object, and
155 * returns the new buffer ID. */
156 static ALuint LoadSound(const char *filename)
157 {
158 ALenum err, format, type, channels;
159 ALuint rate, buffer;
160 size_t datalen;
161 void *data;
162 FilePtr audiofile;
163 StreamPtr sound;
164
165 /* Open the file and get the first stream from it */
166 audiofile = openAVFile(filename);
167 sound = getAVAudioStream(audiofile, 0);
168 if(!sound)
169 {
170 fprintf(stderr, "Could not open audio in %s\n", filename);
171 closeAVFile(audiofile);
172 return 0;
173 }
174
175 /* Get the sound format, and figure out the OpenAL format */
176 if(getAVAudioInfo(sound, &rate, &channels, &type) != 0)
177 {
178 fprintf(stderr, "Error getting audio info for %s\n", filename);
179 closeAVFile(audiofile);
180 return 0;
181 }
182
183 format = GetFormat(channels, type, alIsBufferFormatSupportedSOFT);
184 if(format == AL_NONE)
185 {
186 fprintf(stderr, "Unsupported format (%s, %s) for %s\n",
187 ChannelsName(channels), TypeName(type), filename);
188 closeAVFile(audiofile);
189 return 0;
190 }
191
192 /* Decode the whole audio stream to a buffer. */
193 data = decodeAVAudioStream(sound, &datalen);
194 if(!data)
195 {
196 fprintf(stderr, "Failed to read audio from %s\n", filename);
197 closeAVFile(audiofile);
198 return 0;
199 }
200
201 /* Buffer the audio data into a new buffer object, then free the data and
202 * close the file. */
203 buffer = 0;
204 alGenBuffers(1, &buffer);
205 alBufferSamplesSOFT(buffer, rate, format, BytesToFrames(datalen, channels, type),
206 channels, type, data);
207 free(data);
208 closeAVFile(audiofile);
209
210 /* Check if an error occured, and clean up if so. */
211 err = alGetError();
212 if(err != AL_NO_ERROR)
213 {
214 fprintf(stderr, "OpenAL Error: %s\n", alGetString(err));
215 if(alIsBuffer(buffer))
216 alDeleteBuffers(1, &buffer);
217 return 0;
218 }
219
220 return buffer;
221 }
222
223
224 int main(int argc, char **argv)
225 {
226 EFXEAXREVERBPROPERTIES reverb = EFX_REVERB_PRESET_GENERIC;
227 ALuint source, buffer, effect, slot;
228 ALenum state;
229
230 /* Print out usage if no file was specified */
231 if(argc < 2)
232 {
233 fprintf(stderr, "Usage: %s <filename>\n", argv[0]);
234 return 1;
235 }
236
237 /* Initialize OpenAL with the default device, and check for EFX support. */
238 if(InitAL() != 0)
239 return 1;
240
241 if(!alcIsExtensionPresent(alcGetContextsDevice(alcGetCurrentContext()), "ALC_EXT_EFX"))
242 {
243 fprintf(stderr, "Error: EFX not supported\n");
244 CloseAL();
245 return 1;
246 }
247
248 /* Define a macro to help load the function pointers. */
249 #define LOAD_PROC(x) ((x) = alGetProcAddress(#x))
250 LOAD_PROC(alGenEffects);
251 LOAD_PROC(alDeleteEffects);
252 LOAD_PROC(alIsEffect);
253 LOAD_PROC(alEffecti);
254 LOAD_PROC(alEffectiv);
255 LOAD_PROC(alEffectf);
256 LOAD_PROC(alEffectfv);
257 LOAD_PROC(alGetEffecti);
258 LOAD_PROC(alGetEffectiv);
259 LOAD_PROC(alGetEffectf);
260 LOAD_PROC(alGetEffectfv);
261
262 LOAD_PROC(alGenAuxiliaryEffectSlots);
263 LOAD_PROC(alDeleteAuxiliaryEffectSlots);
264 LOAD_PROC(alIsAuxiliaryEffectSlot);
265 LOAD_PROC(alAuxiliaryEffectSloti);
266 LOAD_PROC(alAuxiliaryEffectSlotiv);
267 LOAD_PROC(alAuxiliaryEffectSlotf);
268 LOAD_PROC(alAuxiliaryEffectSlotfv);
269 LOAD_PROC(alGetAuxiliaryEffectSloti);
270 LOAD_PROC(alGetAuxiliaryEffectSlotiv);
271 LOAD_PROC(alGetAuxiliaryEffectSlotf);
272 LOAD_PROC(alGetAuxiliaryEffectSlotfv);
273
274 if(alIsExtensionPresent("AL_SOFT_buffer_samples"))
275 {
276 LOAD_PROC(alBufferSamplesSOFT);
277 LOAD_PROC(alIsBufferFormatSupportedSOFT);
278 }
279 #undef LOAD_PROC
280
281 /* Load the sound into a buffer. */
282 buffer = LoadSound(argv[1]);
283 if(!buffer)
284 {
285 CloseAL();
286 return 1;
287 }
288
289 /* Load the reverb into an effect. */
290 effect = LoadEffect(&reverb);
291 if(!effect)
292 {
293 alDeleteBuffers(1, &buffer);
294 CloseAL();
295 return 1;
296 }
297
298 /* Create the effect slot object. This is what "plays" an effect on sources
299 * that connect to it. */
300 slot = 0;
301 alGenAuxiliaryEffectSlots(1, &slot);
302
303 /* Tell the effect slot to use the loaded effect object. Note that the this
304 * effectively copies the effect properties. You can modify or delete the
305 * effect object afterward without affecting the effect slot.
306 */
307 alAuxiliaryEffectSloti(slot, AL_EFFECTSLOT_EFFECT, effect);
308 assert(alGetError()==AL_NO_ERROR && "Failed to set effect slot");
309
310 /* Create the source to play the sound with. */
311 source = 0;
312 alGenSources(1, &source);
313 alSourcei(source, AL_BUFFER, buffer);
314
315 /* Connect the source to the effect slot. This tells the source to use the
316 * effect slot 'slot', on send #0 with the AL_FILTER_NULL filter object.
317 */
318 alSource3i(source, AL_AUXILIARY_SEND_FILTER, slot, 0, AL_FILTER_NULL);
319 assert(alGetError()==AL_NO_ERROR && "Failed to setup sound source");
320
321 /* Play the sound until it finishes. */
322 alSourcePlay(source);
323 do {
324 Sleep(10);
325 alGetSourcei(source, AL_SOURCE_STATE, &state);
326 } while(alGetError() == AL_NO_ERROR && state == AL_PLAYING);
327
328 /* All done. Delete resources, and close OpenAL. */
329 alDeleteSources(1, &source);
330 alDeleteAuxiliaryEffectSlots(1, &slot);
331 alDeleteEffects(1, &effect);
332 alDeleteBuffers(1, &buffer);
333
334 CloseAL();
335
336 return 0;
337 }
EFXEAXREVERBPROPERTIES
Definition: efx-presets.h:8
alSourcePlay
AL_API void AL_APIENTRY alSourcePlay(ALuint source)
Definition: alSource.c:1894
AL_EAXREVERB_LATE_REVERB_DELAY
#define AL_EAXREVERB_LATE_REVERB_DELAY
Definition: efx.h:63
AL_EAXREVERB_LATE_REVERB_GAIN
#define AL_EAXREVERB_LATE_REVERB_GAIN
Definition: efx.h:62
alSource3i
AL_API void AL_APIENTRY alSource3i(ALuint source, ALenum param, ALint value1, ALint value2, ALint value3)
Definition: alSource.c:1499
AL_REVERB_GAIN
#define AL_REVERB_GAIN
Definition: efx.h:38
AL_EFFECT_TYPE
#define AL_EFFECT_TYPE
Definition: efx.h:151
alBufferSamplesSOFT
LPALBUFFERSAMPLESSOFT alBufferSamplesSOFT
Definition: allatency.c:45
EFXEAXREVERBPROPERTIES::flModulationDepth
float flModulationDepth
Definition: efx-presets.h:26
FilePtr
struct MyFile * FilePtr
Definition: alffmpeg.h:13
LPALGETAUXILIARYEFFECTSLOTFV
void(AL_APIENTRY * LPALGETAUXILIARYEFFECTSLOTFV)(ALuint, ALenum, ALfloat *)
Definition: efx.h:242
alGetAuxiliaryEffectSlotf
LPALGETAUXILIARYEFFECTSLOTF alGetAuxiliaryEffectSlotf
Definition: alreverb.c:72
AL_REVERB_REFLECTIONS_GAIN
#define AL_REVERB_REFLECTIONS_GAIN
Definition: efx.h:42
AL_NONE
#define AL_NONE
Definition: al.h:80
AL_EAXREVERB_DIFFUSION
#define AL_EAXREVERB_DIFFUSION
Definition: efx.h:52
type
GLint GLenum GLsizei GLsizei GLsizei GLint GLenum GLenum type
Definition: gl2ext.h:845
main
int main(int argc, char **argv)
Definition: bootstrap.cpp:102
openAVFile
FilePtr openAVFile(const char *fname)
Definition: alffmpeg.c:161
alDeleteAuxiliaryEffectSlots
LPALDELETEAUXILIARYEFFECTSLOTS alDeleteAuxiliaryEffectSlots
Definition: alreverb.c:64
AL_REVERB_LATE_REVERB_DELAY
#define AL_REVERB_LATE_REVERB_DELAY
Definition: efx.h:45
LPALAUXILIARYEFFECTSLOTIV
void(AL_APIENTRY * LPALAUXILIARYEFFECTSLOTIV)(ALuint, ALenum, const ALint *)
Definition: efx.h:236
LPALGENAUXILIARYEFFECTSLOTS
void(AL_APIENTRY * LPALGENAUXILIARYEFFECTSLOTS)(ALsizei, ALuint *)
Definition: efx.h:232
AL_EAXREVERB_ECHO_TIME
#define AL_EAXREVERB_ECHO_TIME
Definition: efx.h:65
AL_EAXREVERB_REFLECTIONS_DELAY
#define AL_EAXREVERB_REFLECTIONS_DELAY
Definition: efx.h:60
CloseAL
void CloseAL(void)
Definition: alhelpers.c:71
LPALGETAUXILIARYEFFECTSLOTIV
void(AL_APIENTRY * LPALGETAUXILIARYEFFECTSLOTIV)(ALuint, ALenum, ALint *)
Definition: efx.h:240
LPALEFFECTIV
void(AL_APIENTRY * LPALEFFECTIV)(ALuint, ALenum, const ALint *)
Definition: efx.h:210
decodeAVAudioStream
void * decodeAVAudioStream(StreamPtr stream, size_t *length)
Definition: alffmpeg.c:611
EFXEAXREVERBPROPERTIES::flReflectionsPan
float flReflectionsPan[3]
Definition: efx-presets.h:19
alGetError
AL_API ALenum AL_APIENTRY alGetError(void)
Definition: alError.c:46
alIsEffect
LPALISEFFECT alIsEffect
Definition: alreverb.c:52
alAuxiliaryEffectSlotf
LPALAUXILIARYEFFECTSLOTF alAuxiliaryEffectSlotf
Definition: alreverb.c:68
free
SDL_EventEntry * free
Definition: SDL_events.c:80
AL_EAXREVERB_DECAY_HFRATIO
#define AL_EAXREVERB_DECAY_HFRATIO
Definition: efx.h:57
AL_REVERB_DECAY_HFRATIO
#define AL_REVERB_DECAY_HFRATIO
Definition: efx.h:41
alGetSourcei
AL_API void AL_APIENTRY alGetSourcei(ALuint source, ALenum param, ALint *value)
Definition: alSource.c:1754
AL_EAXREVERB_HFREFERENCE
#define AL_EAXREVERB_HFREFERENCE
Definition: efx.h:70
AL_EAXREVERB_MODULATION_DEPTH
#define AL_EAXREVERB_MODULATION_DEPTH
Definition: efx.h:68
AL_REVERB_GAINHF
#define AL_REVERB_GAINHF
Definition: efx.h:39
AL_SOURCE_STATE
#define AL_SOURCE_STATE
Definition: al.h:235
alGetAuxiliaryEffectSlotiv
LPALGETAUXILIARYEFFECTSLOTIV alGetAuxiliaryEffectSlotiv
Definition: alreverb.c:71
alGetAuxiliaryEffectSloti
LPALGETAUXILIARYEFFECTSLOTI alGetAuxiliaryEffectSloti
Definition: alreverb.c:70
wrap_BufferSamples
void AL_APIENTRY wrap_BufferSamples(ALuint buffer, ALuint samplerate, ALenum internalformat, ALsizei samples, ALenum channels, ALenum type, const ALvoid *data)
Definition: alhelpers.c:253
AL_REVERB_DECAY_TIME
#define AL_REVERB_DECAY_TIME
Definition: efx.h:40
EFXEAXREVERBPROPERTIES::flReflectionsGain
float flReflectionsGain
Definition: efx-presets.h:17
alGetEffecti
LPALGETEFFECTI alGetEffecti
Definition: alreverb.c:57
assert
#define assert(x)
Definition: SDL_malloc.c:1234
alGetEffectf
LPALGETEFFECTF alGetEffectf
Definition: alreverb.c:59
alffmpeg.h
EFXEAXREVERBPROPERTIES::flHFReference
float flHFReference
Definition: efx-presets.h:28
AL_EAXREVERB_LATE_REVERB_PAN
#define AL_EAXREVERB_LATE_REVERB_PAN
Definition: efx.h:64
EFXEAXREVERBPROPERTIES::flLateReverbPan
float flLateReverbPan[3]
Definition: efx-presets.h:22
EFXEAXREVERBPROPERTIES::flLFReference
float flLFReference
Definition: efx-presets.h:29
alGenSources
AL_API void AL_APIENTRY alGenSources(ALsizei n, ALuint *sources)
Definition: alSource.c:1216
AL_REVERB_AIR_ABSORPTION_GAINHF
#define AL_REVERB_AIR_ABSORPTION_GAINHF
Definition: efx.h:46
EFXEAXREVERBPROPERTIES::flDecayLFRatio
float flDecayLFRatio
Definition: efx-presets.h:16
getAVAudioStream
StreamPtr getAVAudioStream(FilePtr file, int streamnum)
Definition: alffmpeg.c:318
alGetEnumValue
AL_API ALenum AL_APIENTRY alGetEnumValue(const ALchar *ename)
Definition: alExtension.c:95
AL_EFFECTSLOT_EFFECT
#define AL_EFFECTSLOT_EFFECT
Definition: efx.h:170
AL_REVERB_DECAY_HFLIMIT
#define AL_REVERB_DECAY_HFLIMIT
Definition: efx.h:48
efx-presets.h
Sleep
#define Sleep(x)
Definition: allatency.c:34
AL_EAXREVERB_REFLECTIONS_GAIN
#define AL_EAXREVERB_REFLECTIONS_GAIN
Definition: efx.h:59
LPALEFFECTI
void(AL_APIENTRY * LPALEFFECTI)(ALuint, ALenum, ALint)
Definition: efx.h:209
LPALISBUFFERFORMATSUPPORTEDSOFT
ALboolean(AL_APIENTRY * LPALISBUFFERFORMATSUPPORTEDSOFT)(ALenum)
Definition: alext.h:261
alcGetCurrentContext
ALC_API ALCcontext *ALC_APIENTRY alcGetCurrentContext(void)
Definition: ALc.c:2563
LPALEFFECTF
void(AL_APIENTRY * LPALEFFECTF)(ALuint, ALenum, ALfloat)
Definition: efx.h:211
EFXEAXREVERBPROPERTIES::flGain
float flGain
Definition: efx-presets.h:11
buffer
EGLContext EGLenum EGLClientBuffer buffer
Definition: eglext.h:87
alEffectf
LPALEFFECTF alEffectf
Definition: alreverb.c:55
AL_REVERB_DIFFUSION
#define AL_REVERB_DIFFUSION
Definition: efx.h:37
AL_FILTER_NULL
#define AL_FILTER_NULL
Definition: efx.h:199
EFXEAXREVERBPROPERTIES::flGainHF
float flGainHF
Definition: efx-presets.h:12
TypeName
const char * TypeName(ALenum type)
Definition: alhelpers.c:279
LPALGETAUXILIARYEFFECTSLOTF
void(AL_APIENTRY * LPALGETAUXILIARYEFFECTSLOTF)(ALuint, ALenum, ALfloat *)
Definition: efx.h:241
AL_REVERB_REFLECTIONS_DELAY
#define AL_REVERB_REFLECTIONS_DELAY
Definition: efx.h:43
LPALBUFFERSAMPLESSOFT
void(AL_APIENTRY * LPALBUFFERSAMPLESSOFT)(ALuint, ALuint, ALenum, ALsizei, ALenum, ALenum, const ALvoid *)
Definition: alext.h:258
LPALGETAUXILIARYEFFECTSLOTI
void(AL_APIENTRY * LPALGETAUXILIARYEFFECTSLOTI)(ALuint, ALenum, ALint *)
Definition: efx.h:239
LPALGETEFFECTFV
void(AL_APIENTRY * LPALGETEFFECTFV)(ALuint, ALenum, ALfloat *)
Definition: efx.h:216
AL_PLAYING
#define AL_PLAYING
Definition: al.h:239
LoadEffect
static ALuint LoadEffect(const EFXEAXREVERBPROPERTIES *reverb)
Definition: alreverb.c:78
LPALDELETEAUXILIARYEFFECTSLOTS
void(AL_APIENTRY * LPALDELETEAUXILIARYEFFECTSLOTS)(ALsizei, const ALuint *)
Definition: efx.h:233
data
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl2ext.h:848
sort_controllers.filename
string filename
Definition: sort_controllers.py:8
AL_EFFECT_REVERB
#define AL_EFFECT_REVERB
Definition: efx.h:155
AL_EAXREVERB_MODULATION_TIME
#define AL_EAXREVERB_MODULATION_TIME
Definition: efx.h:67
StreamPtr
struct MyStream * StreamPtr
Definition: alffmpeg.h:14
alGetAuxiliaryEffectSlotfv
LPALGETAUXILIARYEFFECTSLOTFV alGetAuxiliaryEffectSlotfv
Definition: alreverb.c:73
LPALEFFECTFV
void(AL_APIENTRY * LPALEFFECTFV)(ALuint, ALenum, const ALfloat *)
Definition: efx.h:212
AL_REVERB_DENSITY
#define AL_REVERB_DENSITY
Definition: efx.h:36
AL_EAXREVERB_GAIN
#define AL_EAXREVERB_GAIN
Definition: efx.h:53
ALenum
int ALenum
Definition: al.h:65
alGetEffectiv
LPALGETEFFECTIV alGetEffectiv
Definition: alreverb.c:58
format
GLint GLenum GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl2ext.h:845
ALuint
unsigned int ALuint
Definition: al.h:59
EFXEAXREVERBPROPERTIES::flEchoDepth
float flEchoDepth
Definition: efx-presets.h:24
alGenBuffers
AL_API void AL_APIENTRY alGenBuffers(ALsizei n, ALuint *buffers)
Definition: alBuffer.c:183
AL_BUFFER
#define AL_BUFFER
Definition: al.h:182
LOAD_PROC
#define LOAD_PROC(x)
AL_EAXREVERB_GAINHF
#define AL_EAXREVERB_GAINHF
Definition: efx.h:54
LoadSound
static ALuint LoadSound(const char *filename)
Definition: alreverb.c:156
EFXEAXREVERBPROPERTIES::flDiffusion
float flDiffusion
Definition: efx-presets.h:10
AL_EAXREVERB_DECAY_LFRATIO
#define AL_EAXREVERB_DECAY_LFRATIO
Definition: efx.h:58
BytesToFrames
ALsizei BytesToFrames(ALsizei size, ALenum channels, ALenum type)
Definition: alhelpers.c:324
LPALDELETEEFFECTS
void(AL_APIENTRY * LPALDELETEEFFECTS)(ALsizei, const ALuint *)
Definition: efx.h:207
EFXEAXREVERBPROPERTIES::flAirAbsorptionGainHF
float flAirAbsorptionGainHF
Definition: efx-presets.h:27
AL_EAXREVERB_ROOM_ROLLOFF_FACTOR
#define AL_EAXREVERB_ROOM_ROLLOFF_FACTOR
Definition: efx.h:72
alhelpers.h
AL_EAXREVERB_DECAY_TIME
#define AL_EAXREVERB_DECAY_TIME
Definition: efx.h:56
AL_EAXREVERB_AIR_ABSORPTION_GAINHF
#define AL_EAXREVERB_AIR_ABSORPTION_GAINHF
Definition: efx.h:69
LPALGETEFFECTF
void(AL_APIENTRY * LPALGETEFFECTF)(ALuint, ALenum, ALfloat *)
Definition: efx.h:215
EFXEAXREVERBPROPERTIES::flReflectionsDelay
float flReflectionsDelay
Definition: efx-presets.h:18
EFXEAXREVERBPROPERTIES::flDensity
float flDensity
Definition: efx-presets.h:9
EFXEAXREVERBPROPERTIES::flRoomRolloffFactor
float flRoomRolloffFactor
Definition: efx-presets.h:30
AL_EAXREVERB_DECAY_HFLIMIT
#define AL_EAXREVERB_DECAY_HFLIMIT
Definition: efx.h:73
alcGetContextsDevice
ALC_API ALCdevice *ALC_APIENTRY alcGetContextsDevice(ALCcontext *Context)
Definition: ALc.c:2638
GetFormat
ALenum GetFormat(ALenum channels, ALenum type, LPALISBUFFERFORMATSUPPORTEDSOFT palIsBufferFormatSupportedSOFT)
Definition: alhelpers.c:93
LPALISEFFECT
ALboolean(AL_APIENTRY * LPALISEFFECT)(ALuint)
Definition: efx.h:208
AL_EAXREVERB_DENSITY
#define AL_EAXREVERB_DENSITY
Definition: efx.h:51
alAuxiliaryEffectSloti
LPALAUXILIARYEFFECTSLOTI alAuxiliaryEffectSloti
Definition: alreverb.c:66
AL_EAXREVERB_REFLECTIONS_PAN
#define AL_EAXREVERB_REFLECTIONS_PAN
Definition: efx.h:61
ChannelsName
const char * ChannelsName(ALenum chans)
Definition: alhelpers.c:264
LPALAUXILIARYEFFECTSLOTF
void(AL_APIENTRY * LPALAUXILIARYEFFECTSLOTF)(ALuint, ALenum, ALfloat)
Definition: efx.h:237
alIsExtensionPresent
AL_API ALboolean AL_APIENTRY alIsExtensionPresent(const ALchar *extname)
Definition: alExtension.c:49
EFXEAXREVERBPROPERTIES::iDecayHFLimit
int iDecayHFLimit
Definition: efx-presets.h:31
alGetString
AL_API const ALchar *AL_APIENTRY alGetString(ALenum param)
Definition: alState.c:437
alAuxiliaryEffectSlotfv
LPALAUXILIARYEFFECTSLOTFV alAuxiliaryEffectSlotfv
Definition: alreverb.c:69
AL_REVERB_LATE_REVERB_GAIN
#define AL_REVERB_LATE_REVERB_GAIN
Definition: efx.h:44
LPALAUXILIARYEFFECTSLOTI
void(AL_APIENTRY * LPALAUXILIARYEFFECTSLOTI)(ALuint, ALenum, ALint)
Definition: efx.h:235
LPALAUXILIARYEFFECTSLOTFV
void(AL_APIENTRY * LPALAUXILIARYEFFECTSLOTFV)(ALuint, ALenum, const ALfloat *)
Definition: efx.h:238
EFXEAXREVERBPROPERTIES::flDecayHFRatio
float flDecayHFRatio
Definition: efx-presets.h:15
InitAL
int InitAL(void)
Definition: alhelpers.c:42
EFX_REVERB_PRESET_GENERIC
#define EFX_REVERB_PRESET_GENERIC
Definition: efx-presets.h:37
AL_EAXREVERB_LFREFERENCE
#define AL_EAXREVERB_LFREFERENCE
Definition: efx.h:71
alEffectiv
LPALEFFECTIV alEffectiv
Definition: alreverb.c:54
alGenEffects
LPALGENEFFECTS alGenEffects
Definition: alreverb.c:50
EFXEAXREVERBPROPERTIES::flEchoTime
float flEchoTime
Definition: efx-presets.h:23
AL_EAXREVERB_GAINLF
#define AL_EAXREVERB_GAINLF
Definition: efx.h:55
LPALISAUXILIARYEFFECTSLOT
ALboolean(AL_APIENTRY * LPALISAUXILIARYEFFECTSLOT)(ALuint)
Definition: efx.h:234
EFXEAXREVERBPROPERTIES::flDecayTime
float flDecayTime
Definition: efx-presets.h:14
LPALGENEFFECTS
void(AL_APIENTRY * LPALGENEFFECTS)(ALsizei, ALuint *)
Definition: efx.h:206
alGetEffectfv
LPALGETEFFECTFV alGetEffectfv
Definition: alreverb.c:60
EFXEAXREVERBPROPERTIES::flLateReverbDelay
float flLateReverbDelay
Definition: efx-presets.h:21
EFXEAXREVERBPROPERTIES::flModulationTime
float flModulationTime
Definition: efx-presets.h:25
alDeleteBuffers
AL_API void AL_APIENTRY alDeleteBuffers(ALsizei n, const ALuint *buffers)
Definition: alBuffer.c:229
EFXEAXREVERBPROPERTIES::flGainLF
float flGainLF
Definition: efx-presets.h:13
closeAVFile
void closeAVFile(FilePtr file)
Definition: alffmpeg.c:271
AL_EFFECT_EAXREVERB
#define AL_EFFECT_EAXREVERB
Definition: efx.h:167
alEffecti
LPALEFFECTI alEffecti
Definition: alreverb.c:53
EFXEAXREVERBPROPERTIES::flLateReverbGain
float flLateReverbGain
Definition: efx-presets.h:20
alSourcei
AL_API void AL_APIENTRY alSourcei(ALuint source, ALenum param, ALint value)
Definition: alSource.c:1481
getAVAudioInfo
int getAVAudioInfo(StreamPtr stream, ALuint *rate, ALenum *channels, ALenum *type)
Definition: alffmpeg.c:392
source
GLsizei GLsizei GLchar * source
Definition: gl2ext.h:994
alAuxiliaryEffectSlotiv
LPALAUXILIARYEFFECTSLOTIV alAuxiliaryEffectSlotiv
Definition: alreverb.c:67
AL_EAXREVERB_ECHO_DEPTH
#define AL_EAXREVERB_ECHO_DEPTH
Definition: efx.h:66
alGenAuxiliaryEffectSlots
LPALGENAUXILIARYEFFECTSLOTS alGenAuxiliaryEffectSlots
Definition: alreverb.c:63
LPALGETEFFECTI
void(AL_APIENTRY * LPALGETEFFECTI)(ALuint, ALenum, ALint *)
Definition: efx.h:213
alEffectfv
LPALEFFECTFV alEffectfv
Definition: alreverb.c:56
AL_NO_ERROR
#define AL_NO_ERROR
Definition: al.h:364
AL_REVERB_ROOM_ROLLOFF_FACTOR
#define AL_REVERB_ROOM_ROLLOFF_FACTOR
Definition: efx.h:47
alcIsExtensionPresent
ALC_API ALCboolean ALC_APIENTRY alcIsExtensionPresent(ALCdevice *device, const ALCchar *extName)
Definition: ALc.c:2373
AL_AUXILIARY_SEND_FILTER
#define AL_AUXILIARY_SEND_FILTER
Definition: efx.h:24
alIsBufferFormatSupportedSOFT
LPALISBUFFERFORMATSUPPORTEDSOFT alIsBufferFormatSupportedSOFT
Definition: allatency.c:46
alDeleteEffects
LPALDELETEEFFECTS alDeleteEffects
Definition: alreverb.c:51
LPALGETEFFECTIV
void(AL_APIENTRY * LPALGETEFFECTIV)(ALuint, ALenum, ALint *)
Definition: efx.h:214
alIsBuffer
AL_API ALboolean AL_APIENTRY alIsBuffer(ALuint buffer)
Definition: alBuffer.c:272
alDeleteSources
AL_API void AL_APIENTRY alDeleteSources(ALsizei n, const ALuint *sources)
Definition: alSource.c:1262
alIsAuxiliaryEffectSlot
LPALISAUXILIARYEFFECTSLOT alIsAuxiliaryEffectSlot
Definition: alreverb.c:65