zenilib: zenilib/jni/external/openal-soft/OpenAL32/alEffect.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
alEffect.c
Go to the documentation of this file.
1
21 #include "config.h"
22
23 #include <stdlib.h>
24 #include <math.h>
25 #include <float.h>
26
27 #include "AL/al.h"
28 #include "AL/alc.h"
29 #include "alMain.h"
30 #include "alEffect.h"
31 #include "alThunk.h"
32 #include "alError.h"
33
34
35 ALboolean DisabledEffects[MAX_EFFECTS];
36
37
38 static void InitEffectParams(ALeffect *effect, ALenum type);
39
40
41 AL_API ALvoid AL_APIENTRY alGenEffects(ALsizei n, ALuint *effects)
42 {
43 ALCcontext *Context;
44 ALsizei cur = 0;
45
46 Context = GetContextRef();
47 if(!Context) return;
48
49 al_try
50 {
51 ALCdevice *device = Context->Device;
52 ALenum err;
53
54 CHECK_VALUE(Context, n >= 0);
55 for(cur = 0;cur < n;cur++)
56 {
57 ALeffect *effect = calloc(1, sizeof(ALeffect));
58 err = AL_OUT_OF_MEMORY;
59 if(!effect || (err=InitEffect(effect)) != AL_NO_ERROR)
60 {
61 free(effect);
62 al_throwerr(Context, err);
63 }
64
65 err = NewThunkEntry(&effect->id);
66 if(err == AL_NO_ERROR)
67 err = InsertUIntMapEntry(&device->EffectMap, effect->id, effect);
68 if(err != AL_NO_ERROR)
69 {
70 FreeThunkEntry(effect->id);
71 memset(effect, 0, sizeof(ALeffect));
72 free(effect);
73
74 al_throwerr(Context, err);
75 }
76
77 effects[cur] = effect->id;
78 }
79 }
80 al_catchany()
81 {
82 if(cur > 0)
83 alDeleteEffects(cur, effects);
84 }
85 al_endtry;
86
87 ALCcontext_DecRef(Context);
88 }
89
90 AL_API ALvoid AL_APIENTRY alDeleteEffects(ALsizei n, const ALuint *effects)
91 {
92 ALCcontext *Context;
93 ALeffect *Effect;
94 ALsizei i;
95
96 Context = GetContextRef();
97 if(!Context) return;
98
99 al_try
100 {
101 ALCdevice *device = Context->Device;
102 CHECK_VALUE(Context, n >= 0);
103 for(i = 0;i < n;i++)
104 {
105 if(effects[i] && LookupEffect(device, effects[i]) == NULL)
106 al_throwerr(Context, AL_INVALID_NAME);
107 }
108
109 for(i = 0;i < n;i++)
110 {
111 if((Effect=RemoveEffect(device, effects[i])) == NULL)
112 continue;
113 FreeThunkEntry(Effect->id);
114
115 memset(Effect, 0, sizeof(*Effect));
116 free(Effect);
117 }
118 }
119 al_endtry;
120
121 ALCcontext_DecRef(Context);
122 }
123
124 AL_API ALboolean AL_APIENTRY alIsEffect(ALuint effect)
125 {
126 ALCcontext *Context;
127 ALboolean result;
128
129 Context = GetContextRef();
130 if(!Context) return AL_FALSE;
131
132 result = ((!effect || LookupEffect(Context->Device, effect)) ?
133 AL_TRUE : AL_FALSE);
134
135 ALCcontext_DecRef(Context);
136
137 return result;
138 }
139
140 AL_API ALvoid AL_APIENTRY alEffecti(ALuint effect, ALenum param, ALint value)
141 {
142 ALCcontext *Context;
143 ALCdevice *Device;
144 ALeffect *ALEffect;
145
146 Context = GetContextRef();
147 if(!Context) return;
148
149 Device = Context->Device;
150 if((ALEffect=LookupEffect(Device, effect)) == NULL)
151 alSetError(Context, AL_INVALID_NAME);
152 else
153 {
154 if(param == AL_EFFECT_TYPE)
155 {
156 ALboolean isOk = (value == AL_EFFECT_NULL);
157 ALint i;
158 for(i = 0;!isOk && EffectList[i].val;i++)
159 {
160 if(value == EffectList[i].val &&
161 !DisabledEffects[EffectList[i].type])
162 isOk = AL_TRUE;
163 }
164
165 if(isOk)
166 InitEffectParams(ALEffect, value);
167 else
168 alSetError(Context, AL_INVALID_VALUE);
169 }
170 else
171 {
172 /* Call the appropriate handler */
173 ALeffect_SetParami(ALEffect, Context, param, value);
174 }
175 }
176
177 ALCcontext_DecRef(Context);
178 }
179
180 AL_API ALvoid AL_APIENTRY alEffectiv(ALuint effect, ALenum param, const ALint *values)
181 {
182 ALCcontext *Context;
183 ALCdevice *Device;
184 ALeffect *ALEffect;
185
186 switch(param)
187 {
188 case AL_EFFECT_TYPE:
189 alEffecti(effect, param, values[0]);
190 return;
191 }
192
193 Context = GetContextRef();
194 if(!Context) return;
195
196 Device = Context->Device;
197 if((ALEffect=LookupEffect(Device, effect)) == NULL)
198 alSetError(Context, AL_INVALID_NAME);
199 else
200 {
201 /* Call the appropriate handler */
202 ALeffect_SetParamiv(ALEffect, Context, param, values);
203 }
204
205 ALCcontext_DecRef(Context);
206 }
207
208 AL_API ALvoid AL_APIENTRY alEffectf(ALuint effect, ALenum param, ALfloat value)
209 {
210 ALCcontext *Context;
211 ALCdevice *Device;
212 ALeffect *ALEffect;
213
214 Context = GetContextRef();
215 if(!Context) return;
216
217 Device = Context->Device;
218 if((ALEffect=LookupEffect(Device, effect)) == NULL)
219 alSetError(Context, AL_INVALID_NAME);
220 else
221 {
222 /* Call the appropriate handler */
223 ALeffect_SetParamf(ALEffect, Context, param, value);
224 }
225
226 ALCcontext_DecRef(Context);
227 }
228
229 AL_API ALvoid AL_APIENTRY alEffectfv(ALuint effect, ALenum param, const ALfloat *values)
230 {
231 ALCcontext *Context;
232 ALCdevice *Device;
233 ALeffect *ALEffect;
234
235 Context = GetContextRef();
236 if(!Context) return;
237
238 Device = Context->Device;
239 if((ALEffect=LookupEffect(Device, effect)) == NULL)
240 alSetError(Context, AL_INVALID_NAME);
241 else
242 {
243 /* Call the appropriate handler */
244 ALeffect_SetParamfv(ALEffect, Context, param, values);
245 }
246
247 ALCcontext_DecRef(Context);
248 }
249
250 AL_API ALvoid AL_APIENTRY alGetEffecti(ALuint effect, ALenum param, ALint *value)
251 {
252 ALCcontext *Context;
253 ALCdevice *Device;
254 ALeffect *ALEffect;
255
256 Context = GetContextRef();
257 if(!Context) return;
258
259 Device = Context->Device;
260 if((ALEffect=LookupEffect(Device, effect)) == NULL)
261 alSetError(Context, AL_INVALID_NAME);
262 else
263 {
264 if(param == AL_EFFECT_TYPE)
265 *value = ALEffect->type;
266 else
267 {
268 /* Call the appropriate handler */
269 ALeffect_GetParami(ALEffect, Context, param, value);
270 }
271 }
272
273 ALCcontext_DecRef(Context);
274 }
275
276 AL_API ALvoid AL_APIENTRY alGetEffectiv(ALuint effect, ALenum param, ALint *values)
277 {
278 ALCcontext *Context;
279 ALCdevice *Device;
280 ALeffect *ALEffect;
281
282 switch(param)
283 {
284 case AL_EFFECT_TYPE:
285 alGetEffecti(effect, param, values);
286 return;
287 }
288
289 Context = GetContextRef();
290 if(!Context) return;
291
292 Device = Context->Device;
293 if((ALEffect=LookupEffect(Device, effect)) == NULL)
294 alSetError(Context, AL_INVALID_NAME);
295 else
296 {
297 /* Call the appropriate handler */
298 ALeffect_GetParamiv(ALEffect, Context, param, values);
299 }
300
301 ALCcontext_DecRef(Context);
302 }
303
304 AL_API ALvoid AL_APIENTRY alGetEffectf(ALuint effect, ALenum param, ALfloat *value)
305 {
306 ALCcontext *Context;
307 ALCdevice *Device;
308 ALeffect *ALEffect;
309
310 Context = GetContextRef();
311 if(!Context) return;
312
313 Device = Context->Device;
314 if((ALEffect=LookupEffect(Device, effect)) == NULL)
315 alSetError(Context, AL_INVALID_NAME);
316 else
317 {
318 /* Call the appropriate handler */
319 ALeffect_GetParamf(ALEffect, Context, param, value);
320 }
321
322 ALCcontext_DecRef(Context);
323 }
324
325 AL_API ALvoid AL_APIENTRY alGetEffectfv(ALuint effect, ALenum param, ALfloat *values)
326 {
327 ALCcontext *Context;
328 ALCdevice *Device;
329 ALeffect *ALEffect;
330
331 Context = GetContextRef();
332 if(!Context) return;
333
334 Device = Context->Device;
335 if((ALEffect=LookupEffect(Device, effect)) == NULL)
336 alSetError(Context, AL_INVALID_NAME);
337 else
338 {
339 /* Call the appropriate handler */
340 ALeffect_GetParamfv(ALEffect, Context, param, values);
341 }
342
343 ALCcontext_DecRef(Context);
344 }
345
346
347 static void eaxreverb_SetParami(ALeffect *effect, ALCcontext *context, ALenum param, ALint val)
348 {
349 switch(param)
350 {
351 case AL_EAXREVERB_DECAY_HFLIMIT:
352 if(val >= AL_EAXREVERB_MIN_DECAY_HFLIMIT && val <= AL_EAXREVERB_MAX_DECAY_HFLIMIT)
353 effect->Reverb.DecayHFLimit = val;
354 else
355 alSetError(context, AL_INVALID_VALUE);
356 break;
357
358 default:
359 alSetError(context, AL_INVALID_ENUM);
360 break;
361 }
362 }
363 static void eaxreverb_SetParamiv(ALeffect *effect, ALCcontext *context, ALenum param, const ALint *vals)
364 {
365 eaxreverb_SetParami(effect, context, param, vals[0]);
366 }
367 static void eaxreverb_SetParamf(ALeffect *effect, ALCcontext *context, ALenum param, ALfloat val)
368 {
369 switch(param)
370 {
371 case AL_EAXREVERB_DENSITY:
372 if(val >= AL_EAXREVERB_MIN_DENSITY &&
373 val <= AL_EAXREVERB_MAX_DENSITY)
374 effect->Reverb.Density = val;
375 else
376 alSetError(context, AL_INVALID_VALUE);
377 break;
378
379 case AL_EAXREVERB_DIFFUSION:
380 if(val >= AL_EAXREVERB_MIN_DIFFUSION &&
381 val <= AL_EAXREVERB_MAX_DIFFUSION)
382 effect->Reverb.Diffusion = val;
383 else
384 alSetError(context, AL_INVALID_VALUE);
385 break;
386
387 case AL_EAXREVERB_GAIN:
388 if(val >= AL_EAXREVERB_MIN_GAIN &&
389 val <= AL_EAXREVERB_MAX_GAIN)
390 effect->Reverb.Gain = val;
391 else
392 alSetError(context, AL_INVALID_VALUE);
393 break;
394
395 case AL_EAXREVERB_GAINHF:
396 if(val >= AL_EAXREVERB_MIN_GAINHF &&
397 val <= AL_EAXREVERB_MAX_GAINHF)
398 effect->Reverb.GainHF = val;
399 else
400 alSetError(context, AL_INVALID_VALUE);
401 break;
402
403 case AL_EAXREVERB_GAINLF:
404 if(val >= AL_EAXREVERB_MIN_GAINLF &&
405 val <= AL_EAXREVERB_MAX_GAINLF)
406 effect->Reverb.GainLF = val;
407 else
408 alSetError(context, AL_INVALID_VALUE);
409 break;
410
411 case AL_EAXREVERB_DECAY_TIME:
412 if(val >= AL_EAXREVERB_MIN_DECAY_TIME &&
413 val <= AL_EAXREVERB_MAX_DECAY_TIME)
414 effect->Reverb.DecayTime = val;
415 else
416 alSetError(context, AL_INVALID_VALUE);
417 break;
418
419 case AL_EAXREVERB_DECAY_HFRATIO:
420 if(val >= AL_EAXREVERB_MIN_DECAY_HFRATIO &&
421 val <= AL_EAXREVERB_MAX_DECAY_HFRATIO)
422 effect->Reverb.DecayHFRatio = val;
423 else
424 alSetError(context, AL_INVALID_VALUE);
425 break;
426
427 case AL_EAXREVERB_DECAY_LFRATIO:
428 if(val >= AL_EAXREVERB_MIN_DECAY_LFRATIO &&
429 val <= AL_EAXREVERB_MAX_DECAY_LFRATIO)
430 effect->Reverb.DecayLFRatio = val;
431 else
432 alSetError(context, AL_INVALID_VALUE);
433 break;
434
435 case AL_EAXREVERB_REFLECTIONS_GAIN:
436 if(val >= AL_EAXREVERB_MIN_REFLECTIONS_GAIN &&
437 val <= AL_EAXREVERB_MAX_REFLECTIONS_GAIN)
438 effect->Reverb.ReflectionsGain = val;
439 else
440 alSetError(context, AL_INVALID_VALUE);
441 break;
442
443 case AL_EAXREVERB_REFLECTIONS_DELAY:
444 if(val >= AL_EAXREVERB_MIN_REFLECTIONS_DELAY &&
445 val <= AL_EAXREVERB_MAX_REFLECTIONS_DELAY)
446 effect->Reverb.ReflectionsDelay = val;
447 else
448 alSetError(context, AL_INVALID_VALUE);
449 break;
450
451 case AL_EAXREVERB_LATE_REVERB_GAIN:
452 if(val >= AL_EAXREVERB_MIN_LATE_REVERB_GAIN &&
453 val <= AL_EAXREVERB_MAX_LATE_REVERB_GAIN)
454 effect->Reverb.LateReverbGain = val;
455 else
456 alSetError(context, AL_INVALID_VALUE);
457 break;
458
459 case AL_EAXREVERB_LATE_REVERB_DELAY:
460 if(val >= AL_EAXREVERB_MIN_LATE_REVERB_DELAY &&
461 val <= AL_EAXREVERB_MAX_LATE_REVERB_DELAY)
462 effect->Reverb.LateReverbDelay = val;
463 else
464 alSetError(context, AL_INVALID_VALUE);
465 break;
466
467 case AL_EAXREVERB_AIR_ABSORPTION_GAINHF:
468 if(val >= AL_EAXREVERB_MIN_AIR_ABSORPTION_GAINHF &&
469 val <= AL_EAXREVERB_MAX_AIR_ABSORPTION_GAINHF)
470 effect->Reverb.AirAbsorptionGainHF = val;
471 else
472 alSetError(context, AL_INVALID_VALUE);
473 break;
474
475 case AL_EAXREVERB_ECHO_TIME:
476 if(val >= AL_EAXREVERB_MIN_ECHO_TIME &&
477 val <= AL_EAXREVERB_MAX_ECHO_TIME)
478 effect->Reverb.EchoTime = val;
479 else
480 alSetError(context, AL_INVALID_VALUE);
481 break;
482
483 case AL_EAXREVERB_ECHO_DEPTH:
484 if(val >= AL_EAXREVERB_MIN_ECHO_DEPTH &&
485 val <= AL_EAXREVERB_MAX_ECHO_DEPTH)
486 effect->Reverb.EchoDepth = val;
487 else
488 alSetError(context, AL_INVALID_VALUE);
489 break;
490
491 case AL_EAXREVERB_MODULATION_TIME:
492 if(val >= AL_EAXREVERB_MIN_MODULATION_TIME &&
493 val <= AL_EAXREVERB_MAX_MODULATION_TIME)
494 effect->Reverb.ModulationTime = val;
495 else
496 alSetError(context, AL_INVALID_VALUE);
497 break;
498
499 case AL_EAXREVERB_MODULATION_DEPTH:
500 if(val >= AL_EAXREVERB_MIN_MODULATION_DEPTH &&
501 val <= AL_EAXREVERB_MAX_MODULATION_DEPTH)
502 effect->Reverb.ModulationDepth = val;
503 else
504 alSetError(context, AL_INVALID_VALUE);
505 break;
506
507 case AL_EAXREVERB_HFREFERENCE:
508 if(val >= AL_EAXREVERB_MIN_HFREFERENCE &&
509 val <= AL_EAXREVERB_MAX_HFREFERENCE)
510 effect->Reverb.HFReference = val;
511 else
512 alSetError(context, AL_INVALID_VALUE);
513 break;
514
515 case AL_EAXREVERB_LFREFERENCE:
516 if(val >= AL_EAXREVERB_MIN_LFREFERENCE &&
517 val <= AL_EAXREVERB_MAX_LFREFERENCE)
518 effect->Reverb.LFReference = val;
519 else
520 alSetError(context, AL_INVALID_VALUE);
521 break;
522
523 case AL_EAXREVERB_ROOM_ROLLOFF_FACTOR:
524 if(val >= 0.0f && val <= 10.0f)
525 effect->Reverb.RoomRolloffFactor = val;
526 else
527 alSetError(context, AL_INVALID_VALUE);
528 break;
529
530 default:
531 alSetError(context, AL_INVALID_ENUM);
532 break;
533 }
534 }
535 static void eaxreverb_SetParamfv(ALeffect *effect, ALCcontext *context, ALenum param, const ALfloat *vals)
536 {
537 switch(param)
538 {
539 case AL_EAXREVERB_REFLECTIONS_PAN:
540 if(isfinite(vals[0]) && isfinite(vals[1]) && isfinite(vals[2]))
541 {
542 LockContext(context);
543 effect->Reverb.ReflectionsPan[0] = vals[0];
544 effect->Reverb.ReflectionsPan[1] = vals[1];
545 effect->Reverb.ReflectionsPan[2] = vals[2];
546 UnlockContext(context);
547 }
548 else
549 alSetError(context, AL_INVALID_VALUE);
550 break;
551 case AL_EAXREVERB_LATE_REVERB_PAN:
552 if(isfinite(vals[0]) && isfinite(vals[1]) && isfinite(vals[2]))
553 {
554 LockContext(context);
555 effect->Reverb.LateReverbPan[0] = vals[0];
556 effect->Reverb.LateReverbPan[1] = vals[1];
557 effect->Reverb.LateReverbPan[2] = vals[2];
558 UnlockContext(context);
559 }
560 else
561 alSetError(context, AL_INVALID_VALUE);
562 break;
563
564 default:
565 eaxreverb_SetParamf(effect, context, param, vals[0]);
566 break;
567 }
568 }
569
570 static void eaxreverb_GetParami(ALeffect *effect, ALCcontext *context, ALenum param, ALint *val)
571 {
572 switch(param)
573 {
574 case AL_EAXREVERB_DECAY_HFLIMIT:
575 *val = effect->Reverb.DecayHFLimit;
576 break;
577
578 default:
579 alSetError(context, AL_INVALID_ENUM);
580 break;
581 }
582 }
583 static void eaxreverb_GetParamiv(ALeffect *effect, ALCcontext *context, ALenum param, ALint *vals)
584 {
585 eaxreverb_GetParami(effect, context, param, vals);
586 }
587 static void eaxreverb_GetParamf(ALeffect *effect, ALCcontext *context, ALenum param, ALfloat *val)
588 {
589 switch(param)
590 {
591 case AL_EAXREVERB_DENSITY:
592 *val = effect->Reverb.Density;
593 break;
594
595 case AL_EAXREVERB_DIFFUSION:
596 *val = effect->Reverb.Diffusion;
597 break;
598
599 case AL_EAXREVERB_GAIN:
600 *val = effect->Reverb.Gain;
601 break;
602
603 case AL_EAXREVERB_GAINHF:
604 *val = effect->Reverb.GainHF;
605 break;
606
607 case AL_EAXREVERB_GAINLF:
608 *val = effect->Reverb.GainLF;
609 break;
610
611 case AL_EAXREVERB_DECAY_TIME:
612 *val = effect->Reverb.DecayTime;
613 break;
614
615 case AL_EAXREVERB_DECAY_HFRATIO:
616 *val = effect->Reverb.DecayHFRatio;
617 break;
618
619 case AL_EAXREVERB_DECAY_LFRATIO:
620 *val = effect->Reverb.DecayLFRatio;
621 break;
622
623 case AL_EAXREVERB_REFLECTIONS_GAIN:
624 *val = effect->Reverb.ReflectionsGain;
625 break;
626
627 case AL_EAXREVERB_REFLECTIONS_DELAY:
628 *val = effect->Reverb.ReflectionsDelay;
629 break;
630
631 case AL_EAXREVERB_LATE_REVERB_GAIN:
632 *val = effect->Reverb.LateReverbGain;
633 break;
634
635 case AL_EAXREVERB_LATE_REVERB_DELAY:
636 *val = effect->Reverb.LateReverbDelay;
637 break;
638
639 case AL_EAXREVERB_AIR_ABSORPTION_GAINHF:
640 *val = effect->Reverb.AirAbsorptionGainHF;
641 break;
642
643 case AL_EAXREVERB_ECHO_TIME:
644 *val = effect->Reverb.EchoTime;
645 break;
646
647 case AL_EAXREVERB_ECHO_DEPTH:
648 *val = effect->Reverb.EchoDepth;
649 break;
650
651 case AL_EAXREVERB_MODULATION_TIME:
652 *val = effect->Reverb.ModulationTime;
653 break;
654
655 case AL_EAXREVERB_MODULATION_DEPTH:
656 *val = effect->Reverb.ModulationDepth;
657 break;
658
659 case AL_EAXREVERB_HFREFERENCE:
660 *val = effect->Reverb.HFReference;
661 break;
662
663 case AL_EAXREVERB_LFREFERENCE:
664 *val = effect->Reverb.LFReference;
665 break;
666
667 case AL_EAXREVERB_ROOM_ROLLOFF_FACTOR:
668 *val = effect->Reverb.RoomRolloffFactor;
669 break;
670
671 default:
672 alSetError(context, AL_INVALID_ENUM);
673 break;
674 }
675 }
676 static void eaxreverb_GetParamfv(ALeffect *effect, ALCcontext *context, ALenum param, ALfloat *vals)
677 {
678 switch(param)
679 {
680 case AL_EAXREVERB_REFLECTIONS_PAN:
681 LockContext(context);
682 vals[0] = effect->Reverb.ReflectionsPan[0];
683 vals[1] = effect->Reverb.ReflectionsPan[1];
684 vals[2] = effect->Reverb.ReflectionsPan[2];
685 UnlockContext(context);
686 break;
687 case AL_EAXREVERB_LATE_REVERB_PAN:
688 LockContext(context);
689 vals[0] = effect->Reverb.LateReverbPan[0];
690 vals[1] = effect->Reverb.LateReverbPan[1];
691 vals[2] = effect->Reverb.LateReverbPan[2];
692 UnlockContext(context);
693 break;
694
695 default:
696 eaxreverb_GetParamf(effect, context, param, vals);
697 break;
698 }
699 }
700
701
702 static void reverb_SetParami(ALeffect *effect, ALCcontext *context, ALenum param, ALint val)
703 {
704 switch(param)
705 {
706 case AL_REVERB_DECAY_HFLIMIT:
707 if(val >= AL_REVERB_MIN_DECAY_HFLIMIT &&
708 val <= AL_REVERB_MAX_DECAY_HFLIMIT)
709 effect->Reverb.DecayHFLimit = val;
710 else
711 alSetError(context, AL_INVALID_VALUE);
712 break;
713
714 default:
715 alSetError(context, AL_INVALID_ENUM);
716 break;
717 }
718 }
719 static void reverb_SetParamiv(ALeffect *effect, ALCcontext *context, ALenum param, const ALint *vals)
720 {
721 reverb_SetParami(effect, context, param, vals[0]);
722 }
723 static void reverb_SetParamf(ALeffect *effect, ALCcontext *context, ALenum param, ALfloat val)
724 {
725 switch(param)
726 {
727 case AL_REVERB_DENSITY:
728 if(val >= AL_REVERB_MIN_DENSITY &&
729 val <= AL_REVERB_MAX_DENSITY)
730 effect->Reverb.Density = val;
731 else
732 alSetError(context, AL_INVALID_VALUE);
733 break;
734
735 case AL_REVERB_DIFFUSION:
736 if(val >= AL_REVERB_MIN_DIFFUSION &&
737 val <= AL_REVERB_MAX_DIFFUSION)
738 effect->Reverb.Diffusion = val;
739 else
740 alSetError(context, AL_INVALID_VALUE);
741 break;
742
743 case AL_REVERB_GAIN:
744 if(val >= AL_REVERB_MIN_GAIN &&
745 val <= AL_REVERB_MAX_GAIN)
746 effect->Reverb.Gain = val;
747 else
748 alSetError(context, AL_INVALID_VALUE);
749 break;
750
751 case AL_REVERB_GAINHF:
752 if(val >= AL_REVERB_MIN_GAINHF &&
753 val <= AL_REVERB_MAX_GAINHF)
754 effect->Reverb.GainHF = val;
755 else
756 alSetError(context, AL_INVALID_VALUE);
757 break;
758
759 case AL_REVERB_DECAY_TIME:
760 if(val >= AL_REVERB_MIN_DECAY_TIME &&
761 val <= AL_REVERB_MAX_DECAY_TIME)
762 effect->Reverb.DecayTime = val;
763 else
764 alSetError(context, AL_INVALID_VALUE);
765 break;
766
767 case AL_REVERB_DECAY_HFRATIO:
768 if(val >= AL_REVERB_MIN_DECAY_HFRATIO &&
769 val <= AL_REVERB_MAX_DECAY_HFRATIO)
770 effect->Reverb.DecayHFRatio = val;
771 else
772 alSetError(context, AL_INVALID_VALUE);
773 break;
774
775 case AL_REVERB_REFLECTIONS_GAIN:
776 if(val >= AL_REVERB_MIN_REFLECTIONS_GAIN &&
777 val <= AL_REVERB_MAX_REFLECTIONS_GAIN)
778 effect->Reverb.ReflectionsGain = val;
779 else
780 alSetError(context, AL_INVALID_VALUE);
781 break;
782
783 case AL_REVERB_REFLECTIONS_DELAY:
784 if(val >= AL_REVERB_MIN_REFLECTIONS_DELAY &&
785 val <= AL_REVERB_MAX_REFLECTIONS_DELAY)
786 effect->Reverb.ReflectionsDelay = val;
787 else
788 alSetError(context, AL_INVALID_VALUE);
789 break;
790
791 case AL_REVERB_LATE_REVERB_GAIN:
792 if(val >= AL_REVERB_MIN_LATE_REVERB_GAIN &&
793 val <= AL_REVERB_MAX_LATE_REVERB_GAIN)
794 effect->Reverb.LateReverbGain = val;
795 else
796 alSetError(context, AL_INVALID_VALUE);
797 break;
798
799 case AL_REVERB_LATE_REVERB_DELAY:
800 if(val >= AL_REVERB_MIN_LATE_REVERB_DELAY &&
801 val <= AL_REVERB_MAX_LATE_REVERB_DELAY)
802 effect->Reverb.LateReverbDelay = val;
803 else
804 alSetError(context, AL_INVALID_VALUE);
805 break;
806
807 case AL_REVERB_AIR_ABSORPTION_GAINHF:
808 if(val >= AL_REVERB_MIN_AIR_ABSORPTION_GAINHF &&
809 val <= AL_REVERB_MAX_AIR_ABSORPTION_GAINHF)
810 effect->Reverb.AirAbsorptionGainHF = val;
811 else
812 alSetError(context, AL_INVALID_VALUE);
813 break;
814
815 case AL_REVERB_ROOM_ROLLOFF_FACTOR:
816 if(val >= AL_REVERB_MIN_ROOM_ROLLOFF_FACTOR &&
817 val <= AL_REVERB_MAX_ROOM_ROLLOFF_FACTOR)
818 effect->Reverb.RoomRolloffFactor = val;
819 else
820 alSetError(context, AL_INVALID_VALUE);
821 break;
822
823 default:
824 alSetError(context, AL_INVALID_ENUM);
825 break;
826 }
827 }
828 static void reverb_SetParamfv(ALeffect *effect, ALCcontext *context, ALenum param, const ALfloat *vals)
829 {
830 reverb_SetParamf(effect, context, param, vals[0]);
831 }
832
833 static void reverb_GetParami(ALeffect *effect, ALCcontext *context, ALenum param, ALint *val)
834 {
835 switch(param)
836 {
837 case AL_REVERB_DECAY_HFLIMIT:
838 *val = effect->Reverb.DecayHFLimit;
839 break;
840
841 default:
842 alSetError(context, AL_INVALID_ENUM);
843 break;
844 }
845 }
846 static void reverb_GetParamiv(ALeffect *effect, ALCcontext *context, ALenum param, ALint *vals)
847 {
848 reverb_GetParami(effect, context, param, vals);
849 }
850 static void reverb_GetParamf(ALeffect *effect, ALCcontext *context, ALenum param, ALfloat *val)
851 {
852 switch(param)
853 {
854 case AL_REVERB_DENSITY:
855 *val = effect->Reverb.Density;
856 break;
857
858 case AL_REVERB_DIFFUSION:
859 *val = effect->Reverb.Diffusion;
860 break;
861
862 case AL_REVERB_GAIN:
863 *val = effect->Reverb.Gain;
864 break;
865
866 case AL_REVERB_GAINHF:
867 *val = effect->Reverb.GainHF;
868 break;
869
870 case AL_REVERB_DECAY_TIME:
871 *val = effect->Reverb.DecayTime;
872 break;
873
874 case AL_REVERB_DECAY_HFRATIO:
875 *val = effect->Reverb.DecayHFRatio;
876 break;
877
878 case AL_REVERB_REFLECTIONS_GAIN:
879 *val = effect->Reverb.ReflectionsGain;
880 break;
881
882 case AL_REVERB_REFLECTIONS_DELAY:
883 *val = effect->Reverb.ReflectionsDelay;
884 break;
885
886 case AL_REVERB_LATE_REVERB_GAIN:
887 *val = effect->Reverb.LateReverbGain;
888 break;
889
890 case AL_REVERB_LATE_REVERB_DELAY:
891 *val = effect->Reverb.LateReverbDelay;
892 break;
893
894 case AL_REVERB_AIR_ABSORPTION_GAINHF:
895 *val = effect->Reverb.AirAbsorptionGainHF;
896 break;
897
898 case AL_REVERB_ROOM_ROLLOFF_FACTOR:
899 *val = effect->Reverb.RoomRolloffFactor;
900 break;
901
902 default:
903 alSetError(context, AL_INVALID_ENUM);
904 break;
905 }
906 }
907 static void reverb_GetParamfv(ALeffect *effect, ALCcontext *context, ALenum param, ALfloat *vals)
908 {
909 reverb_GetParamf(effect, context, param, vals);
910 }
911
912
913 static void echo_SetParami(ALeffect *effect, ALCcontext *context, ALenum param, ALint val)
914 { (void)effect;(void)param;(void)val; alSetError(context, AL_INVALID_ENUM); }
915 static void echo_SetParamiv(ALeffect *effect, ALCcontext *context, ALenum param, const ALint *vals)
916 {
917 echo_SetParami(effect, context, param, vals[0]);
918 }
919 static void echo_SetParamf(ALeffect *effect, ALCcontext *context, ALenum param, ALfloat val)
920 {
921 switch(param)
922 {
923 case AL_ECHO_DELAY:
924 if(val >= AL_ECHO_MIN_DELAY && val <= AL_ECHO_MAX_DELAY)
925 effect->Echo.Delay = val;
926 else
927 alSetError(context, AL_INVALID_VALUE);
928 break;
929
930 case AL_ECHO_LRDELAY:
931 if(val >= AL_ECHO_MIN_LRDELAY && val <= AL_ECHO_MAX_LRDELAY)
932 effect->Echo.LRDelay = val;
933 else
934 alSetError(context, AL_INVALID_VALUE);
935 break;
936
937 case AL_ECHO_DAMPING:
938 if(val >= AL_ECHO_MIN_DAMPING && val <= AL_ECHO_MAX_DAMPING)
939 effect->Echo.Damping = val;
940 else
941 alSetError(context, AL_INVALID_VALUE);
942 break;
943
944 case AL_ECHO_FEEDBACK:
945 if(val >= AL_ECHO_MIN_FEEDBACK && val <= AL_ECHO_MAX_FEEDBACK)
946 effect->Echo.Feedback = val;
947 else
948 alSetError(context, AL_INVALID_VALUE);
949 break;
950
951 case AL_ECHO_SPREAD:
952 if(val >= AL_ECHO_MIN_SPREAD && val <= AL_ECHO_MAX_SPREAD)
953 effect->Echo.Spread = val;
954 else
955 alSetError(context, AL_INVALID_VALUE);
956 break;
957
958 default:
959 alSetError(context, AL_INVALID_ENUM);
960 break;
961 }
962 }
963 static void echo_SetParamfv(ALeffect *effect, ALCcontext *context, ALenum param, const ALfloat *vals)
964 {
965 echo_SetParamf(effect, context, param, vals[0]);
966 }
967
968 static void echo_GetParami(ALeffect *effect, ALCcontext *context, ALenum param, ALint *val)
969 { (void)effect;(void)param;(void)val; alSetError(context, AL_INVALID_ENUM); }
970 static void echo_GetParamiv(ALeffect *effect, ALCcontext *context, ALenum param, ALint *vals)
971 {
972 echo_GetParami(effect, context, param, vals);
973 }
974 static void echo_GetParamf(ALeffect *effect, ALCcontext *context, ALenum param, ALfloat *val)
975 {
976 switch(param)
977 {
978 case AL_ECHO_DELAY:
979 *val = effect->Echo.Delay;
980 break;
981
982 case AL_ECHO_LRDELAY:
983 *val = effect->Echo.LRDelay;
984 break;
985
986 case AL_ECHO_DAMPING:
987 *val = effect->Echo.Damping;
988 break;
989
990 case AL_ECHO_FEEDBACK:
991 *val = effect->Echo.Feedback;
992 break;
993
994 case AL_ECHO_SPREAD:
995 *val = effect->Echo.Spread;
996 break;
997
998 default:
999 alSetError(context, AL_INVALID_ENUM);
1000 break;
1001 }
1002 }
1003 static void echo_GetParamfv(ALeffect *effect, ALCcontext *context, ALenum param, ALfloat *vals)
1004 {
1005 echo_GetParamf(effect, context, param, vals);
1006 }
1007
1008
1009 static void mod_SetParamf(ALeffect *effect, ALCcontext *context, ALenum param, ALfloat val)
1010 {
1011 switch(param)
1012 {
1013 case AL_RING_MODULATOR_FREQUENCY:
1014 if(val >= AL_RING_MODULATOR_MIN_FREQUENCY &&
1015 val <= AL_RING_MODULATOR_MAX_FREQUENCY)
1016 effect->Modulator.Frequency = val;
1017 else
1018 alSetError(context, AL_INVALID_VALUE);
1019 break;
1020
1021 case AL_RING_MODULATOR_HIGHPASS_CUTOFF:
1022 if(val >= AL_RING_MODULATOR_MIN_HIGHPASS_CUTOFF &&
1023 val <= AL_RING_MODULATOR_MAX_HIGHPASS_CUTOFF)
1024 effect->Modulator.HighPassCutoff = val;
1025 else
1026 alSetError(context, AL_INVALID_VALUE);
1027 break;
1028
1029 default:
1030 alSetError(context, AL_INVALID_ENUM);
1031 break;
1032 }
1033 }
1034 static void mod_SetParamfv(ALeffect *effect, ALCcontext *context, ALenum param, const ALfloat *vals)
1035 {
1036 mod_SetParamf(effect, context, param, vals[0]);
1037 }
1038 static void mod_SetParami(ALeffect *effect, ALCcontext *context, ALenum param, ALint val)
1039 {
1040 switch(param)
1041 {
1042 case AL_RING_MODULATOR_FREQUENCY:
1043 case AL_RING_MODULATOR_HIGHPASS_CUTOFF:
1044 mod_SetParamf(effect, context, param, (ALfloat)val);
1045 break;
1046
1047 case AL_RING_MODULATOR_WAVEFORM:
1048 if(val >= AL_RING_MODULATOR_MIN_WAVEFORM &&
1049 val <= AL_RING_MODULATOR_MAX_WAVEFORM)
1050 effect->Modulator.Waveform = val;
1051 else
1052 alSetError(context, AL_INVALID_VALUE);
1053 break;
1054
1055 default:
1056 alSetError(context, AL_INVALID_ENUM);
1057 break;
1058 }
1059 }
1060 static void mod_SetParamiv(ALeffect *effect, ALCcontext *context, ALenum param, const ALint *vals)
1061 {
1062 mod_SetParami(effect, context, param, vals[0]);
1063 }
1064
1065 static void mod_GetParami(ALeffect *effect, ALCcontext *context, ALenum param, ALint *val)
1066 {
1067 switch(param)
1068 {
1069 case AL_RING_MODULATOR_FREQUENCY:
1070 *val = (ALint)effect->Modulator.Frequency;
1071 break;
1072 case AL_RING_MODULATOR_HIGHPASS_CUTOFF:
1073 *val = (ALint)effect->Modulator.HighPassCutoff;
1074 break;
1075 case AL_RING_MODULATOR_WAVEFORM:
1076 *val = effect->Modulator.Waveform;
1077 break;
1078
1079 default:
1080 alSetError(context, AL_INVALID_ENUM);
1081 break;
1082 }
1083 }
1084 static void mod_GetParamiv(ALeffect *effect, ALCcontext *context, ALenum param, ALint *vals)
1085 {
1086 mod_GetParami(effect, context, param, vals);
1087 }
1088 static void mod_GetParamf(ALeffect *effect, ALCcontext *context, ALenum param, ALfloat *val)
1089 {
1090 switch(param)
1091 {
1092 case AL_RING_MODULATOR_FREQUENCY:
1093 *val = effect->Modulator.Frequency;
1094 break;
1095 case AL_RING_MODULATOR_HIGHPASS_CUTOFF:
1096 *val = effect->Modulator.HighPassCutoff;
1097 break;
1098
1099 default:
1100 alSetError(context, AL_INVALID_ENUM);
1101 break;
1102 }
1103 }
1104 static void mod_GetParamfv(ALeffect *effect, ALCcontext *context, ALenum param, ALfloat *vals)
1105 {
1106 mod_GetParamf(effect, context, param, vals);
1107 }
1108
1109
1110 static void ded_SetParami(ALeffect *effect, ALCcontext *context, ALenum param, ALint val)
1111 { (void)effect;(void)param;(void)val; alSetError(context, AL_INVALID_ENUM); }
1112 static void ded_SetParamiv(ALeffect *effect, ALCcontext *context, ALenum param, const ALint *vals)
1113 {
1114 ded_SetParami(effect, context, param, vals[0]);
1115 }
1116 static void ded_SetParamf(ALeffect *effect, ALCcontext *context, ALenum param, ALfloat val)
1117 {
1118 switch(param)
1119 {
1120 case AL_DEDICATED_GAIN:
1121 if(val >= 0.0f && isfinite(val))
1122 effect->Dedicated.Gain = val;
1123 else
1124 alSetError(context, AL_INVALID_VALUE);
1125 break;
1126
1127 default:
1128 alSetError(context, AL_INVALID_ENUM);
1129 break;
1130 }
1131 }
1132 static void ded_SetParamfv(ALeffect *effect, ALCcontext *context, ALenum param, const ALfloat *vals)
1133 {
1134 ded_SetParamf(effect, context, param, vals[0]);
1135 }
1136
1137 static void ded_GetParami(ALeffect *effect, ALCcontext *context, ALenum param, ALint *val)
1138 { (void)effect;(void)param;(void)val; alSetError(context, AL_INVALID_ENUM); }
1139 static void ded_GetParamiv(ALeffect *effect, ALCcontext *context, ALenum param, ALint *vals)
1140 {
1141 ded_GetParami(effect, context, param, vals);
1142 }
1143 static void ded_GetParamf(ALeffect *effect, ALCcontext *context, ALenum param, ALfloat *val)
1144 {
1145 switch(param)
1146 {
1147 case AL_DEDICATED_GAIN:
1148 *val = effect->Dedicated.Gain;
1149 break;
1150
1151 default:
1152 alSetError(context, AL_INVALID_ENUM);
1153 break;
1154 }
1155 }
1156 static void ded_GetParamfv(ALeffect *effect, ALCcontext *context, ALenum param, ALfloat *vals)
1157 {
1158 ded_GetParamf(effect, context, param, vals);
1159 }
1160
1161
1162 static void null_SetParami(ALeffect *effect, ALCcontext *context, ALenum param, ALint val)
1163 { (void)effect;(void)param;(void)val; alSetError(context, AL_INVALID_ENUM); }
1164 static void null_SetParamiv(ALeffect *effect, ALCcontext *context, ALenum param, const ALint *vals)
1165 { (void)effect;(void)param;(void)vals; alSetError(context, AL_INVALID_ENUM); }
1166 static void null_SetParamf(ALeffect *effect, ALCcontext *context, ALenum param, ALfloat val)
1167 { (void)effect;(void)param;(void)val; alSetError(context, AL_INVALID_ENUM); }
1168 static void null_SetParamfv(ALeffect *effect, ALCcontext *context, ALenum param, const ALfloat *vals)
1169 { (void)effect;(void)param;(void)vals; alSetError(context, AL_INVALID_ENUM); }
1170
1171 static void null_GetParami(ALeffect *effect, ALCcontext *context, ALenum param, ALint *val)
1172 { (void)effect;(void)param;(void)val; alSetError(context, AL_INVALID_ENUM); }
1173 static void null_GetParamiv(ALeffect *effect, ALCcontext *context, ALenum param, ALint *vals)
1174 { (void)effect;(void)param;(void)vals; alSetError(context, AL_INVALID_ENUM); }
1175 static void null_GetParamf(ALeffect *effect, ALCcontext *context, ALenum param, ALfloat *val)
1176 { (void)effect;(void)param;(void)val; alSetError(context, AL_INVALID_ENUM); }
1177 static void null_GetParamfv(ALeffect *effect, ALCcontext *context, ALenum param, ALfloat *vals)
1178 { (void)effect;(void)param;(void)vals; alSetError(context, AL_INVALID_ENUM); }
1179
1180
1181 ALenum InitEffect(ALeffect *effect)
1182 {
1183 InitEffectParams(effect, AL_EFFECT_NULL);
1184 return AL_NO_ERROR;
1185 }
1186
1187 ALvoid ReleaseALEffects(ALCdevice *device)
1188 {
1189 ALsizei i;
1190 for(i = 0;i < device->EffectMap.size;i++)
1191 {
1192 ALeffect *temp = device->EffectMap.array[i].value;
1193 device->EffectMap.array[i].value = NULL;
1194
1195 // Release effect structure
1196 FreeThunkEntry(temp->id);
1197 memset(temp, 0, sizeof(ALeffect));
1198 free(temp);
1199 }
1200 }
1201
1202
1203 static void InitEffectParams(ALeffect *effect, ALenum type)
1204 {
1205 switch(type)
1206 {
1207 case AL_EFFECT_EAXREVERB:
1208 effect->Reverb.Density = AL_EAXREVERB_DEFAULT_DENSITY;
1209 effect->Reverb.Diffusion = AL_EAXREVERB_DEFAULT_DIFFUSION;
1210 effect->Reverb.Gain = AL_EAXREVERB_DEFAULT_GAIN;
1211 effect->Reverb.GainHF = AL_EAXREVERB_DEFAULT_GAINHF;
1212 effect->Reverb.GainLF = AL_EAXREVERB_DEFAULT_GAINLF;
1213 effect->Reverb.DecayTime = AL_EAXREVERB_DEFAULT_DECAY_TIME;
1214 effect->Reverb.DecayHFRatio = AL_EAXREVERB_DEFAULT_DECAY_HFRATIO;
1215 effect->Reverb.DecayLFRatio = AL_EAXREVERB_DEFAULT_DECAY_LFRATIO;
1216 effect->Reverb.ReflectionsGain = AL_EAXREVERB_DEFAULT_REFLECTIONS_GAIN;
1217 effect->Reverb.ReflectionsDelay = AL_EAXREVERB_DEFAULT_REFLECTIONS_DELAY;
1218 effect->Reverb.ReflectionsPan[0] = AL_EAXREVERB_DEFAULT_REFLECTIONS_PAN_XYZ;
1219 effect->Reverb.ReflectionsPan[1] = AL_EAXREVERB_DEFAULT_REFLECTIONS_PAN_XYZ;
1220 effect->Reverb.ReflectionsPan[2] = AL_EAXREVERB_DEFAULT_REFLECTIONS_PAN_XYZ;
1221 effect->Reverb.LateReverbGain = AL_EAXREVERB_DEFAULT_LATE_REVERB_GAIN;
1222 effect->Reverb.LateReverbDelay = AL_EAXREVERB_DEFAULT_LATE_REVERB_DELAY;
1223 effect->Reverb.LateReverbPan[0] = AL_EAXREVERB_DEFAULT_LATE_REVERB_PAN_XYZ;
1224 effect->Reverb.LateReverbPan[1] = AL_EAXREVERB_DEFAULT_LATE_REVERB_PAN_XYZ;
1225 effect->Reverb.LateReverbPan[2] = AL_EAXREVERB_DEFAULT_LATE_REVERB_PAN_XYZ;
1226 effect->Reverb.EchoTime = AL_EAXREVERB_DEFAULT_ECHO_TIME;
1227 effect->Reverb.EchoDepth = AL_EAXREVERB_DEFAULT_ECHO_DEPTH;
1228 effect->Reverb.ModulationTime = AL_EAXREVERB_DEFAULT_MODULATION_TIME;
1229 effect->Reverb.ModulationDepth = AL_EAXREVERB_DEFAULT_MODULATION_DEPTH;
1230 effect->Reverb.AirAbsorptionGainHF = AL_EAXREVERB_DEFAULT_AIR_ABSORPTION_GAINHF;
1231 effect->Reverb.HFReference = AL_EAXREVERB_DEFAULT_HFREFERENCE;
1232 effect->Reverb.LFReference = AL_EAXREVERB_DEFAULT_LFREFERENCE;
1233 effect->Reverb.RoomRolloffFactor = AL_EAXREVERB_DEFAULT_ROOM_ROLLOFF_FACTOR;
1234 effect->Reverb.DecayHFLimit = AL_EAXREVERB_DEFAULT_DECAY_HFLIMIT;
1235 effect->SetParami = eaxreverb_SetParami;
1236 effect->SetParamiv = eaxreverb_SetParamiv;
1237 effect->SetParamf = eaxreverb_SetParamf;
1238 effect->SetParamfv = eaxreverb_SetParamfv;
1239 effect->GetParami = eaxreverb_GetParami;
1240 effect->GetParamiv = eaxreverb_GetParamiv;
1241 effect->GetParamf = eaxreverb_GetParamf;
1242 effect->GetParamfv = eaxreverb_GetParamfv;
1243 break;
1244 case AL_EFFECT_REVERB:
1245 effect->Reverb.Density = AL_REVERB_DEFAULT_DENSITY;
1246 effect->Reverb.Diffusion = AL_REVERB_DEFAULT_DIFFUSION;
1247 effect->Reverb.Gain = AL_REVERB_DEFAULT_GAIN;
1248 effect->Reverb.GainHF = AL_REVERB_DEFAULT_GAINHF;
1249 effect->Reverb.DecayTime = AL_REVERB_DEFAULT_DECAY_TIME;
1250 effect->Reverb.DecayHFRatio = AL_REVERB_DEFAULT_DECAY_HFRATIO;
1251 effect->Reverb.ReflectionsGain = AL_REVERB_DEFAULT_REFLECTIONS_GAIN;
1252 effect->Reverb.ReflectionsDelay = AL_REVERB_DEFAULT_REFLECTIONS_DELAY;
1253 effect->Reverb.LateReverbGain = AL_REVERB_DEFAULT_LATE_REVERB_GAIN;
1254 effect->Reverb.LateReverbDelay = AL_REVERB_DEFAULT_LATE_REVERB_DELAY;
1255 effect->Reverb.AirAbsorptionGainHF = AL_REVERB_DEFAULT_AIR_ABSORPTION_GAINHF;
1256 effect->Reverb.RoomRolloffFactor = AL_REVERB_DEFAULT_ROOM_ROLLOFF_FACTOR;
1257 effect->Reverb.DecayHFLimit = AL_REVERB_DEFAULT_DECAY_HFLIMIT;
1258 effect->SetParami = reverb_SetParami;
1259 effect->SetParamiv = reverb_SetParamiv;
1260 effect->SetParamf = reverb_SetParamf;
1261 effect->SetParamfv = reverb_SetParamfv;
1262 effect->GetParami = reverb_GetParami;
1263 effect->GetParamiv = reverb_GetParamiv;
1264 effect->GetParamf = reverb_GetParamf;
1265 effect->GetParamfv = reverb_GetParamfv;
1266 break;
1267 case AL_EFFECT_ECHO:
1268 effect->Echo.Delay = AL_ECHO_DEFAULT_DELAY;
1269 effect->Echo.LRDelay = AL_ECHO_DEFAULT_LRDELAY;
1270 effect->Echo.Damping = AL_ECHO_DEFAULT_DAMPING;
1271 effect->Echo.Feedback = AL_ECHO_DEFAULT_FEEDBACK;
1272 effect->Echo.Spread = AL_ECHO_DEFAULT_SPREAD;
1273 effect->SetParami = echo_SetParami;
1274 effect->SetParamiv = echo_SetParamiv;
1275 effect->SetParamf = echo_SetParamf;
1276 effect->SetParamfv = echo_SetParamfv;
1277 effect->GetParami = echo_GetParami;
1278 effect->GetParamiv = echo_GetParamiv;
1279 effect->GetParamf = echo_GetParamf;
1280 effect->GetParamfv = echo_GetParamfv;
1281 break;
1282 case AL_EFFECT_RING_MODULATOR:
1283 effect->Modulator.Frequency = AL_RING_MODULATOR_DEFAULT_FREQUENCY;
1284 effect->Modulator.HighPassCutoff = AL_RING_MODULATOR_DEFAULT_HIGHPASS_CUTOFF;
1285 effect->Modulator.Waveform = AL_RING_MODULATOR_DEFAULT_WAVEFORM;
1286 effect->SetParami = mod_SetParami;
1287 effect->SetParamiv = mod_SetParamiv;
1288 effect->SetParamf = mod_SetParamf;
1289 effect->SetParamfv = mod_SetParamfv;
1290 effect->GetParami = mod_GetParami;
1291 effect->GetParamiv = mod_GetParamiv;
1292 effect->GetParamf = mod_GetParamf;
1293 effect->GetParamfv = mod_GetParamfv;
1294 break;
1295 case AL_EFFECT_DEDICATED_LOW_FREQUENCY_EFFECT:
1296 case AL_EFFECT_DEDICATED_DIALOGUE:
1297 effect->Dedicated.Gain = 1.0f;
1298 effect->SetParami = ded_SetParami;
1299 effect->SetParamiv = ded_SetParamiv;
1300 effect->SetParamf = ded_SetParamf;
1301 effect->SetParamfv = ded_SetParamfv;
1302 effect->GetParami = ded_GetParami;
1303 effect->GetParamiv = ded_GetParamiv;
1304 effect->GetParamf = ded_GetParamf;
1305 effect->GetParamfv = ded_GetParamfv;
1306 break;
1307 default:
1308 effect->SetParami = null_SetParami;
1309 effect->SetParamiv = null_SetParamiv;
1310 effect->SetParamf = null_SetParamf;
1311 effect->SetParamfv = null_SetParamfv;
1312 effect->GetParami = null_GetParami;
1313 effect->GetParamiv = null_GetParamiv;
1314 effect->GetParamf = null_GetParamf;
1315 effect->GetParamfv = null_GetParamfv;
1316 break;
1317 }
1318 effect->type = type;
1319 }
1320
1321
1322 #include "AL/efx-presets.h"
1323
1324 #define DECL(x) { #x, EFX_REVERB_PRESET_##x }
1325 static const struct {
1326 const char name[32];
1327 EFXEAXREVERBPROPERTIES props;
1328 } reverblist[] = {
1329 DECL(GENERIC),
1330 DECL(PADDEDCELL),
1331 DECL(ROOM),
1332 DECL(BATHROOM),
1333 DECL(LIVINGROOM),
1334 DECL(STONEROOM),
1335 DECL(AUDITORIUM),
1336 DECL(CONCERTHALL),
1337 DECL(CAVE),
1338 DECL(ARENA),
1339 DECL(HANGAR),
1340 DECL(CARPETEDHALLWAY),
1341 DECL(HALLWAY),
1342 DECL(STONECORRIDOR),
1343 DECL(ALLEY),
1344 DECL(FOREST),
1345 DECL(CITY),
1346 DECL(MOUNTAINS),
1347 DECL(QUARRY),
1348 DECL(PLAIN),
1349 DECL(PARKINGLOT),
1350 DECL(SEWERPIPE),
1351 DECL(UNDERWATER),
1352 DECL(DRUGGED),
1353 DECL(DIZZY),
1354 DECL(PSYCHOTIC),
1355
1356 DECL(CASTLE_SMALLROOM),
1357 DECL(CASTLE_SHORTPASSAGE),
1358 DECL(CASTLE_MEDIUMROOM),
1359 DECL(CASTLE_LARGEROOM),
1360 DECL(CASTLE_LONGPASSAGE),
1361 DECL(CASTLE_HALL),
1362 DECL(CASTLE_CUPBOARD),
1363 DECL(CASTLE_COURTYARD),
1364 DECL(CASTLE_ALCOVE),
1365
1366 DECL(FACTORY_SMALLROOM),
1367 DECL(FACTORY_SHORTPASSAGE),
1368 DECL(FACTORY_MEDIUMROOM),
1369 DECL(FACTORY_LARGEROOM),
1370 DECL(FACTORY_LONGPASSAGE),
1371 DECL(FACTORY_HALL),
1372 DECL(FACTORY_CUPBOARD),
1373 DECL(FACTORY_COURTYARD),
1374 DECL(FACTORY_ALCOVE),
1375
1376 DECL(ICEPALACE_SMALLROOM),
1377 DECL(ICEPALACE_SHORTPASSAGE),
1378 DECL(ICEPALACE_MEDIUMROOM),
1379 DECL(ICEPALACE_LARGEROOM),
1380 DECL(ICEPALACE_LONGPASSAGE),
1381 DECL(ICEPALACE_HALL),
1382 DECL(ICEPALACE_CUPBOARD),
1383 DECL(ICEPALACE_COURTYARD),
1384 DECL(ICEPALACE_ALCOVE),
1385
1386 DECL(SPACESTATION_SMALLROOM),
1387 DECL(SPACESTATION_SHORTPASSAGE),
1388 DECL(SPACESTATION_MEDIUMROOM),
1389 DECL(SPACESTATION_LARGEROOM),
1390 DECL(SPACESTATION_LONGPASSAGE),
1391 DECL(SPACESTATION_HALL),
1392 DECL(SPACESTATION_CUPBOARD),
1393 DECL(SPACESTATION_ALCOVE),
1394
1395 DECL(WOODEN_SMALLROOM),
1396 DECL(WOODEN_SHORTPASSAGE),
1397 DECL(WOODEN_MEDIUMROOM),
1398 DECL(WOODEN_LARGEROOM),
1399 DECL(WOODEN_LONGPASSAGE),
1400 DECL(WOODEN_HALL),
1401 DECL(WOODEN_CUPBOARD),
1402 DECL(WOODEN_COURTYARD),
1403 DECL(WOODEN_ALCOVE),
1404
1405 DECL(SPORT_EMPTYSTADIUM),
1406 DECL(SPORT_SQUASHCOURT),
1407 DECL(SPORT_SMALLSWIMMINGPOOL),
1408 DECL(SPORT_LARGESWIMMINGPOOL),
1409 DECL(SPORT_GYMNASIUM),
1410 DECL(SPORT_FULLSTADIUM),
1411 DECL(SPORT_STADIUMTANNOY),
1412
1413 DECL(PREFAB_WORKSHOP),
1414 DECL(PREFAB_SCHOOLROOM),
1415 DECL(PREFAB_PRACTISEROOM),
1416 DECL(PREFAB_OUTHOUSE),
1417 DECL(PREFAB_CARAVAN),
1418
1419 DECL(DOME_TOMB),
1420 DECL(PIPE_SMALL),
1421 DECL(DOME_SAINTPAULS),
1422 DECL(PIPE_LONGTHIN),
1423 DECL(PIPE_LARGE),
1424 DECL(PIPE_RESONANT),
1425
1426 DECL(OUTDOORS_BACKYARD),
1427 DECL(OUTDOORS_ROLLINGPLAINS),
1428 DECL(OUTDOORS_DEEPCANYON),
1429 DECL(OUTDOORS_CREEK),
1430 DECL(OUTDOORS_VALLEY),
1431
1432 DECL(MOOD_HEAVEN),
1433 DECL(MOOD_HELL),
1434 DECL(MOOD_MEMORY),
1435
1436 DECL(DRIVING_COMMENTATOR),
1437 DECL(DRIVING_PITGARAGE),
1438 DECL(DRIVING_INCAR_RACER),
1439 DECL(DRIVING_INCAR_SPORTS),
1440 DECL(DRIVING_INCAR_LUXURY),
1441 DECL(DRIVING_FULLGRANDSTAND),
1442 DECL(DRIVING_EMPTYGRANDSTAND),
1443 DECL(DRIVING_TUNNEL),
1444
1445 DECL(CITY_STREETS),
1446 DECL(CITY_SUBWAY),
1447 DECL(CITY_MUSEUM),
1448 DECL(CITY_LIBRARY),
1449 DECL(CITY_UNDERPASS),
1450 DECL(CITY_ABANDONED),
1451
1452 DECL(DUSTYROOM),
1453 DECL(CHAPEL),
1454 DECL(SMALLWATERROOM),
1455 };
1456 #undef DECL
1457 static const ALsizei reverblistsize = COUNTOF(reverblist);
1458
1459 ALvoid LoadReverbPreset(const char *name, ALeffect *effect)
1460 {
1461 int i;
1462
1463 if(strcasecmp(name, "NONE") == 0)
1464 {
1465 InitEffectParams(effect, AL_EFFECT_NULL);
1466 TRACE("Loading reverb '%s'\n", "NONE");
1467 return;
1468 }
1469
1470 if(!DisabledEffects[EAXREVERB])
1471 InitEffectParams(effect, AL_EFFECT_EAXREVERB);
1472 else if(!DisabledEffects[REVERB])
1473 InitEffectParams(effect, AL_EFFECT_REVERB);
1474 else
1475 InitEffectParams(effect, AL_EFFECT_NULL);
1476 for(i = 0;i < reverblistsize;i++)
1477 {
1478 const EFXEAXREVERBPROPERTIES *props;
1479
1480 if(strcasecmp(name, reverblist[i].name) != 0)
1481 continue;
1482
1483 TRACE("Loading reverb '%s'\n", reverblist[i].name);
1484 props = &reverblist[i].props;
1485 effect->Reverb.Density = props->flDensity;
1486 effect->Reverb.Diffusion = props->flDiffusion;
1487 effect->Reverb.Gain = props->flGain;
1488 effect->Reverb.GainHF = props->flGainHF;
1489 effect->Reverb.GainLF = props->flGainLF;
1490 effect->Reverb.DecayTime = props->flDecayTime;
1491 effect->Reverb.DecayHFRatio = props->flDecayHFRatio;
1492 effect->Reverb.DecayLFRatio = props->flDecayLFRatio;
1493 effect->Reverb.ReflectionsGain = props->flReflectionsGain;
1494 effect->Reverb.ReflectionsDelay = props->flReflectionsDelay;
1495 effect->Reverb.ReflectionsPan[0] = props->flReflectionsPan[0];
1496 effect->Reverb.ReflectionsPan[1] = props->flReflectionsPan[1];
1497 effect->Reverb.ReflectionsPan[2] = props->flReflectionsPan[2];
1498 effect->Reverb.LateReverbGain = props->flLateReverbGain;
1499 effect->Reverb.LateReverbDelay = props->flLateReverbDelay;
1500 effect->Reverb.LateReverbPan[0] = props->flLateReverbPan[0];
1501 effect->Reverb.LateReverbPan[1] = props->flLateReverbPan[1];
1502 effect->Reverb.LateReverbPan[2] = props->flLateReverbPan[2];
1503 effect->Reverb.EchoTime = props->flEchoTime;
1504 effect->Reverb.EchoDepth = props->flEchoDepth;
1505 effect->Reverb.ModulationTime = props->flModulationTime;
1506 effect->Reverb.ModulationDepth = props->flModulationDepth;
1507 effect->Reverb.AirAbsorptionGainHF = props->flAirAbsorptionGainHF;
1508 effect->Reverb.HFReference = props->flHFReference;
1509 effect->Reverb.LFReference = props->flLFReference;
1510 effect->Reverb.RoomRolloffFactor = props->flRoomRolloffFactor;
1511 effect->Reverb.DecayHFLimit = props->iDecayHFLimit;
1512 break;
1513 }
1514 if(i == reverblistsize)
1515 WARN("Reverb preset '%s' not found\n", name);
1516 }
ALeffect::GainHF
ALfloat GainHF
Definition: alEffect.h:34
EFXEAXREVERBPROPERTIES
Definition: efx-presets.h:8
ALeffect_GetParamfv
#define ALeffect_GetParamfv(x, c, p, v)
Definition: alEffect.h:100
AL_EAXREVERB_LATE_REVERB_DELAY
#define AL_EAXREVERB_LATE_REVERB_DELAY
Definition: efx.h:63
ALeffect::Spread
ALfloat Spread
Definition: alEffect.h:65
AL_APIENTRY
#define AL_APIENTRY
Definition: al.h:21
AL_EAXREVERB_DEFAULT_LATE_REVERB_DELAY
#define AL_EAXREVERB_DEFAULT_LATE_REVERB_DELAY
Definition: efx.h:420
AL_REVERB_MAX_DENSITY
#define AL_REVERB_MAX_DENSITY
Definition: efx.h:320
AL_EAXREVERB_DEFAULT_DIFFUSION
#define AL_EAXREVERB_DEFAULT_DIFFUSION
Definition: efx.h:378
AL_EAXREVERB_LATE_REVERB_GAIN
#define AL_EAXREVERB_LATE_REVERB_GAIN
Definition: efx.h:62
AL_REVERB_DEFAULT_REFLECTIONS_DELAY
#define AL_REVERB_DEFAULT_REFLECTIONS_DELAY
Definition: efx.h:349
AL_REVERB_GAIN
#define AL_REVERB_GAIN
Definition: efx.h:38
FreeThunkEntry
void FreeThunkEntry(ALuint index)
Definition: alThunk.c:83
AL_EFFECT_TYPE
#define AL_EFFECT_TYPE
Definition: efx.h:151
AL_REVERB_MAX_LATE_REVERB_DELAY
#define AL_REVERB_MAX_LATE_REVERB_DELAY
Definition: efx.h:356
val
GLuint const GLfloat * val
Definition: glew.h:2715
AL_REVERB_MIN_DIFFUSION
#define AL_REVERB_MIN_DIFFUSION
Definition: efx.h:323
AL_REVERB_MIN_DECAY_HFLIMIT
#define AL_REVERB_MIN_DECAY_HFLIMIT
Definition: efx.h:367
props
GLenum GLuint GLsizei const GLenum * props
Definition: glew.h:5068
null_SetParamfv
static void null_SetParamfv(ALeffect *effect, ALCcontext *context, ALenum param, const ALfloat *vals)
Definition: alEffect.c:1168
AL_EAXREVERB_MAX_REFLECTIONS_DELAY
#define AL_EAXREVERB_MAX_REFLECTIONS_DELAY
Definition: efx.h:409
EFXEAXREVERBPROPERTIES::flModulationDepth
float flModulationDepth
Definition: efx-presets.h:26
null_GetParamiv
static void null_GetParamiv(ALeffect *effect, ALCcontext *context, ALenum param, ALint *vals)
Definition: alEffect.c:1173
ALvoid
void ALvoid
Definition: al.h:74
param
GLenum GLint param
Definition: gl2ext.h:1491
AL_REVERB_MAX_AIR_ABSORPTION_GAINHF
#define AL_REVERB_MAX_AIR_ABSORPTION_GAINHF
Definition: efx.h:360
ALeffect::SetParamfv
void(* SetParamfv)(struct ALeffect *effect, ALCcontext *context, ALenum param, const ALfloat *vals)
Definition: alEffect.h:81
echo_GetParami
static void echo_GetParami(ALeffect *effect, ALCcontext *context, ALenum param, ALint *val)
Definition: alEffect.c:968
AL_ECHO_MAX_FEEDBACK
#define AL_ECHO_MAX_FEEDBACK
Definition: efx.h:523
AL_REVERB_REFLECTIONS_GAIN
#define AL_REVERB_REFLECTIONS_GAIN
Definition: efx.h:42
ded_GetParamf
static void ded_GetParamf(ALeffect *effect, ALCcontext *context, ALenum param, ALfloat *val)
Definition: alEffect.c:1143
ALeffect::Reverb
struct ALeffect::@52 Reverb
AL_EAXREVERB_DIFFUSION
#define AL_EAXREVERB_DIFFUSION
Definition: efx.h:52
ded_SetParamf
static void ded_SetParamf(ALeffect *effect, ALCcontext *context, ALenum param, ALfloat val)
Definition: alEffect.c:1116
ALeffect::GetParami
void(* GetParami)(struct ALeffect *effect, ALCcontext *context, ALenum param, ALint *val)
Definition: alEffect.h:83
mod_SetParami
static void mod_SetParami(ALeffect *effect, ALCcontext *context, ALenum param, ALint val)
Definition: alEffect.c:1038
ALeffect::Frequency
ALfloat Frequency
Definition: alEffect.h:69
type
GLint GLenum GLsizei GLsizei GLsizei GLint GLenum GLenum type
Definition: gl2ext.h:845
EffectList
Definition: alMain.h:530
void
GLvoid **typedef void(GLAPIENTRY *PFNGLGETVERTEXATTRIBDVPROC)(GLuint
Definition: glew.h:1824
CHECK_VALUE
#define CHECK_VALUE(ctx, cond)
Definition: alMain.h:875
AL_EAXREVERB_MAX_LATE_REVERB_GAIN
#define AL_EAXREVERB_MAX_LATE_REVERB_GAIN
Definition: efx.h:415
AL_TRUE
#define AL_TRUE
Definition: al.h:86
AL_REVERB_LATE_REVERB_DELAY
#define AL_REVERB_LATE_REVERB_DELAY
Definition: efx.h:45
ALeffect::ModulationTime
ALfloat ModulationTime
Definition: alEffect.h:52
AL_EAXREVERB_MIN_GAIN
#define AL_EAXREVERB_MIN_GAIN
Definition: efx.h:380
NULL
#define NULL
Definition: ftobjs.h:61
AL_EAXREVERB_DEFAULT_REFLECTIONS_GAIN
#define AL_EAXREVERB_DEFAULT_REFLECTIONS_GAIN
Definition: efx.h:406
TRACE
#define TRACE(...)
Definition: alMain.h:806
AL_REVERB_MAX_DIFFUSION
#define AL_REVERB_MAX_DIFFUSION
Definition: efx.h:324
ALeffect::LFReference
ALfloat LFReference
Definition: alEffect.h:55
ded_GetParamiv
static void ded_GetParamiv(ALeffect *effect, ALCcontext *context, ALenum param, ALint *vals)
Definition: alEffect.c:1139
AL_EAXREVERB_DEFAULT_LATE_REVERB_PAN_XYZ
#define AL_EAXREVERB_DEFAULT_LATE_REVERB_PAN_XYZ
Definition: efx.h:422
f
GLclampf f
Definition: glew.h:3390
AL_ECHO_DEFAULT_FEEDBACK
#define AL_ECHO_DEFAULT_FEEDBACK
Definition: efx.h:524
UIntMap::array
struct UIntMap::@59 * array
AL_REVERB_MAX_GAINHF
#define AL_REVERB_MAX_GAINHF
Definition: efx.h:332
AL_EAXREVERB_ECHO_TIME
#define AL_EAXREVERB_ECHO_TIME
Definition: efx.h:65
AL_EAXREVERB_MAX_GAINLF
#define AL_EAXREVERB_MAX_GAINLF
Definition: efx.h:389
AL_EAXREVERB_REFLECTIONS_DELAY
#define AL_EAXREVERB_REFLECTIONS_DELAY
Definition: efx.h:60
reverb_SetParamfv
static void reverb_SetParamfv(ALeffect *effect, ALCcontext *context, ALenum param, const ALfloat *vals)
Definition: alEffect.c:828
null_SetParamf
static void null_SetParamf(ALeffect *effect, ALCcontext *context, ALenum param, ALfloat val)
Definition: alEffect.c:1166
AL_ECHO_FEEDBACK
#define AL_ECHO_FEEDBACK
Definition: efx.h:94
echo_GetParamf
static void echo_GetParamf(ALeffect *effect, ALCcontext *context, ALenum param, ALfloat *val)
Definition: alEffect.c:974
AL_REVERB_MAX_ROOM_ROLLOFF_FACTOR
#define AL_REVERB_MAX_ROOM_ROLLOFF_FACTOR
Definition: efx.h:364
AL_EAXREVERB_DEFAULT_HFREFERENCE
#define AL_EAXREVERB_DEFAULT_HFREFERENCE
Definition: efx.h:446
AL_REVERB_MIN_GAIN
#define AL_REVERB_MIN_GAIN
Definition: efx.h:327
al_throwerr
#define al_throwerr(ctx, err)
Definition: alMain.h:866
n
GLclampd n
Definition: glew.h:7287
AL_INVALID_VALUE
#define AL_INVALID_VALUE
Definition: al.h:373
AL_EAXREVERB_MIN_HFREFERENCE
#define AL_EAXREVERB_MIN_HFREFERENCE
Definition: efx.h:444
EFXEAXREVERBPROPERTIES::flReflectionsPan
float flReflectionsPan[3]
Definition: efx-presets.h:19
eaxreverb_SetParamfv
static void eaxreverb_SetParamfv(ALeffect *effect, ALCcontext *context, ALenum param, const ALfloat *vals)
Definition: alEffect.c:535
AL_EAXREVERB_DEFAULT_MODULATION_TIME
#define AL_EAXREVERB_DEFAULT_MODULATION_TIME
Definition: efx.h:434
ALeffect::ReflectionsGain
ALfloat ReflectionsGain
Definition: alEffect.h:37
alIsEffect
LPALISEFFECT alIsEffect
Definition: alreverb.c:52
eaxreverb_GetParamiv
static void eaxreverb_GetParamiv(ALeffect *effect, ALCcontext *context, ALenum param, ALint *vals)
Definition: alEffect.c:583
ALsizei
int ALsizei
Definition: al.h:62
free
SDL_EventEntry * free
Definition: SDL_events.c:80
AL_EAXREVERB_DECAY_HFRATIO
#define AL_EAXREVERB_DECAY_HFRATIO
Definition: efx.h:57
AL_ECHO_DELAY
#define AL_ECHO_DELAY
Definition: efx.h:91
al_try
#define al_try
Definition: alMain.h:838
AL_REVERB_MAX_REFLECTIONS_DELAY
#define AL_REVERB_MAX_REFLECTIONS_DELAY
Definition: efx.h:348
AL_REVERB_DECAY_HFRATIO
#define AL_REVERB_DECAY_HFRATIO
Definition: efx.h:41
ALCdevice_struct
Definition: alMain.h:560
ALint
int ALint
Definition: al.h:56
AL_EAXREVERB_DEFAULT_LATE_REVERB_GAIN
#define AL_EAXREVERB_DEFAULT_LATE_REVERB_GAIN
Definition: efx.h:416
memset
#define memset
Definition: SDL_malloc.c:633
ALeffect_GetParamiv
#define ALeffect_GetParamiv(x, c, p, v)
Definition: alEffect.h:98
AL_FALSE
#define AL_FALSE
Definition: al.h:83
AL_EAXREVERB_HFREFERENCE
#define AL_EAXREVERB_HFREFERENCE
Definition: efx.h:70
AL_REVERB_MIN_LATE_REVERB_DELAY
#define AL_REVERB_MIN_LATE_REVERB_DELAY
Definition: efx.h:355
AL_EAXREVERB_MAX_HFREFERENCE
#define AL_EAXREVERB_MAX_HFREFERENCE
Definition: efx.h:445
AL_EAXREVERB_MAX_LATE_REVERB_DELAY
#define AL_EAXREVERB_MAX_LATE_REVERB_DELAY
Definition: efx.h:419
AL_EAXREVERB_MIN_MODULATION_DEPTH
#define AL_EAXREVERB_MIN_MODULATION_DEPTH
Definition: efx.h:436
AL_EAXREVERB_MODULATION_DEPTH
#define AL_EAXREVERB_MODULATION_DEPTH
Definition: efx.h:68
AL_REVERB_GAINHF
#define AL_REVERB_GAINHF
Definition: efx.h:39
mod_SetParamfv
static void mod_SetParamfv(ALeffect *effect, ALCcontext *context, ALenum param, const ALfloat *vals)
Definition: alEffect.c:1034
AL_EAXREVERB_MAX_DECAY_HFRATIO
#define AL_EAXREVERB_MAX_DECAY_HFRATIO
Definition: efx.h:397
ALeffect::ReflectionsPan
ALfloat ReflectionsPan[3]
Definition: alEffect.h:48
AL_REVERB_MIN_GAINHF
#define AL_REVERB_MIN_GAINHF
Definition: efx.h:331
name
EGLImageKHR EGLint * name
Definition: eglext.h:284
AL_RING_MODULATOR_MAX_HIGHPASS_CUTOFF
#define AL_RING_MODULATOR_MAX_HIGHPASS_CUTOFF
Definition: efx.h:650
alError.h
AL_RING_MODULATOR_MAX_FREQUENCY
#define AL_RING_MODULATOR_MAX_FREQUENCY
Definition: efx.h:646
ALeffect::Modulator
struct ALeffect::@54 Modulator
AL_ECHO_MIN_DELAY
#define AL_ECHO_MIN_DELAY
Definition: efx.h:510
AL_REVERB_DECAY_TIME
#define AL_REVERB_DECAY_TIME
Definition: efx.h:40
ALeffect::Echo
struct ALeffect::@53 Echo
al_endtry
#define al_endtry
Definition: alMain.h:853
AL_REVERB_MAX_GAIN
#define AL_REVERB_MAX_GAIN
Definition: efx.h:328
EFXEAXREVERBPROPERTIES::flReflectionsGain
float flReflectionsGain
Definition: efx-presets.h:17
ALeffect::Diffusion
ALfloat Diffusion
Definition: alEffect.h:32
alGetEffecti
LPALGETEFFECTI alGetEffecti
Definition: alreverb.c:57
AL_EAXREVERB_DEFAULT_REFLECTIONS_DELAY
#define AL_EAXREVERB_DEFAULT_REFLECTIONS_DELAY
Definition: efx.h:410
AL_REVERB_MIN_ROOM_ROLLOFF_FACTOR
#define AL_REVERB_MIN_ROOM_ROLLOFF_FACTOR
Definition: efx.h:363
AL_EAXREVERB_MAX_DENSITY
#define AL_EAXREVERB_MAX_DENSITY
Definition: efx.h:373
AL_EAXREVERB_MAX_MODULATION_DEPTH
#define AL_EAXREVERB_MAX_MODULATION_DEPTH
Definition: efx.h:437
ded_SetParami
static void ded_SetParami(ALeffect *effect, ALCcontext *context, ALenum param, ALint val)
Definition: alEffect.c:1110
AL_ECHO_SPREAD
#define AL_ECHO_SPREAD
Definition: efx.h:95
ALeffect::id
ALuint id
Definition: alEffect.h:89
ALeffect::DecayLFRatio
ALfloat DecayLFRatio
Definition: alEffect.h:47
GetContextRef
ALCcontext * GetContextRef(void)
Definition: ALc.c:1999
ALCdevice_struct::EffectMap
UIntMap EffectMap
Definition: alMain.h:592
AL_EAXREVERB_MIN_DECAY_TIME
#define AL_EAXREVERB_MIN_DECAY_TIME
Definition: efx.h:392
AL_EAXREVERB_MIN_DECAY_LFRATIO
#define AL_EAXREVERB_MIN_DECAY_LFRATIO
Definition: efx.h:400
alGetEffectf
LPALGETEFFECTF alGetEffectf
Definition: alreverb.c:59
AL_EAXREVERB_MIN_LATE_REVERB_GAIN
#define AL_EAXREVERB_MIN_LATE_REVERB_GAIN
Definition: efx.h:414
ALfloat
float ALfloat
Definition: al.h:68
AL_REVERB_DEFAULT_DIFFUSION
#define AL_REVERB_DEFAULT_DIFFUSION
Definition: efx.h:325
AL_EAXREVERB_MIN_AIR_ABSORPTION_GAINHF
#define AL_EAXREVERB_MIN_AIR_ABSORPTION_GAINHF
Definition: efx.h:440
calloc
#define calloc
Definition: SDL_malloc.c:636
AL_EAXREVERB_MIN_DECAY_HFRATIO
#define AL_EAXREVERB_MIN_DECAY_HFRATIO
Definition: efx.h:396
EFXEAXREVERBPROPERTIES::flHFReference
float flHFReference
Definition: efx-presets.h:28
AL_EAXREVERB_LATE_REVERB_PAN
#define AL_EAXREVERB_LATE_REVERB_PAN
Definition: efx.h:64
ALeffect::SetParamiv
void(* SetParamiv)(struct ALeffect *effect, ALCcontext *context, ALenum param, const ALint *vals)
Definition: alEffect.h:79
EFXEAXREVERBPROPERTIES::flLateReverbPan
float flLateReverbPan[3]
Definition: efx-presets.h:22
ALeffect_SetParami
#define ALeffect_SetParami(x, c, p, v)
Definition: alEffect.h:92
EFXEAXREVERBPROPERTIES::flLFReference
float flLFReference
Definition: efx-presets.h:29
AL_EAXREVERB_DEFAULT_GAINHF
#define AL_EAXREVERB_DEFAULT_GAINHF
Definition: efx.h:386
AL_REVERB_DEFAULT_REFLECTIONS_GAIN
#define AL_REVERB_DEFAULT_REFLECTIONS_GAIN
Definition: efx.h:345
AL_EAXREVERB_MAX_GAINHF
#define AL_EAXREVERB_MAX_GAINHF
Definition: efx.h:385
AL_REVERB_AIR_ABSORPTION_GAINHF
#define AL_REVERB_AIR_ABSORPTION_GAINHF
Definition: efx.h:46
AL_EAXREVERB_MIN_REFLECTIONS_DELAY
#define AL_EAXREVERB_MIN_REFLECTIONS_DELAY
Definition: efx.h:408
AL_ECHO_MIN_FEEDBACK
#define AL_ECHO_MIN_FEEDBACK
Definition: efx.h:522
AL_RING_MODULATOR_MIN_FREQUENCY
#define AL_RING_MODULATOR_MIN_FREQUENCY
Definition: efx.h:645
AL_EAXREVERB_DEFAULT_AIR_ABSORPTION_GAINHF
#define AL_EAXREVERB_DEFAULT_AIR_ABSORPTION_GAINHF
Definition: efx.h:442
EFXEAXREVERBPROPERTIES::flDecayLFRatio
float flDecayLFRatio
Definition: efx-presets.h:16
AL_EAXREVERB_MAX_GAIN
#define AL_EAXREVERB_MAX_GAIN
Definition: efx.h:381
AL_REVERB_DECAY_HFLIMIT
#define AL_REVERB_DECAY_HFLIMIT
Definition: efx.h:48
AL_ECHO_DEFAULT_DELAY
#define AL_ECHO_DEFAULT_DELAY
Definition: efx.h:512
AL_REVERB_MAX_DECAY_TIME
#define AL_REVERB_MAX_DECAY_TIME
Definition: efx.h:336
efx-presets.h
AL_REVERB_MAX_DECAY_HFLIMIT
#define AL_REVERB_MAX_DECAY_HFLIMIT
Definition: efx.h:368
ALeffect::GetParamiv
void(* GetParamiv)(struct ALeffect *effect, ALCcontext *context, ALenum param, ALint *vals)
Definition: alEffect.h:84
ded_SetParamfv
static void ded_SetParamfv(ALeffect *effect, ALCcontext *context, ALenum param, const ALfloat *vals)
Definition: alEffect.c:1132
AL_EAXREVERB_REFLECTIONS_GAIN
#define AL_EAXREVERB_REFLECTIONS_GAIN
Definition: efx.h:59
eaxreverb_GetParamf
static void eaxreverb_GetParamf(ALeffect *effect, ALCcontext *context, ALenum param, ALfloat *val)
Definition: alEffect.c:587
ALeffect::HFReference
ALfloat HFReference
Definition: alEffect.h:54
ALeffect::GetParamf
void(* GetParamf)(struct ALeffect *effect, ALCcontext *context, ALenum param, ALfloat *val)
Definition: alEffect.h:85
UIntMap::value
ALvoid * value
Definition: alMain.h:310
REVERB
Definition: alEffect.h:12
AL_EAXREVERB_MAX_MODULATION_TIME
#define AL_EAXREVERB_MAX_MODULATION_TIME
Definition: efx.h:433
ALeffect::AirAbsorptionGainHF
ALfloat AirAbsorptionGainHF
Definition: alEffect.h:41
ReleaseALEffects
ALvoid ReleaseALEffects(ALCdevice *device)
Definition: alEffect.c:1187
AL_REVERB_DEFAULT_GAIN
#define AL_REVERB_DEFAULT_GAIN
Definition: efx.h:329
EAXREVERB
Definition: alEffect.h:11
EFXEAXREVERBPROPERTIES::flGain
float flGain
Definition: efx-presets.h:11
AL_EAXREVERB_DEFAULT_DECAY_LFRATIO
#define AL_EAXREVERB_DEFAULT_DECAY_LFRATIO
Definition: efx.h:402
AL_REVERB_DEFAULT_LATE_REVERB_DELAY
#define AL_REVERB_DEFAULT_LATE_REVERB_DELAY
Definition: efx.h:357
ALeffect::ReflectionsDelay
ALfloat ReflectionsDelay
Definition: alEffect.h:38
AL_EAXREVERB_MAX_DIFFUSION
#define AL_EAXREVERB_MAX_DIFFUSION
Definition: efx.h:377
ALeffect::Delay
ALfloat Delay
Definition: alEffect.h:59
AL_EAXREVERB_DEFAULT_ROOM_ROLLOFF_FACTOR
#define AL_EAXREVERB_DEFAULT_ROOM_ROLLOFF_FACTOR
Definition: efx.h:454
alEffectf
LPALEFFECTF alEffectf
Definition: alreverb.c:55
ded_GetParami
static void ded_GetParami(ALeffect *effect, ALCcontext *context, ALenum param, ALint *val)
Definition: alEffect.c:1137
AL_REVERB_DIFFUSION
#define AL_REVERB_DIFFUSION
Definition: efx.h:37
mod_SetParamiv
static void mod_SetParamiv(ALeffect *effect, ALCcontext *context, ALenum param, const ALint *vals)
Definition: alEffect.c:1060
ALeffect::HighPassCutoff
ALfloat HighPassCutoff
Definition: alEffect.h:70
null_GetParamf
static void null_GetParamf(ALeffect *effect, ALCcontext *context, ALenum param, ALfloat *val)
Definition: alEffect.c:1175
AL_EAXREVERB_DEFAULT_GAINLF
#define AL_EAXREVERB_DEFAULT_GAINLF
Definition: efx.h:390
AL_REVERB_DEFAULT_LATE_REVERB_GAIN
#define AL_REVERB_DEFAULT_LATE_REVERB_GAIN
Definition: efx.h:353
EFXEAXREVERBPROPERTIES::flGainHF
float flGainHF
Definition: efx-presets.h:12
AL_REVERB_REFLECTIONS_DELAY
#define AL_REVERB_REFLECTIONS_DELAY
Definition: efx.h:43
reverb_SetParamiv
static void reverb_SetParamiv(ALeffect *effect, ALCcontext *context, ALenum param, const ALint *vals)
Definition: alEffect.c:719
mod_SetParamf
static void mod_SetParamf(ALeffect *effect, ALCcontext *context, ALenum param, ALfloat val)
Definition: alEffect.c:1009
result
GLuint64EXT * result
Definition: glew.h:12708
echo_SetParami
static void echo_SetParami(ALeffect *effect, ALCcontext *context, ALenum param, ALint val)
Definition: alEffect.c:913
ALeffect::LateReverbDelay
ALfloat LateReverbDelay
Definition: alEffect.h:40
mod_GetParami
static void mod_GetParami(ALeffect *effect, ALCcontext *context, ALenum param, ALint *val)
Definition: alEffect.c:1065
AL_EAXREVERB_DEFAULT_ECHO_DEPTH
#define AL_EAXREVERB_DEFAULT_ECHO_DEPTH
Definition: efx.h:430
alMain.h
ALeffect::LRDelay
ALfloat LRDelay
Definition: alEffect.h:60
al_catchany
#define al_catchany()
Definition: alMain.h:851
AL_REVERB_MIN_DENSITY
#define AL_REVERB_MIN_DENSITY
Definition: efx.h:319
AL_ECHO_DAMPING
#define AL_ECHO_DAMPING
Definition: efx.h:93
AL_INVALID_NAME
#define AL_INVALID_NAME
Definition: al.h:367
ALeffect::DecayHFRatio
ALfloat DecayHFRatio
Definition: alEffect.h:36
AL_EAXREVERB_MAX_LFREFERENCE
#define AL_EAXREVERB_MAX_LFREFERENCE
Definition: efx.h:449
ALeffect::RoomRolloffFactor
ALfloat RoomRolloffFactor
Definition: alEffect.h:42
reverb_GetParamiv
static void reverb_GetParamiv(ALeffect *effect, ALCcontext *context, ALenum param, ALint *vals)
Definition: alEffect.c:846
ROOM
#define ROOM()
Definition: infback.c:201
echo_SetParamfv
static void echo_SetParamfv(ALeffect *effect, ALCcontext *context, ALenum param, const ALfloat *vals)
Definition: alEffect.c:963
AL_REVERB_MIN_LATE_REVERB_GAIN
#define AL_REVERB_MIN_LATE_REVERB_GAIN
Definition: efx.h:351
eaxreverb_SetParami
static void eaxreverb_SetParami(ALeffect *effect, ALCcontext *context, ALenum param, ALint val)
Definition: alEffect.c:347
AL_EAXREVERB_DEFAULT_GAIN
#define AL_EAXREVERB_DEFAULT_GAIN
Definition: efx.h:382
AL_EFFECT_REVERB
#define AL_EFFECT_REVERB
Definition: efx.h:155
RemoveEffect
#define RemoveEffect(m, k)
Definition: alMain.h:671
AL_ECHO_LRDELAY
#define AL_ECHO_LRDELAY
Definition: efx.h:92
AL_EAXREVERB_MODULATION_TIME
#define AL_EAXREVERB_MODULATION_TIME
Definition: efx.h:67
AL_EFFECT_DEDICATED_DIALOGUE
#define AL_EFFECT_DEDICATED_DIALOGUE
Definition: alext.h:202
AL_ECHO_DEFAULT_SPREAD
#define AL_ECHO_DEFAULT_SPREAD
Definition: efx.h:528
UIntMap::size
ALsizei size
Definition: alMain.h:312
ALeffect::EchoDepth
ALfloat EchoDepth
Definition: alEffect.h:51
InitEffect
ALenum InitEffect(ALeffect *effect)
Definition: alEffect.c:1181
InitEffectParams
static void InitEffectParams(ALeffect *effect, ALenum type)
Definition: alEffect.c:1203
AL_EAXREVERB_MIN_MODULATION_TIME
#define AL_EAXREVERB_MIN_MODULATION_TIME
Definition: efx.h:432
AL_EAXREVERB_MAX_ECHO_TIME
#define AL_EAXREVERB_MAX_ECHO_TIME
Definition: efx.h:425
ALeffect::Damping
ALfloat Damping
Definition: alEffect.h:62
ALeffect::DecayHFLimit
ALboolean DecayHFLimit
Definition: alEffect.h:43
AL_REVERB_DENSITY
#define AL_REVERB_DENSITY
Definition: efx.h:36
AL_EAXREVERB_MAX_REFLECTIONS_GAIN
#define AL_EAXREVERB_MAX_REFLECTIONS_GAIN
Definition: efx.h:405
AL_EAXREVERB_MIN_DECAY_HFLIMIT
#define AL_EAXREVERB_MIN_DECAY_HFLIMIT
Definition: efx.h:456
AL_EAXREVERB_GAIN
#define AL_EAXREVERB_GAIN
Definition: efx.h:53
ALeffect_SetParamiv
#define ALeffect_SetParamiv(x, c, p, v)
Definition: alEffect.h:93
AL_REVERB_DEFAULT_AIR_ABSORPTION_GAINHF
#define AL_REVERB_DEFAULT_AIR_ABSORPTION_GAINHF
Definition: efx.h:361
AL_ECHO_MAX_LRDELAY
#define AL_ECHO_MAX_LRDELAY
Definition: efx.h:515
ALenum
int ALenum
Definition: al.h:65
alGetEffectiv
LPALGETEFFECTIV alGetEffectiv
Definition: alreverb.c:58
AL_REVERB_MAX_REFLECTIONS_GAIN
#define AL_REVERB_MAX_REFLECTIONS_GAIN
Definition: efx.h:344
AL_EFFECT_NULL
#define AL_EFFECT_NULL
Definition: efx.h:154
AL_EAXREVERB_MIN_REFLECTIONS_GAIN
#define AL_EAXREVERB_MIN_REFLECTIONS_GAIN
Definition: efx.h:404
eaxreverb_SetParamf
static void eaxreverb_SetParamf(ALeffect *effect, ALCcontext *context, ALenum param, ALfloat val)
Definition: alEffect.c:367
DisabledEffects
ALboolean DisabledEffects[MAX_EFFECTS]
Definition: alEffect.c:35
NewThunkEntry
ALenum NewThunkEntry(ALuint *index)
Definition: alThunk.c:47
ALeffect::Feedback
ALfloat Feedback
Definition: alEffect.h:63
reverblistsize
static const ALsizei reverblistsize
Definition: alEffect.c:1457
ALuint
unsigned int ALuint
Definition: al.h:59
EFXEAXREVERBPROPERTIES::flEchoDepth
float flEchoDepth
Definition: efx-presets.h:24
AL_ECHO_MAX_DAMPING
#define AL_ECHO_MAX_DAMPING
Definition: efx.h:519
AL_EAXREVERB_MIN_DENSITY
#define AL_EAXREVERB_MIN_DENSITY
Definition: efx.h:372
AL_API
#define AL_API
Definition: al.h:14
WARN
#define WARN(...)
Definition: alMain.h:811
ALeffect_GetParami
#define ALeffect_GetParami(x, c, p, v)
Definition: alEffect.h:97
AL_DEDICATED_GAIN
#define AL_DEDICATED_GAIN
Definition: alext.h:201
AL_EAXREVERB_GAINHF
#define AL_EAXREVERB_GAINHF
Definition: efx.h:54
echo_SetParamiv
static void echo_SetParamiv(ALeffect *effect, ALCcontext *context, ALenum param, const ALint *vals)
Definition: alEffect.c:915
LoadReverbPreset
ALvoid LoadReverbPreset(const char *name, ALeffect *effect)
Definition: alEffect.c:1459
echo_GetParamfv
static void echo_GetParamfv(ALeffect *effect, ALCcontext *context, ALenum param, ALfloat *vals)
Definition: alEffect.c:1003
EFXEAXREVERBPROPERTIES::flDiffusion
float flDiffusion
Definition: efx-presets.h:10
AL_ECHO_DEFAULT_LRDELAY
#define AL_ECHO_DEFAULT_LRDELAY
Definition: efx.h:516
reverb_GetParamfv
static void reverb_GetParamfv(ALeffect *effect, ALCcontext *context, ALenum param, ALfloat *vals)
Definition: alEffect.c:907
AL_EAXREVERB_DECAY_LFRATIO
#define AL_EAXREVERB_DECAY_LFRATIO
Definition: efx.h:58
AL_EAXREVERB_DEFAULT_DECAY_HFLIMIT
#define AL_EAXREVERB_DEFAULT_DECAY_HFLIMIT
Definition: efx.h:458
AL_RING_MODULATOR_MIN_HIGHPASS_CUTOFF
#define AL_RING_MODULATOR_MIN_HIGHPASS_CUTOFF
Definition: efx.h:649
EFXEAXREVERBPROPERTIES::flAirAbsorptionGainHF
float flAirAbsorptionGainHF
Definition: efx-presets.h:27
AL_RING_MODULATOR_DEFAULT_HIGHPASS_CUTOFF
#define AL_RING_MODULATOR_DEFAULT_HIGHPASS_CUTOFF
Definition: efx.h:651
AL_REVERB_DEFAULT_ROOM_ROLLOFF_FACTOR
#define AL_REVERB_DEFAULT_ROOM_ROLLOFF_FACTOR
Definition: efx.h:365
AL_REVERB_MIN_REFLECTIONS_DELAY
#define AL_REVERB_MIN_REFLECTIONS_DELAY
Definition: efx.h:347
AL_EAXREVERB_ROOM_ROLLOFF_FACTOR
#define AL_EAXREVERB_ROOM_ROLLOFF_FACTOR
Definition: efx.h:72
AL_REVERB_DEFAULT_DECAY_TIME
#define AL_REVERB_DEFAULT_DECAY_TIME
Definition: efx.h:337
AL_RING_MODULATOR_MIN_WAVEFORM
#define AL_RING_MODULATOR_MIN_WAVEFORM
Definition: efx.h:657
AL_ECHO_MIN_DAMPING
#define AL_ECHO_MIN_DAMPING
Definition: efx.h:518
alThunk.h
ALeffect_SetParamf
#define ALeffect_SetParamf(x, c, p, v)
Definition: alEffect.h:94
AL_ECHO_MAX_DELAY
#define AL_ECHO_MAX_DELAY
Definition: efx.h:511
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
AL_EAXREVERB_MIN_GAINLF
#define AL_EAXREVERB_MIN_GAINLF
Definition: efx.h:388
AL_ECHO_MIN_SPREAD
#define AL_ECHO_MIN_SPREAD
Definition: efx.h:526
AL_RING_MODULATOR_WAVEFORM
#define AL_RING_MODULATOR_WAVEFORM
Definition: efx.h:125
AL_RING_MODULATOR_DEFAULT_WAVEFORM
#define AL_RING_MODULATOR_DEFAULT_WAVEFORM
Definition: efx.h:659
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
LookupEffect
#define LookupEffect(m, k)
Definition: alMain.h:668
AL_EAXREVERB_DEFAULT_MODULATION_DEPTH
#define AL_EAXREVERB_DEFAULT_MODULATION_DEPTH
Definition: efx.h:438
AL_REVERB_DEFAULT_DECAY_HFLIMIT
#define AL_REVERB_DEFAULT_DECAY_HFLIMIT
Definition: efx.h:369
eaxreverb_SetParamiv
static void eaxreverb_SetParamiv(ALeffect *effect, ALCcontext *context, ALenum param, const ALint *vals)
Definition: alEffect.c:363
ded_GetParamfv
static void ded_GetParamfv(ALeffect *effect, ALCcontext *context, ALenum param, ALfloat *vals)
Definition: alEffect.c:1156
AL_EAXREVERB_DENSITY
#define AL_EAXREVERB_DENSITY
Definition: efx.h:51
reverb_SetParamf
static void reverb_SetParamf(ALeffect *effect, ALCcontext *context, ALenum param, ALfloat val)
Definition: alEffect.c:723
ALCcontext_DecRef
void ALCcontext_DecRef(ALCcontext *context)
Definition: ALc.c:1949
AL_EAXREVERB_REFLECTIONS_PAN
#define AL_EAXREVERB_REFLECTIONS_PAN
Definition: efx.h:61
ALeffect::ModulationDepth
ALfloat ModulationDepth
Definition: alEffect.h:53
value
EGLSurface EGLint void ** value
Definition: eglext.h:301
ALeffect_SetParamfv
#define ALeffect_SetParamfv(x, c, p, v)
Definition: alEffect.h:95
mod_GetParamiv
static void mod_GetParamiv(ALeffect *effect, ALCcontext *context, ALenum param, ALint *vals)
Definition: alEffect.c:1084
AL_REVERB_MIN_REFLECTIONS_GAIN
#define AL_REVERB_MIN_REFLECTIONS_GAIN
Definition: efx.h:343
AL_EAXREVERB_MAX_DECAY_HFLIMIT
#define AL_EAXREVERB_MAX_DECAY_HFLIMIT
Definition: efx.h:457
AL_REVERB_MAX_LATE_REVERB_GAIN
#define AL_REVERB_MAX_LATE_REVERB_GAIN
Definition: efx.h:352
AL_REVERB_DEFAULT_DECAY_HFRATIO
#define AL_REVERB_DEFAULT_DECAY_HFRATIO
Definition: efx.h:341
EFXEAXREVERBPROPERTIES::iDecayHFLimit
int iDecayHFLimit
Definition: efx-presets.h:31
null_GetParami
static void null_GetParami(ALeffect *effect, ALCcontext *context, ALenum param, ALint *val)
Definition: alEffect.c:1171
AL_EAXREVERB_DEFAULT_DECAY_TIME
#define AL_EAXREVERB_DEFAULT_DECAY_TIME
Definition: efx.h:394
null_SetParami
static void null_SetParami(ALeffect *effect, ALCcontext *context, ALenum param, ALint val)
Definition: alEffect.c:1162
alEffect.h
echo_GetParamiv
static void echo_GetParamiv(ALeffect *effect, ALCcontext *context, ALenum param, ALint *vals)
Definition: alEffect.c:970
AL_REVERB_LATE_REVERB_GAIN
#define AL_REVERB_LATE_REVERB_GAIN
Definition: efx.h:44
AL_ECHO_DEFAULT_DAMPING
#define AL_ECHO_DEFAULT_DAMPING
Definition: efx.h:520
ALCcontext_struct
Definition: alMain.h:675
ALeffect::Dedicated
struct ALeffect::@55 Dedicated
AL_EAXREVERB_MIN_ECHO_TIME
#define AL_EAXREVERB_MIN_ECHO_TIME
Definition: efx.h:424
EFXEAXREVERBPROPERTIES::flDecayHFRatio
float flDecayHFRatio
Definition: efx-presets.h:15
AL_OUT_OF_MEMORY
#define AL_OUT_OF_MEMORY
Definition: al.h:379
eaxreverb_GetParami
static void eaxreverb_GetParami(ALeffect *effect, ALCcontext *context, ALenum param, ALint *val)
Definition: alEffect.c:570
AL_EAXREVERB_MIN_ECHO_DEPTH
#define AL_EAXREVERB_MIN_ECHO_DEPTH
Definition: efx.h:428
AL_EAXREVERB_LFREFERENCE
#define AL_EAXREVERB_LFREFERENCE
Definition: efx.h:71
alEffectiv
LPALEFFECTIV alEffectiv
Definition: alreverb.c:54
ALeffect::SetParami
void(* SetParami)(struct ALeffect *effect, ALCcontext *context, ALenum param, ALint val)
Definition: alEffect.h:78
ALboolean
char ALboolean
Definition: al.h:38
alGenEffects
LPALGENEFFECTS alGenEffects
Definition: alreverb.c:50
AL_REVERB_MAX_DECAY_HFRATIO
#define AL_REVERB_MAX_DECAY_HFRATIO
Definition: efx.h:340
EFXEAXREVERBPROPERTIES::flEchoTime
float flEchoTime
Definition: efx-presets.h:23
AL_EAXREVERB_GAINLF
#define AL_EAXREVERB_GAINLF
Definition: efx.h:55
mod_GetParamf
static void mod_GetParamf(ALeffect *effect, ALCcontext *context, ALenum param, ALfloat *val)
Definition: alEffect.c:1088
AL_EFFECT_RING_MODULATOR
#define AL_EFFECT_RING_MODULATOR
Definition: efx.h:163
AL_RING_MODULATOR_HIGHPASS_CUTOFF
#define AL_RING_MODULATOR_HIGHPASS_CUTOFF
Definition: efx.h:124
ALeffect::LateReverbPan
ALfloat LateReverbPan[3]
Definition: alEffect.h:49
ALeffect::GetParamfv
void(* GetParamfv)(struct ALeffect *effect, ALCcontext *context, ALenum param, ALfloat *vals)
Definition: alEffect.h:86
null_SetParamiv
static void null_SetParamiv(ALeffect *effect, ALCcontext *context, ALenum param, const ALint *vals)
Definition: alEffect.c:1164
EFXEAXREVERBPROPERTIES::flDecayTime
float flDecayTime
Definition: efx-presets.h:14
ALeffect::Gain
ALfloat Gain
Definition: alEffect.h:33
alGetEffectfv
LPALGETEFFECTFV alGetEffectfv
Definition: alreverb.c:60
AL_EFFECT_DEDICATED_LOW_FREQUENCY_EFFECT
#define AL_EFFECT_DEDICATED_LOW_FREQUENCY_EFFECT
Definition: alext.h:203
AL_EAXREVERB_MAX_DECAY_LFRATIO
#define AL_EAXREVERB_MAX_DECAY_LFRATIO
Definition: efx.h:401
AL_EAXREVERB_MAX_AIR_ABSORPTION_GAINHF
#define AL_EAXREVERB_MAX_AIR_ABSORPTION_GAINHF
Definition: efx.h:441
ded_SetParamiv
static void ded_SetParamiv(ALeffect *effect, ALCcontext *context, ALenum param, const ALint *vals)
Definition: alEffect.c:1112
ALCcontext_struct::Device
ALCdevice * Device
Definition: alMain.h:704
AL_REVERB_MIN_DECAY_TIME
#define AL_REVERB_MIN_DECAY_TIME
Definition: efx.h:335
AL_REVERB_DEFAULT_GAINHF
#define AL_REVERB_DEFAULT_GAINHF
Definition: efx.h:333
AL_EAXREVERB_DEFAULT_LFREFERENCE
#define AL_EAXREVERB_DEFAULT_LFREFERENCE
Definition: efx.h:450
AL_RING_MODULATOR_MAX_WAVEFORM
#define AL_RING_MODULATOR_MAX_WAVEFORM
Definition: efx.h:658
LockContext
static __inline void LockContext(ALCcontext *context)
Definition: alMain.h:728
AL_RING_MODULATOR_FREQUENCY
#define AL_RING_MODULATOR_FREQUENCY
Definition: efx.h:123
null_GetParamfv
static void null_GetParamfv(ALeffect *effect, ALCcontext *context, ALenum param, ALfloat *vals)
Definition: alEffect.c:1177
reverb_SetParami
static void reverb_SetParami(ALeffect *effect, ALCcontext *context, ALenum param, ALint val)
Definition: alEffect.c:702
EFXEAXREVERBPROPERTIES::flLateReverbDelay
float flLateReverbDelay
Definition: efx-presets.h:21
AL_ECHO_MAX_SPREAD
#define AL_ECHO_MAX_SPREAD
Definition: efx.h:527
EFXEAXREVERBPROPERTIES::flModulationTime
float flModulationTime
Definition: efx-presets.h:25
AL_EFFECT_ECHO
#define AL_EFFECT_ECHO
Definition: efx.h:158
EFXEAXREVERBPROPERTIES::flGainLF
float flGainLF
Definition: efx-presets.h:13
ALeffect::DecayTime
ALfloat DecayTime
Definition: alEffect.h:35
context
TParseContext * context
Definition: glslang_tab.cpp:1907
i
int i
Definition: pngrutil.c:1377
alSetError
ALvoid alSetError(ALCcontext *Context, ALenum errorCode)
Definition: alError.c:31
AL_EAXREVERB_MAX_ECHO_DEPTH
#define AL_EAXREVERB_MAX_ECHO_DEPTH
Definition: efx.h:429
reverb_GetParamf
static void reverb_GetParamf(ALeffect *effect, ALCcontext *context, ALenum param, ALfloat *val)
Definition: alEffect.c:850
AL_EFFECT_EAXREVERB
#define AL_EFFECT_EAXREVERB
Definition: efx.h:167
AL_EAXREVERB_DEFAULT_DECAY_HFRATIO
#define AL_EAXREVERB_DEFAULT_DECAY_HFRATIO
Definition: efx.h:398
reverb_GetParami
static void reverb_GetParami(ALeffect *effect, ALCcontext *context, ALenum param, ALint *val)
Definition: alEffect.c:833
AL_REVERB_MIN_AIR_ABSORPTION_GAINHF
#define AL_REVERB_MIN_AIR_ABSORPTION_GAINHF
Definition: efx.h:359
alEffecti
LPALEFFECTI alEffecti
Definition: alreverb.c:53
AL_EAXREVERB_MIN_GAINHF
#define AL_EAXREVERB_MIN_GAINHF
Definition: efx.h:384
EFXEAXREVERBPROPERTIES::flLateReverbGain
float flLateReverbGain
Definition: efx-presets.h:20
InsertUIntMapEntry
ALenum InsertUIntMapEntry(UIntMap *map, ALuint key, ALvoid *value)
Definition: helpers.c:565
UnlockContext
static __inline void UnlockContext(ALCcontext *context)
Definition: alMain.h:730
AL_EAXREVERB_MIN_LFREFERENCE
#define AL_EAXREVERB_MIN_LFREFERENCE
Definition: efx.h:448
AL_REVERB_DEFAULT_DENSITY
#define AL_REVERB_DEFAULT_DENSITY
Definition: efx.h:321
AL_EAXREVERB_MIN_LATE_REVERB_DELAY
#define AL_EAXREVERB_MIN_LATE_REVERB_DELAY
Definition: efx.h:418
mod_GetParamfv
static void mod_GetParamfv(ALeffect *effect, ALCcontext *context, ALenum param, ALfloat *vals)
Definition: alEffect.c:1104
AL_EAXREVERB_DEFAULT_ECHO_TIME
#define AL_EAXREVERB_DEFAULT_ECHO_TIME
Definition: efx.h:426
AL_INVALID_ENUM
#define AL_INVALID_ENUM
Definition: al.h:370
DECL
#define DECL(x)
Definition: alEffect.c:1324
AL_EAXREVERB_ECHO_DEPTH
#define AL_EAXREVERB_ECHO_DEPTH
Definition: efx.h:66
AL_RING_MODULATOR_DEFAULT_FREQUENCY
#define AL_RING_MODULATOR_DEFAULT_FREQUENCY
Definition: efx.h:647
alEffectfv
LPALEFFECTFV alEffectfv
Definition: alreverb.c:56
ALeffect_GetParamf
#define ALeffect_GetParamf(x, c, p, v)
Definition: alEffect.h:99
ALeffect::type
ALenum type
Definition: alEffect.h:27
ALeffect::LateReverbGain
ALfloat LateReverbGain
Definition: alEffect.h:39
AL_REVERB_MIN_DECAY_HFRATIO
#define AL_REVERB_MIN_DECAY_HFRATIO
Definition: efx.h:339
AL_NO_ERROR
#define AL_NO_ERROR
Definition: al.h:364
echo_SetParamf
static void echo_SetParamf(ALeffect *effect, ALCcontext *context, ALenum param, ALfloat val)
Definition: alEffect.c:919
AL_REVERB_ROOM_ROLLOFF_FACTOR
#define AL_REVERB_ROOM_ROLLOFF_FACTOR
Definition: efx.h:47
reverblist
static struct @50 reverblist[]
ALeffect::Waveform
ALint Waveform
Definition: alEffect.h:71
ALeffect::EchoTime
ALfloat EchoTime
Definition: alEffect.h:50
EffectList::val
ALenum val
Definition: alMain.h:534
values
GLint GLsizei const GLuint64 * values
Definition: glew.h:3473
AL_EAXREVERB_DEFAULT_DENSITY
#define AL_EAXREVERB_DEFAULT_DENSITY
Definition: efx.h:374
AL_EAXREVERB_DEFAULT_REFLECTIONS_PAN_XYZ
#define AL_EAXREVERB_DEFAULT_REFLECTIONS_PAN_XYZ
Definition: efx.h:412
alDeleteEffects
LPALDELETEEFFECTS alDeleteEffects
Definition: alreverb.c:51
eaxreverb_GetParamfv
static void eaxreverb_GetParamfv(ALeffect *effect, ALCcontext *context, ALenum param, ALfloat *vals)
Definition: alEffect.c:676
ALeffect::GainLF
ALfloat GainLF
Definition: alEffect.h:46
MAX_EFFECTS
Definition: alEffect.h:17
ALeffect::SetParamf
void(* SetParamf)(struct ALeffect *effect, ALCcontext *context, ALenum param, ALfloat val)
Definition: alEffect.h:80
AL_ECHO_MIN_LRDELAY
#define AL_ECHO_MIN_LRDELAY
Definition: efx.h:514
COUNTOF
#define COUNTOF(x)
Definition: alMain.h:63
ALeffect::Density
ALfloat Density
Definition: alEffect.h:31
AL_EAXREVERB_MIN_DIFFUSION
#define AL_EAXREVERB_MIN_DIFFUSION
Definition: efx.h:376
ALeffect
Definition: alEffect.h:24
AL_EAXREVERB_MAX_DECAY_TIME
#define AL_EAXREVERB_MAX_DECAY_TIME
Definition: efx.h:393