2 * OpenAL cross platform audio library
3 * Copyright (C) 1999-2007 by authors.
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, USA.
18 * Or go to http://www.gnu.org/copyleft/lgpl.html
34 ALboolean DisabledEffects
[MAX_EFFECTS
];
37 static void InitEffectParams(ALeffect
*effect
, ALenum type
);
39 #define LookupEffect(m, k) ((ALeffect*)LookupUIntMapKey(&(m), (k)))
40 #define RemoveEffect(m, k) ((ALeffect*)PopUIntMapValue(&(m), (k)))
42 AL_API ALvoid AL_APIENTRY
alGenEffects(ALsizei n
, ALuint
*effects
)
47 Context
= GetContextRef();
50 if(n
< 0 || IsBadWritePtr((void*)effects
, n
* sizeof(ALuint
)))
51 alSetError(Context
, AL_INVALID_VALUE
);
54 ALCdevice
*device
= Context
->Device
;
59 ALeffect
*effect
= calloc(1, sizeof(ALeffect
));
62 alSetError(Context
, AL_OUT_OF_MEMORY
);
63 alDeleteEffects(i
, effects
);
66 InitEffectParams(effect
, AL_EFFECT_NULL
);
68 err
= NewThunkEntry(&effect
->effect
);
69 if(err
== AL_NO_ERROR
)
70 err
= InsertUIntMapEntry(&device
->EffectMap
, effect
->effect
, effect
);
71 if(err
!= AL_NO_ERROR
)
73 FreeThunkEntry(effect
->effect
);
74 memset(effect
, 0, sizeof(ALeffect
));
77 alSetError(Context
, err
);
78 alDeleteEffects(i
, effects
);
82 effects
[i
] = effect
->effect
;
86 ALCcontext_DecRef(Context
);
89 AL_API ALvoid AL_APIENTRY
alDeleteEffects(ALsizei n
, ALuint
*effects
)
96 Context
= GetContextRef();
99 device
= Context
->Device
;
101 alSetError(Context
, AL_INVALID_VALUE
);
104 // Check that all effects are valid
110 if(LookupEffect(device
->EffectMap
, effects
[i
]) == NULL
)
112 alSetError(Context
, AL_INVALID_NAME
);
120 // Recheck that the effect is valid, because there could be duplicated names
121 if((ALEffect
=RemoveEffect(device
->EffectMap
, effects
[i
])) == NULL
)
123 FreeThunkEntry(ALEffect
->effect
);
125 memset(ALEffect
, 0, sizeof(ALeffect
));
130 ALCcontext_DecRef(Context
);
133 AL_API ALboolean AL_APIENTRY
alIsEffect(ALuint effect
)
138 Context
= GetContextRef();
139 if(!Context
) return AL_FALSE
;
141 result
= ((!effect
|| LookupEffect(Context
->Device
->EffectMap
, effect
)) ?
144 ALCcontext_DecRef(Context
);
149 AL_API ALvoid AL_APIENTRY
alEffecti(ALuint effect
, ALenum param
, ALint iValue
)
155 Context
= GetContextRef();
158 Device
= Context
->Device
;
159 if((ALEffect
=LookupEffect(Device
->EffectMap
, effect
)) != NULL
)
161 if(param
== AL_EFFECT_TYPE
)
163 ALboolean isOk
= (iValue
== AL_EFFECT_NULL
);
165 for(i
= 0;!isOk
&& EffectList
[i
].val
;i
++)
167 if(iValue
== EffectList
[i
].val
&&
168 !DisabledEffects
[EffectList
[i
].type
])
173 InitEffectParams(ALEffect
, iValue
);
175 alSetError(Context
, AL_INVALID_VALUE
);
179 /* Call the appropriate handler */
180 ALeffect_SetParami(ALEffect
, Context
, param
, iValue
);
184 alSetError(Context
, AL_INVALID_NAME
);
186 ALCcontext_DecRef(Context
);
189 AL_API ALvoid AL_APIENTRY
alEffectiv(ALuint effect
, ALenum param
, ALint
*piValues
)
195 Context
= GetContextRef();
198 Device
= Context
->Device
;
199 if((ALEffect
=LookupEffect(Device
->EffectMap
, effect
)) != NULL
)
201 /* Call the appropriate handler */
202 ALeffect_SetParamiv(ALEffect
, Context
, param
, piValues
);
205 alSetError(Context
, AL_INVALID_NAME
);
207 ALCcontext_DecRef(Context
);
210 AL_API ALvoid AL_APIENTRY
alEffectf(ALuint effect
, ALenum param
, ALfloat flValue
)
216 Context
= GetContextRef();
219 Device
= Context
->Device
;
220 if((ALEffect
=LookupEffect(Device
->EffectMap
, effect
)) != NULL
)
222 /* Call the appropriate handler */
223 ALeffect_SetParamf(ALEffect
, Context
, param
, flValue
);
226 alSetError(Context
, AL_INVALID_NAME
);
228 ALCcontext_DecRef(Context
);
231 AL_API ALvoid AL_APIENTRY
alEffectfv(ALuint effect
, ALenum param
, ALfloat
*pflValues
)
237 Context
= GetContextRef();
240 Device
= Context
->Device
;
241 if((ALEffect
=LookupEffect(Device
->EffectMap
, effect
)) != NULL
)
243 /* Call the appropriate handler */
244 ALeffect_SetParamfv(ALEffect
, Context
, param
, pflValues
);
247 alSetError(Context
, AL_INVALID_NAME
);
249 ALCcontext_DecRef(Context
);
252 AL_API ALvoid AL_APIENTRY
alGetEffecti(ALuint effect
, ALenum param
, ALint
*piValue
)
258 Context
= GetContextRef();
261 Device
= Context
->Device
;
262 if((ALEffect
=LookupEffect(Device
->EffectMap
, effect
)) != NULL
)
264 if(param
== AL_EFFECT_TYPE
)
266 *piValue
= ALEffect
->type
;
270 /* Call the appropriate handler */
271 ALeffect_GetParamiv(ALEffect
, Context
, param
, piValue
);
275 alSetError(Context
, AL_INVALID_NAME
);
277 ALCcontext_DecRef(Context
);
280 AL_API ALvoid AL_APIENTRY
alGetEffectiv(ALuint effect
, ALenum param
, ALint
*piValues
)
286 Context
= GetContextRef();
289 Device
= Context
->Device
;
290 if((ALEffect
=LookupEffect(Device
->EffectMap
, effect
)) != NULL
)
292 /* Call the appropriate handler */
293 ALeffect_GetParamiv(ALEffect
, Context
, param
, piValues
);
296 alSetError(Context
, AL_INVALID_NAME
);
298 ALCcontext_DecRef(Context
);
301 AL_API ALvoid AL_APIENTRY
alGetEffectf(ALuint effect
, ALenum param
, ALfloat
*pflValue
)
307 Context
= GetContextRef();
310 Device
= Context
->Device
;
311 if((ALEffect
=LookupEffect(Device
->EffectMap
, effect
)) != NULL
)
313 /* Call the appropriate handler */
314 ALeffect_GetParamf(ALEffect
, Context
, param
, pflValue
);
317 alSetError(Context
, AL_INVALID_NAME
);
319 ALCcontext_DecRef(Context
);
322 AL_API ALvoid AL_APIENTRY
alGetEffectfv(ALuint effect
, ALenum param
, ALfloat
*pflValues
)
328 Context
= GetContextRef();
331 Device
= Context
->Device
;
332 if((ALEffect
=LookupEffect(Device
->EffectMap
, effect
)) != NULL
)
334 /* Call the appropriate handler */
335 ALeffect_GetParamfv(ALEffect
, Context
, param
, pflValues
);
338 alSetError(Context
, AL_INVALID_NAME
);
340 ALCcontext_DecRef(Context
);
344 static void eaxreverb_SetParami(ALeffect
*effect
, ALCcontext
*context
, ALenum param
, ALint val
)
348 case AL_EAXREVERB_DECAY_HFLIMIT
:
349 if(val
>= AL_EAXREVERB_MIN_DECAY_HFLIMIT
&& val
<= AL_EAXREVERB_MAX_DECAY_HFLIMIT
)
350 effect
->Reverb
.DecayHFLimit
= val
;
352 alSetError(context
, AL_INVALID_VALUE
);
356 alSetError(context
, AL_INVALID_ENUM
);
360 static void eaxreverb_SetParamiv(ALeffect
*effect
, ALCcontext
*context
, ALenum param
, const ALint
*vals
)
362 eaxreverb_SetParami(effect
, context
, param
, vals
[0]);
364 static void eaxreverb_SetParamf(ALeffect
*effect
, ALCcontext
*context
, ALenum param
, ALfloat val
)
368 case AL_EAXREVERB_DENSITY
:
369 if(val
>= AL_EAXREVERB_MIN_DENSITY
&&
370 val
<= AL_EAXREVERB_MAX_DENSITY
)
371 effect
->Reverb
.Density
= val
;
373 alSetError(context
, AL_INVALID_VALUE
);
376 case AL_EAXREVERB_DIFFUSION
:
377 if(val
>= AL_EAXREVERB_MIN_DIFFUSION
&&
378 val
<= AL_EAXREVERB_MAX_DIFFUSION
)
379 effect
->Reverb
.Diffusion
= val
;
381 alSetError(context
, AL_INVALID_VALUE
);
384 case AL_EAXREVERB_GAIN
:
385 if(val
>= AL_EAXREVERB_MIN_GAIN
&&
386 val
<= AL_EAXREVERB_MAX_GAIN
)
387 effect
->Reverb
.Gain
= val
;
389 alSetError(context
, AL_INVALID_VALUE
);
392 case AL_EAXREVERB_GAINHF
:
393 if(val
>= AL_EAXREVERB_MIN_GAINHF
&&
394 val
<= AL_EAXREVERB_MAX_GAINHF
)
395 effect
->Reverb
.GainHF
= val
;
397 alSetError(context
, AL_INVALID_VALUE
);
400 case AL_EAXREVERB_GAINLF
:
401 if(val
>= AL_EAXREVERB_MIN_GAINLF
&&
402 val
<= AL_EAXREVERB_MAX_GAINLF
)
403 effect
->Reverb
.GainLF
= val
;
405 alSetError(context
, AL_INVALID_VALUE
);
408 case AL_EAXREVERB_DECAY_TIME
:
409 if(val
>= AL_EAXREVERB_MIN_DECAY_TIME
&&
410 val
<= AL_EAXREVERB_MAX_DECAY_TIME
)
411 effect
->Reverb
.DecayTime
= val
;
413 alSetError(context
, AL_INVALID_VALUE
);
416 case AL_EAXREVERB_DECAY_HFRATIO
:
417 if(val
>= AL_EAXREVERB_MIN_DECAY_HFRATIO
&&
418 val
<= AL_EAXREVERB_MAX_DECAY_HFRATIO
)
419 effect
->Reverb
.DecayHFRatio
= val
;
421 alSetError(context
, AL_INVALID_VALUE
);
424 case AL_EAXREVERB_DECAY_LFRATIO
:
425 if(val
>= AL_EAXREVERB_MIN_DECAY_LFRATIO
&&
426 val
<= AL_EAXREVERB_MAX_DECAY_LFRATIO
)
427 effect
->Reverb
.DecayLFRatio
= val
;
429 alSetError(context
, AL_INVALID_VALUE
);
432 case AL_EAXREVERB_REFLECTIONS_GAIN
:
433 if(val
>= AL_EAXREVERB_MIN_REFLECTIONS_GAIN
&&
434 val
<= AL_EAXREVERB_MAX_REFLECTIONS_GAIN
)
435 effect
->Reverb
.ReflectionsGain
= val
;
437 alSetError(context
, AL_INVALID_VALUE
);
440 case AL_EAXREVERB_REFLECTIONS_DELAY
:
441 if(val
>= AL_EAXREVERB_MIN_REFLECTIONS_DELAY
&&
442 val
<= AL_EAXREVERB_MAX_REFLECTIONS_DELAY
)
443 effect
->Reverb
.ReflectionsDelay
= val
;
445 alSetError(context
, AL_INVALID_VALUE
);
448 case AL_EAXREVERB_LATE_REVERB_GAIN
:
449 if(val
>= AL_EAXREVERB_MIN_LATE_REVERB_GAIN
&&
450 val
<= AL_EAXREVERB_MAX_LATE_REVERB_GAIN
)
451 effect
->Reverb
.LateReverbGain
= val
;
453 alSetError(context
, AL_INVALID_VALUE
);
456 case AL_EAXREVERB_LATE_REVERB_DELAY
:
457 if(val
>= AL_EAXREVERB_MIN_LATE_REVERB_DELAY
&&
458 val
<= AL_EAXREVERB_MAX_LATE_REVERB_DELAY
)
459 effect
->Reverb
.LateReverbDelay
= val
;
461 alSetError(context
, AL_INVALID_VALUE
);
464 case AL_EAXREVERB_AIR_ABSORPTION_GAINHF
:
465 if(val
>= AL_EAXREVERB_MIN_AIR_ABSORPTION_GAINHF
&&
466 val
<= AL_EAXREVERB_MAX_AIR_ABSORPTION_GAINHF
)
467 effect
->Reverb
.AirAbsorptionGainHF
= val
;
469 alSetError(context
, AL_INVALID_VALUE
);
472 case AL_EAXREVERB_ECHO_TIME
:
473 if(val
>= AL_EAXREVERB_MIN_ECHO_TIME
&&
474 val
<= AL_EAXREVERB_MAX_ECHO_TIME
)
475 effect
->Reverb
.EchoTime
= val
;
477 alSetError(context
, AL_INVALID_VALUE
);
480 case AL_EAXREVERB_ECHO_DEPTH
:
481 if(val
>= AL_EAXREVERB_MIN_ECHO_DEPTH
&&
482 val
<= AL_EAXREVERB_MAX_ECHO_DEPTH
)
483 effect
->Reverb
.EchoDepth
= val
;
485 alSetError(context
, AL_INVALID_VALUE
);
488 case AL_EAXREVERB_MODULATION_TIME
:
489 if(val
>= AL_EAXREVERB_MIN_MODULATION_TIME
&&
490 val
<= AL_EAXREVERB_MAX_MODULATION_TIME
)
491 effect
->Reverb
.ModulationTime
= val
;
493 alSetError(context
, AL_INVALID_VALUE
);
496 case AL_EAXREVERB_MODULATION_DEPTH
:
497 if(val
>= AL_EAXREVERB_MIN_MODULATION_DEPTH
&&
498 val
<= AL_EAXREVERB_MAX_MODULATION_DEPTH
)
499 effect
->Reverb
.ModulationDepth
= val
;
501 alSetError(context
, AL_INVALID_VALUE
);
504 case AL_EAXREVERB_HFREFERENCE
:
505 if(val
>= AL_EAXREVERB_MIN_HFREFERENCE
&&
506 val
<= AL_EAXREVERB_MAX_HFREFERENCE
)
507 effect
->Reverb
.HFReference
= val
;
509 alSetError(context
, AL_INVALID_VALUE
);
512 case AL_EAXREVERB_LFREFERENCE
:
513 if(val
>= AL_EAXREVERB_MIN_LFREFERENCE
&&
514 val
<= AL_EAXREVERB_MAX_LFREFERENCE
)
515 effect
->Reverb
.LFReference
= val
;
517 alSetError(context
, AL_INVALID_VALUE
);
520 case AL_EAXREVERB_ROOM_ROLLOFF_FACTOR
:
521 if(val
>= 0.0f
&& val
<= 10.0f
)
522 effect
->Reverb
.RoomRolloffFactor
= val
;
524 alSetError(context
, AL_INVALID_VALUE
);
528 alSetError(context
, AL_INVALID_ENUM
);
532 static void eaxreverb_SetParamfv(ALeffect
*effect
, ALCcontext
*context
, ALenum param
, const ALfloat
*vals
)
536 case AL_EAXREVERB_REFLECTIONS_PAN
:
537 if(isfinite(vals
[0]) && isfinite(vals
[1]) && isfinite(vals
[2]))
539 LockContext(context
);
540 effect
->Reverb
.ReflectionsPan
[0] = vals
[0];
541 effect
->Reverb
.ReflectionsPan
[1] = vals
[1];
542 effect
->Reverb
.ReflectionsPan
[2] = vals
[2];
543 UnlockContext(context
);
546 alSetError(context
, AL_INVALID_VALUE
);
548 case AL_EAXREVERB_LATE_REVERB_PAN
:
549 if(isfinite(vals
[0]) && isfinite(vals
[1]) && isfinite(vals
[2]))
551 LockContext(context
);
552 effect
->Reverb
.LateReverbPan
[0] = vals
[0];
553 effect
->Reverb
.LateReverbPan
[1] = vals
[1];
554 effect
->Reverb
.LateReverbPan
[2] = vals
[2];
555 UnlockContext(context
);
558 alSetError(context
, AL_INVALID_VALUE
);
562 eaxreverb_SetParamf(effect
, context
, param
, vals
[0]);
567 static void eaxreverb_GetParami(ALeffect
*effect
, ALCcontext
*context
, ALenum param
, ALint
*val
)
571 case AL_EAXREVERB_DECAY_HFLIMIT
:
572 *val
= effect
->Reverb
.DecayHFLimit
;
576 alSetError(context
, AL_INVALID_ENUM
);
580 static void eaxreverb_GetParamiv(ALeffect
*effect
, ALCcontext
*context
, ALenum param
, ALint
*vals
)
582 eaxreverb_GetParami(effect
, context
, param
, vals
);
584 static void eaxreverb_GetParamf(ALeffect
*effect
, ALCcontext
*context
, ALenum param
, ALfloat
*val
)
588 case AL_EAXREVERB_DENSITY
:
589 *val
= effect
->Reverb
.Density
;
592 case AL_EAXREVERB_DIFFUSION
:
593 *val
= effect
->Reverb
.Diffusion
;
596 case AL_EAXREVERB_GAIN
:
597 *val
= effect
->Reverb
.Gain
;
600 case AL_EAXREVERB_GAINHF
:
601 *val
= effect
->Reverb
.GainHF
;
604 case AL_EAXREVERB_GAINLF
:
605 *val
= effect
->Reverb
.GainLF
;
608 case AL_EAXREVERB_DECAY_TIME
:
609 *val
= effect
->Reverb
.DecayTime
;
612 case AL_EAXREVERB_DECAY_HFRATIO
:
613 *val
= effect
->Reverb
.DecayHFRatio
;
616 case AL_EAXREVERB_DECAY_LFRATIO
:
617 *val
= effect
->Reverb
.DecayLFRatio
;
620 case AL_EAXREVERB_REFLECTIONS_GAIN
:
621 *val
= effect
->Reverb
.ReflectionsGain
;
624 case AL_EAXREVERB_REFLECTIONS_DELAY
:
625 *val
= effect
->Reverb
.ReflectionsDelay
;
628 case AL_EAXREVERB_LATE_REVERB_GAIN
:
629 *val
= effect
->Reverb
.LateReverbGain
;
632 case AL_EAXREVERB_LATE_REVERB_DELAY
:
633 *val
= effect
->Reverb
.LateReverbDelay
;
636 case AL_EAXREVERB_AIR_ABSORPTION_GAINHF
:
637 *val
= effect
->Reverb
.AirAbsorptionGainHF
;
640 case AL_EAXREVERB_ECHO_TIME
:
641 *val
= effect
->Reverb
.EchoTime
;
644 case AL_EAXREVERB_ECHO_DEPTH
:
645 *val
= effect
->Reverb
.EchoDepth
;
648 case AL_EAXREVERB_MODULATION_TIME
:
649 *val
= effect
->Reverb
.ModulationTime
;
652 case AL_EAXREVERB_MODULATION_DEPTH
:
653 *val
= effect
->Reverb
.ModulationDepth
;
656 case AL_EAXREVERB_HFREFERENCE
:
657 *val
= effect
->Reverb
.HFReference
;
660 case AL_EAXREVERB_LFREFERENCE
:
661 *val
= effect
->Reverb
.LFReference
;
664 case AL_EAXREVERB_ROOM_ROLLOFF_FACTOR
:
665 *val
= effect
->Reverb
.RoomRolloffFactor
;
669 alSetError(context
, AL_INVALID_ENUM
);
673 static void eaxreverb_GetParamfv(ALeffect
*effect
, ALCcontext
*context
, ALenum param
, ALfloat
*vals
)
677 case AL_EAXREVERB_REFLECTIONS_PAN
:
678 LockContext(context
);
679 vals
[0] = effect
->Reverb
.ReflectionsPan
[0];
680 vals
[1] = effect
->Reverb
.ReflectionsPan
[1];
681 vals
[2] = effect
->Reverb
.ReflectionsPan
[2];
682 UnlockContext(context
);
684 case AL_EAXREVERB_LATE_REVERB_PAN
:
685 LockContext(context
);
686 vals
[0] = effect
->Reverb
.LateReverbPan
[0];
687 vals
[1] = effect
->Reverb
.LateReverbPan
[1];
688 vals
[2] = effect
->Reverb
.LateReverbPan
[2];
689 UnlockContext(context
);
693 eaxreverb_GetParamf(effect
, context
, param
, vals
);
699 static void reverb_SetParami(ALeffect
*effect
, ALCcontext
*context
, ALenum param
, ALint val
)
703 case AL_REVERB_DECAY_HFLIMIT
:
704 if(val
>= AL_REVERB_MIN_DECAY_HFLIMIT
&&
705 val
<= AL_REVERB_MAX_DECAY_HFLIMIT
)
706 effect
->Reverb
.DecayHFLimit
= val
;
708 alSetError(context
, AL_INVALID_VALUE
);
712 alSetError(context
, AL_INVALID_ENUM
);
716 static void reverb_SetParamiv(ALeffect
*effect
, ALCcontext
*context
, ALenum param
, const ALint
*vals
)
718 reverb_SetParami(effect
, context
, param
, vals
[0]);
720 static void reverb_SetParamf(ALeffect
*effect
, ALCcontext
*context
, ALenum param
, ALfloat val
)
724 case AL_REVERB_DENSITY
:
725 if(val
>= AL_REVERB_MIN_DENSITY
&&
726 val
<= AL_REVERB_MAX_DENSITY
)
727 effect
->Reverb
.Density
= val
;
729 alSetError(context
, AL_INVALID_VALUE
);
732 case AL_REVERB_DIFFUSION
:
733 if(val
>= AL_REVERB_MIN_DIFFUSION
&&
734 val
<= AL_REVERB_MAX_DIFFUSION
)
735 effect
->Reverb
.Diffusion
= val
;
737 alSetError(context
, AL_INVALID_VALUE
);
741 if(val
>= AL_REVERB_MIN_GAIN
&&
742 val
<= AL_REVERB_MAX_GAIN
)
743 effect
->Reverb
.Gain
= val
;
745 alSetError(context
, AL_INVALID_VALUE
);
748 case AL_REVERB_GAINHF
:
749 if(val
>= AL_REVERB_MIN_GAINHF
&&
750 val
<= AL_REVERB_MAX_GAINHF
)
751 effect
->Reverb
.GainHF
= val
;
753 alSetError(context
, AL_INVALID_VALUE
);
756 case AL_REVERB_DECAY_TIME
:
757 if(val
>= AL_REVERB_MIN_DECAY_TIME
&&
758 val
<= AL_REVERB_MAX_DECAY_TIME
)
759 effect
->Reverb
.DecayTime
= val
;
761 alSetError(context
, AL_INVALID_VALUE
);
764 case AL_REVERB_DECAY_HFRATIO
:
765 if(val
>= AL_REVERB_MIN_DECAY_HFRATIO
&&
766 val
<= AL_REVERB_MAX_DECAY_HFRATIO
)
767 effect
->Reverb
.DecayHFRatio
= val
;
769 alSetError(context
, AL_INVALID_VALUE
);
772 case AL_REVERB_REFLECTIONS_GAIN
:
773 if(val
>= AL_REVERB_MIN_REFLECTIONS_GAIN
&&
774 val
<= AL_REVERB_MAX_REFLECTIONS_GAIN
)
775 effect
->Reverb
.ReflectionsGain
= val
;
777 alSetError(context
, AL_INVALID_VALUE
);
780 case AL_REVERB_REFLECTIONS_DELAY
:
781 if(val
>= AL_REVERB_MIN_REFLECTIONS_DELAY
&&
782 val
<= AL_REVERB_MAX_REFLECTIONS_DELAY
)
783 effect
->Reverb
.ReflectionsDelay
= val
;
785 alSetError(context
, AL_INVALID_VALUE
);
788 case AL_REVERB_LATE_REVERB_GAIN
:
789 if(val
>= AL_REVERB_MIN_LATE_REVERB_GAIN
&&
790 val
<= AL_REVERB_MAX_LATE_REVERB_GAIN
)
791 effect
->Reverb
.LateReverbGain
= val
;
793 alSetError(context
, AL_INVALID_VALUE
);
796 case AL_REVERB_LATE_REVERB_DELAY
:
797 if(val
>= AL_REVERB_MIN_LATE_REVERB_DELAY
&&
798 val
<= AL_REVERB_MAX_LATE_REVERB_DELAY
)
799 effect
->Reverb
.LateReverbDelay
= val
;
801 alSetError(context
, AL_INVALID_VALUE
);
804 case AL_REVERB_AIR_ABSORPTION_GAINHF
:
805 if(val
>= AL_REVERB_MIN_AIR_ABSORPTION_GAINHF
&&
806 val
<= AL_REVERB_MAX_AIR_ABSORPTION_GAINHF
)
807 effect
->Reverb
.AirAbsorptionGainHF
= val
;
809 alSetError(context
, AL_INVALID_VALUE
);
812 case AL_REVERB_ROOM_ROLLOFF_FACTOR
:
813 if(val
>= AL_REVERB_MIN_ROOM_ROLLOFF_FACTOR
&&
814 val
<= AL_REVERB_MAX_ROOM_ROLLOFF_FACTOR
)
815 effect
->Reverb
.RoomRolloffFactor
= val
;
817 alSetError(context
, AL_INVALID_VALUE
);
821 alSetError(context
, AL_INVALID_ENUM
);
825 static void reverb_SetParamfv(ALeffect
*effect
, ALCcontext
*context
, ALenum param
, const ALfloat
*vals
)
827 reverb_SetParamf(effect
, context
, param
, vals
[0]);
830 static void reverb_GetParami(ALeffect
*effect
, ALCcontext
*context
, ALenum param
, ALint
*val
)
834 case AL_REVERB_DECAY_HFLIMIT
:
835 *val
= effect
->Reverb
.DecayHFLimit
;
839 alSetError(context
, AL_INVALID_ENUM
);
843 static void reverb_GetParamiv(ALeffect
*effect
, ALCcontext
*context
, ALenum param
, ALint
*vals
)
845 reverb_GetParami(effect
, context
, param
, vals
);
847 static void reverb_GetParamf(ALeffect
*effect
, ALCcontext
*context
, ALenum param
, ALfloat
*val
)
851 case AL_REVERB_DENSITY
:
852 *val
= effect
->Reverb
.Density
;
855 case AL_REVERB_DIFFUSION
:
856 *val
= effect
->Reverb
.Diffusion
;
860 *val
= effect
->Reverb
.Gain
;
863 case AL_REVERB_GAINHF
:
864 *val
= effect
->Reverb
.GainHF
;
867 case AL_REVERB_DECAY_TIME
:
868 *val
= effect
->Reverb
.DecayTime
;
871 case AL_REVERB_DECAY_HFRATIO
:
872 *val
= effect
->Reverb
.DecayHFRatio
;
875 case AL_REVERB_REFLECTIONS_GAIN
:
876 *val
= effect
->Reverb
.ReflectionsGain
;
879 case AL_REVERB_REFLECTIONS_DELAY
:
880 *val
= effect
->Reverb
.ReflectionsDelay
;
883 case AL_REVERB_LATE_REVERB_GAIN
:
884 *val
= effect
->Reverb
.LateReverbGain
;
887 case AL_REVERB_LATE_REVERB_DELAY
:
888 *val
= effect
->Reverb
.LateReverbDelay
;
891 case AL_REVERB_AIR_ABSORPTION_GAINHF
:
892 *val
= effect
->Reverb
.AirAbsorptionGainHF
;
895 case AL_REVERB_ROOM_ROLLOFF_FACTOR
:
896 *val
= effect
->Reverb
.RoomRolloffFactor
;
900 alSetError(context
, AL_INVALID_ENUM
);
904 static void reverb_GetParamfv(ALeffect
*effect
, ALCcontext
*context
, ALenum param
, ALfloat
*vals
)
906 reverb_GetParamf(effect
, context
, param
, vals
);
910 static void echo_SetParami(ALeffect
*effect
, ALCcontext
*context
, ALenum param
, ALint val
)
911 { (void)effect
;(void)param
;(void)val
; alSetError(context
, AL_INVALID_ENUM
); }
912 static void echo_SetParamiv(ALeffect
*effect
, ALCcontext
*context
, ALenum param
, const ALint
*vals
)
914 echo_SetParami(effect
, context
, param
, vals
[0]);
916 static void echo_SetParamf(ALeffect
*effect
, ALCcontext
*context
, ALenum param
, ALfloat val
)
921 if(val
>= AL_ECHO_MIN_DELAY
&& val
<= AL_ECHO_MAX_DELAY
)
922 effect
->Echo
.Delay
= val
;
924 alSetError(context
, AL_INVALID_VALUE
);
927 case AL_ECHO_LRDELAY
:
928 if(val
>= AL_ECHO_MIN_LRDELAY
&& val
<= AL_ECHO_MAX_LRDELAY
)
929 effect
->Echo
.LRDelay
= val
;
931 alSetError(context
, AL_INVALID_VALUE
);
934 case AL_ECHO_DAMPING
:
935 if(val
>= AL_ECHO_MIN_DAMPING
&& val
<= AL_ECHO_MAX_DAMPING
)
936 effect
->Echo
.Damping
= val
;
938 alSetError(context
, AL_INVALID_VALUE
);
941 case AL_ECHO_FEEDBACK
:
942 if(val
>= AL_ECHO_MIN_FEEDBACK
&& val
<= AL_ECHO_MAX_FEEDBACK
)
943 effect
->Echo
.Feedback
= val
;
945 alSetError(context
, AL_INVALID_VALUE
);
949 if(val
>= AL_ECHO_MIN_SPREAD
&& val
<= AL_ECHO_MAX_SPREAD
)
950 effect
->Echo
.Spread
= val
;
952 alSetError(context
, AL_INVALID_VALUE
);
956 alSetError(context
, AL_INVALID_ENUM
);
960 static void echo_SetParamfv(ALeffect
*effect
, ALCcontext
*context
, ALenum param
, const ALfloat
*vals
)
962 echo_SetParamf(effect
, context
, param
, vals
[0]);
965 static void echo_GetParami(ALeffect
*effect
, ALCcontext
*context
, ALenum param
, ALint
*val
)
966 { (void)effect
;(void)param
;(void)val
; alSetError(context
, AL_INVALID_ENUM
); }
967 static void echo_GetParamiv(ALeffect
*effect
, ALCcontext
*context
, ALenum param
, ALint
*vals
)
969 echo_GetParami(effect
, context
, param
, vals
);
971 static void echo_GetParamf(ALeffect
*effect
, ALCcontext
*context
, ALenum param
, ALfloat
*val
)
976 *val
= effect
->Echo
.Delay
;
979 case AL_ECHO_LRDELAY
:
980 *val
= effect
->Echo
.LRDelay
;
983 case AL_ECHO_DAMPING
:
984 *val
= effect
->Echo
.Damping
;
987 case AL_ECHO_FEEDBACK
:
988 *val
= effect
->Echo
.Feedback
;
992 *val
= effect
->Echo
.Spread
;
996 alSetError(context
, AL_INVALID_ENUM
);
1000 static void echo_GetParamfv(ALeffect
*effect
, ALCcontext
*context
, ALenum param
, ALfloat
*vals
)
1002 echo_GetParamf(effect
, context
, param
, vals
);
1006 static void mod_SetParami(ALeffect
*effect
, ALCcontext
*context
, ALenum param
, ALint val
)
1010 case AL_RING_MODULATOR_FREQUENCY
:
1011 if(val
>= AL_RING_MODULATOR_MIN_FREQUENCY
&&
1012 val
<= AL_RING_MODULATOR_MAX_FREQUENCY
)
1013 effect
->Modulator
.Frequency
= val
;
1015 alSetError(context
, AL_INVALID_VALUE
);
1018 case AL_RING_MODULATOR_HIGHPASS_CUTOFF
:
1019 if(val
>= AL_RING_MODULATOR_MIN_HIGHPASS_CUTOFF
&&
1020 val
<= AL_RING_MODULATOR_MAX_HIGHPASS_CUTOFF
)
1021 effect
->Modulator
.HighPassCutoff
= val
;
1023 alSetError(context
, AL_INVALID_VALUE
);
1026 case AL_RING_MODULATOR_WAVEFORM
:
1027 if(val
>= AL_RING_MODULATOR_MIN_WAVEFORM
&&
1028 val
<= AL_RING_MODULATOR_MAX_WAVEFORM
)
1029 effect
->Modulator
.Waveform
= val
;
1031 alSetError(context
, AL_INVALID_VALUE
);
1035 alSetError(context
, AL_INVALID_ENUM
);
1039 static void mod_SetParamiv(ALeffect
*effect
, ALCcontext
*context
, ALenum param
, const ALint
*vals
)
1041 mod_SetParami(effect
, context
, param
, vals
[0]);
1043 static void mod_SetParamf(ALeffect
*effect
, ALCcontext
*context
, ALenum param
, ALfloat val
)
1047 case AL_RING_MODULATOR_FREQUENCY
:
1048 if(val
>= AL_RING_MODULATOR_MIN_FREQUENCY
&&
1049 val
<= AL_RING_MODULATOR_MAX_FREQUENCY
)
1050 effect
->Modulator
.Frequency
= val
;
1052 alSetError(context
, AL_INVALID_VALUE
);
1055 case AL_RING_MODULATOR_HIGHPASS_CUTOFF
:
1056 if(val
>= AL_RING_MODULATOR_MIN_HIGHPASS_CUTOFF
&&
1057 val
<= AL_RING_MODULATOR_MAX_HIGHPASS_CUTOFF
)
1058 effect
->Modulator
.HighPassCutoff
= val
;
1060 alSetError(context
, AL_INVALID_VALUE
);
1064 alSetError(context
, AL_INVALID_ENUM
);
1068 static void mod_SetParamfv(ALeffect
*effect
, ALCcontext
*context
, ALenum param
, const ALfloat
*vals
)
1070 mod_SetParamf(effect
, context
, param
, vals
[0]);
1073 static void mod_GetParami(ALeffect
*effect
, ALCcontext
*context
, ALenum param
, ALint
*val
)
1077 case AL_RING_MODULATOR_FREQUENCY
:
1078 *val
= (ALint
)effect
->Modulator
.Frequency
;
1080 case AL_RING_MODULATOR_HIGHPASS_CUTOFF
:
1081 *val
= (ALint
)effect
->Modulator
.HighPassCutoff
;
1083 case AL_RING_MODULATOR_WAVEFORM
:
1084 *val
= effect
->Modulator
.Waveform
;
1088 alSetError(context
, AL_INVALID_ENUM
);
1092 static void mod_GetParamiv(ALeffect
*effect
, ALCcontext
*context
, ALenum param
, ALint
*vals
)
1094 mod_GetParami(effect
, context
, param
, vals
);
1096 static void mod_GetParamf(ALeffect
*effect
, ALCcontext
*context
, ALenum param
, ALfloat
*val
)
1100 case AL_RING_MODULATOR_FREQUENCY
:
1101 *val
= effect
->Modulator
.Frequency
;
1103 case AL_RING_MODULATOR_HIGHPASS_CUTOFF
:
1104 *val
= effect
->Modulator
.HighPassCutoff
;
1108 alSetError(context
, AL_INVALID_ENUM
);
1112 static void mod_GetParamfv(ALeffect
*effect
, ALCcontext
*context
, ALenum param
, ALfloat
*vals
)
1114 mod_GetParamf(effect
, context
, param
, vals
);
1118 static void ded_SetParami(ALeffect
*effect
, ALCcontext
*context
, ALenum param
, ALint val
)
1119 { (void)effect
;(void)param
;(void)val
; alSetError(context
, AL_INVALID_ENUM
); }
1120 static void ded_SetParamiv(ALeffect
*effect
, ALCcontext
*context
, ALenum param
, const ALint
*vals
)
1122 ded_SetParami(effect
, context
, param
, vals
[0]);
1124 static void ded_SetParamf(ALeffect
*effect
, ALCcontext
*context
, ALenum param
, ALfloat val
)
1128 case AL_DEDICATED_GAIN
:
1129 if(val
>= 0.0f
&& isfinite(val
))
1130 effect
->Dedicated
.Gain
= val
;
1132 alSetError(context
, AL_INVALID_VALUE
);
1136 alSetError(context
, AL_INVALID_ENUM
);
1140 static void ded_SetParamfv(ALeffect
*effect
, ALCcontext
*context
, ALenum param
, const ALfloat
*vals
)
1142 ded_SetParamf(effect
, context
, param
, vals
[0]);
1145 static void ded_GetParami(ALeffect
*effect
, ALCcontext
*context
, ALenum param
, ALint
*val
)
1146 { (void)effect
;(void)param
;(void)val
; alSetError(context
, AL_INVALID_ENUM
); }
1147 static void ded_GetParamiv(ALeffect
*effect
, ALCcontext
*context
, ALenum param
, ALint
*vals
)
1149 ded_GetParami(effect
, context
, param
, vals
);
1151 static void ded_GetParamf(ALeffect
*effect
, ALCcontext
*context
, ALenum param
, ALfloat
*val
)
1155 case AL_DEDICATED_GAIN
:
1156 *val
= effect
->Dedicated
.Gain
;
1160 alSetError(context
, AL_INVALID_ENUM
);
1164 static void ded_GetParamfv(ALeffect
*effect
, ALCcontext
*context
, ALenum param
, ALfloat
*vals
)
1166 ded_GetParamf(effect
, context
, param
, vals
);
1170 static void null_SetParami(ALeffect
*effect
, ALCcontext
*context
, ALenum param
, ALint val
)
1171 { (void)effect
;(void)param
;(void)val
; alSetError(context
, AL_INVALID_ENUM
); }
1172 static void null_SetParamiv(ALeffect
*effect
, ALCcontext
*context
, ALenum param
, const ALint
*vals
)
1173 { (void)effect
;(void)param
;(void)vals
; alSetError(context
, AL_INVALID_ENUM
); }
1174 static void null_SetParamf(ALeffect
*effect
, ALCcontext
*context
, ALenum param
, ALfloat val
)
1175 { (void)effect
;(void)param
;(void)val
; alSetError(context
, AL_INVALID_ENUM
); }
1176 static void null_SetParamfv(ALeffect
*effect
, ALCcontext
*context
, ALenum param
, const ALfloat
*vals
)
1177 { (void)effect
;(void)param
;(void)vals
; alSetError(context
, AL_INVALID_ENUM
); }
1179 static void null_GetParami(ALeffect
*effect
, ALCcontext
*context
, ALenum param
, ALint
*val
)
1180 { (void)effect
;(void)param
;(void)val
; alSetError(context
, AL_INVALID_ENUM
); }
1181 static void null_GetParamiv(ALeffect
*effect
, ALCcontext
*context
, ALenum param
, ALint
*vals
)
1182 { (void)effect
;(void)param
;(void)vals
; alSetError(context
, AL_INVALID_ENUM
); }
1183 static void null_GetParamf(ALeffect
*effect
, ALCcontext
*context
, ALenum param
, ALfloat
*val
)
1184 { (void)effect
;(void)param
;(void)val
; alSetError(context
, AL_INVALID_ENUM
); }
1185 static void null_GetParamfv(ALeffect
*effect
, ALCcontext
*context
, ALenum param
, ALfloat
*vals
)
1186 { (void)effect
;(void)param
;(void)vals
; alSetError(context
, AL_INVALID_ENUM
); }
1189 ALvoid
ReleaseALEffects(ALCdevice
*device
)
1192 for(i
= 0;i
< device
->EffectMap
.size
;i
++)
1194 ALeffect
*temp
= device
->EffectMap
.array
[i
].value
;
1195 device
->EffectMap
.array
[i
].value
= NULL
;
1197 // Release effect structure
1198 FreeThunkEntry(temp
->effect
);
1199 memset(temp
, 0, sizeof(ALeffect
));
1205 static void InitEffectParams(ALeffect
*effect
, ALenum type
)
1209 case AL_EFFECT_EAXREVERB
:
1210 effect
->Reverb
.Density
= AL_EAXREVERB_DEFAULT_DENSITY
;
1211 effect
->Reverb
.Diffusion
= AL_EAXREVERB_DEFAULT_DIFFUSION
;
1212 effect
->Reverb
.Gain
= AL_EAXREVERB_DEFAULT_GAIN
;
1213 effect
->Reverb
.GainHF
= AL_EAXREVERB_DEFAULT_GAINHF
;
1214 effect
->Reverb
.GainLF
= AL_EAXREVERB_DEFAULT_GAINLF
;
1215 effect
->Reverb
.DecayTime
= AL_EAXREVERB_DEFAULT_DECAY_TIME
;
1216 effect
->Reverb
.DecayHFRatio
= AL_EAXREVERB_DEFAULT_DECAY_HFRATIO
;
1217 effect
->Reverb
.DecayLFRatio
= AL_EAXREVERB_DEFAULT_DECAY_LFRATIO
;
1218 effect
->Reverb
.ReflectionsGain
= AL_EAXREVERB_DEFAULT_REFLECTIONS_GAIN
;
1219 effect
->Reverb
.ReflectionsDelay
= AL_EAXREVERB_DEFAULT_REFLECTIONS_DELAY
;
1220 effect
->Reverb
.ReflectionsPan
[0] = AL_EAXREVERB_DEFAULT_REFLECTIONS_PAN_XYZ
;
1221 effect
->Reverb
.ReflectionsPan
[1] = AL_EAXREVERB_DEFAULT_REFLECTIONS_PAN_XYZ
;
1222 effect
->Reverb
.ReflectionsPan
[2] = AL_EAXREVERB_DEFAULT_REFLECTIONS_PAN_XYZ
;
1223 effect
->Reverb
.LateReverbGain
= AL_EAXREVERB_DEFAULT_LATE_REVERB_GAIN
;
1224 effect
->Reverb
.LateReverbDelay
= AL_EAXREVERB_DEFAULT_LATE_REVERB_DELAY
;
1225 effect
->Reverb
.LateReverbPan
[0] = AL_EAXREVERB_DEFAULT_LATE_REVERB_PAN_XYZ
;
1226 effect
->Reverb
.LateReverbPan
[1] = AL_EAXREVERB_DEFAULT_LATE_REVERB_PAN_XYZ
;
1227 effect
->Reverb
.LateReverbPan
[2] = AL_EAXREVERB_DEFAULT_LATE_REVERB_PAN_XYZ
;
1228 effect
->Reverb
.EchoTime
= AL_EAXREVERB_DEFAULT_ECHO_TIME
;
1229 effect
->Reverb
.EchoDepth
= AL_EAXREVERB_DEFAULT_ECHO_DEPTH
;
1230 effect
->Reverb
.ModulationTime
= AL_EAXREVERB_DEFAULT_MODULATION_TIME
;
1231 effect
->Reverb
.ModulationDepth
= AL_EAXREVERB_DEFAULT_MODULATION_DEPTH
;
1232 effect
->Reverb
.AirAbsorptionGainHF
= AL_EAXREVERB_DEFAULT_AIR_ABSORPTION_GAINHF
;
1233 effect
->Reverb
.HFReference
= AL_EAXREVERB_DEFAULT_HFREFERENCE
;
1234 effect
->Reverb
.LFReference
= AL_EAXREVERB_DEFAULT_LFREFERENCE
;
1235 effect
->Reverb
.RoomRolloffFactor
= AL_EAXREVERB_DEFAULT_ROOM_ROLLOFF_FACTOR
;
1236 effect
->Reverb
.DecayHFLimit
= AL_EAXREVERB_DEFAULT_DECAY_HFLIMIT
;
1237 effect
->SetParami
= eaxreverb_SetParami
;
1238 effect
->SetParamiv
= eaxreverb_SetParamiv
;
1239 effect
->SetParamf
= eaxreverb_SetParamf
;
1240 effect
->SetParamfv
= eaxreverb_SetParamfv
;
1241 effect
->GetParami
= eaxreverb_GetParami
;
1242 effect
->GetParamiv
= eaxreverb_GetParamiv
;
1243 effect
->GetParamf
= eaxreverb_GetParamf
;
1244 effect
->GetParamfv
= eaxreverb_GetParamfv
;
1246 case AL_EFFECT_REVERB
:
1247 effect
->Reverb
.Density
= AL_REVERB_DEFAULT_DENSITY
;
1248 effect
->Reverb
.Diffusion
= AL_REVERB_DEFAULT_DIFFUSION
;
1249 effect
->Reverb
.Gain
= AL_REVERB_DEFAULT_GAIN
;
1250 effect
->Reverb
.GainHF
= AL_REVERB_DEFAULT_GAINHF
;
1251 effect
->Reverb
.DecayTime
= AL_REVERB_DEFAULT_DECAY_TIME
;
1252 effect
->Reverb
.DecayHFRatio
= AL_REVERB_DEFAULT_DECAY_HFRATIO
;
1253 effect
->Reverb
.ReflectionsGain
= AL_REVERB_DEFAULT_REFLECTIONS_GAIN
;
1254 effect
->Reverb
.ReflectionsDelay
= AL_REVERB_DEFAULT_REFLECTIONS_DELAY
;
1255 effect
->Reverb
.LateReverbGain
= AL_REVERB_DEFAULT_LATE_REVERB_GAIN
;
1256 effect
->Reverb
.LateReverbDelay
= AL_REVERB_DEFAULT_LATE_REVERB_DELAY
;
1257 effect
->Reverb
.AirAbsorptionGainHF
= AL_REVERB_DEFAULT_AIR_ABSORPTION_GAINHF
;
1258 effect
->Reverb
.RoomRolloffFactor
= AL_REVERB_DEFAULT_ROOM_ROLLOFF_FACTOR
;
1259 effect
->Reverb
.DecayHFLimit
= AL_REVERB_DEFAULT_DECAY_HFLIMIT
;
1260 effect
->SetParami
= reverb_SetParami
;
1261 effect
->SetParamiv
= reverb_SetParamiv
;
1262 effect
->SetParamf
= reverb_SetParamf
;
1263 effect
->SetParamfv
= reverb_SetParamfv
;
1264 effect
->GetParami
= reverb_GetParami
;
1265 effect
->GetParamiv
= reverb_GetParamiv
;
1266 effect
->GetParamf
= reverb_GetParamf
;
1267 effect
->GetParamfv
= reverb_GetParamfv
;
1269 case AL_EFFECT_ECHO
:
1270 effect
->Echo
.Delay
= AL_ECHO_DEFAULT_DELAY
;
1271 effect
->Echo
.LRDelay
= AL_ECHO_DEFAULT_LRDELAY
;
1272 effect
->Echo
.Damping
= AL_ECHO_DEFAULT_DAMPING
;
1273 effect
->Echo
.Feedback
= AL_ECHO_DEFAULT_FEEDBACK
;
1274 effect
->Echo
.Spread
= AL_ECHO_DEFAULT_SPREAD
;
1275 effect
->SetParami
= echo_SetParami
;
1276 effect
->SetParamiv
= echo_SetParamiv
;
1277 effect
->SetParamf
= echo_SetParamf
;
1278 effect
->SetParamfv
= echo_SetParamfv
;
1279 effect
->GetParami
= echo_GetParami
;
1280 effect
->GetParamiv
= echo_GetParamiv
;
1281 effect
->GetParamf
= echo_GetParamf
;
1282 effect
->GetParamfv
= echo_GetParamfv
;
1284 case AL_EFFECT_RING_MODULATOR
:
1285 effect
->Modulator
.Frequency
= AL_RING_MODULATOR_DEFAULT_FREQUENCY
;
1286 effect
->Modulator
.HighPassCutoff
= AL_RING_MODULATOR_DEFAULT_HIGHPASS_CUTOFF
;
1287 effect
->Modulator
.Waveform
= AL_RING_MODULATOR_DEFAULT_WAVEFORM
;
1288 effect
->SetParami
= mod_SetParami
;
1289 effect
->SetParamiv
= mod_SetParamiv
;
1290 effect
->SetParamf
= mod_SetParamf
;
1291 effect
->SetParamfv
= mod_SetParamfv
;
1292 effect
->GetParami
= mod_GetParami
;
1293 effect
->GetParamiv
= mod_GetParamiv
;
1294 effect
->GetParamf
= mod_GetParamf
;
1295 effect
->GetParamfv
= mod_GetParamfv
;
1297 case AL_EFFECT_DEDICATED_LOW_FREQUENCY_EFFECT
:
1298 case AL_EFFECT_DEDICATED_DIALOGUE
:
1299 effect
->Dedicated
.Gain
= 1.0f
;
1300 effect
->SetParami
= ded_SetParami
;
1301 effect
->SetParamiv
= ded_SetParamiv
;
1302 effect
->SetParamf
= ded_SetParamf
;
1303 effect
->SetParamfv
= ded_SetParamfv
;
1304 effect
->GetParami
= ded_GetParami
;
1305 effect
->GetParamiv
= ded_GetParamiv
;
1306 effect
->GetParamf
= ded_GetParamf
;
1307 effect
->GetParamfv
= ded_GetParamfv
;
1310 effect
->SetParami
= null_SetParami
;
1311 effect
->SetParamiv
= null_SetParamiv
;
1312 effect
->SetParamf
= null_SetParamf
;
1313 effect
->SetParamfv
= null_SetParamfv
;
1314 effect
->GetParami
= null_GetParami
;
1315 effect
->GetParamiv
= null_GetParamiv
;
1316 effect
->GetParamf
= null_GetParamf
;
1317 effect
->GetParamfv
= null_GetParamfv
;
1320 effect
->type
= type
;