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

initial forking of open-al to create multiple listeners
author Robert McIntyre <rlm@mit.edu>
date Tue, 25 Oct 2011 13:02:31 -0700
parents
children
line wrap: on
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/OpenAL32/Include/alEffect.h	Tue Oct 25 13:02:31 2011 -0700
     1.3 @@ -0,0 +1,93 @@
     1.4 +#ifndef _AL_EFFECT_H_
     1.5 +#define _AL_EFFECT_H_
     1.6 +
     1.7 +#include "AL/al.h"
     1.8 +
     1.9 +#ifdef __cplusplus
    1.10 +extern "C" {
    1.11 +#endif
    1.12 +
    1.13 +enum {
    1.14 +    EAXREVERB = 0,
    1.15 +    REVERB,
    1.16 +    ECHO,
    1.17 +    MODULATOR,
    1.18 +    DEDICATED,
    1.19 +
    1.20 +    MAX_EFFECTS
    1.21 +};
    1.22 +extern ALboolean DisabledEffects[MAX_EFFECTS];
    1.23 +
    1.24 +extern ALfloat ReverbBoost;
    1.25 +extern ALboolean EmulateEAXReverb;
    1.26 +
    1.27 +typedef struct ALeffect
    1.28 +{
    1.29 +    // Effect type (AL_EFFECT_NULL, ...)
    1.30 +    ALenum type;
    1.31 +
    1.32 +    union {
    1.33 +        struct {
    1.34 +            // Shared Reverb Properties
    1.35 +            ALfloat Density;
    1.36 +            ALfloat Diffusion;
    1.37 +            ALfloat Gain;
    1.38 +            ALfloat GainHF;
    1.39 +            ALfloat DecayTime;
    1.40 +            ALfloat DecayHFRatio;
    1.41 +            ALfloat ReflectionsGain;
    1.42 +            ALfloat ReflectionsDelay;
    1.43 +            ALfloat LateReverbGain;
    1.44 +            ALfloat LateReverbDelay;
    1.45 +            ALfloat AirAbsorptionGainHF;
    1.46 +            ALfloat RoomRolloffFactor;
    1.47 +            ALboolean DecayHFLimit;
    1.48 +
    1.49 +            // Additional EAX Reverb Properties
    1.50 +            ALfloat GainLF;
    1.51 +            ALfloat DecayLFRatio;
    1.52 +            ALfloat ReflectionsPan[3];
    1.53 +            ALfloat LateReverbPan[3];
    1.54 +            ALfloat EchoTime;
    1.55 +            ALfloat EchoDepth;
    1.56 +            ALfloat ModulationTime;
    1.57 +            ALfloat ModulationDepth;
    1.58 +            ALfloat HFReference;
    1.59 +            ALfloat LFReference;
    1.60 +        } Reverb;
    1.61 +
    1.62 +        struct {
    1.63 +            ALfloat Delay;
    1.64 +            ALfloat LRDelay;
    1.65 +
    1.66 +            ALfloat Damping;
    1.67 +            ALfloat Feedback;
    1.68 +
    1.69 +            ALfloat Spread;
    1.70 +        } Echo;
    1.71 +
    1.72 +        struct {
    1.73 +            ALfloat Frequency;
    1.74 +            ALfloat HighPassCutoff;
    1.75 +            ALint Waveform;
    1.76 +        } Modulator;
    1.77 +
    1.78 +        struct {
    1.79 +            ALfloat Gain;
    1.80 +        } Dedicated;
    1.81 +    } Params;
    1.82 +
    1.83 +    // Index to itself
    1.84 +    ALuint effect;
    1.85 +} ALeffect;
    1.86 +
    1.87 +static __inline ALboolean IsReverbEffect(ALenum type)
    1.88 +{ return type == AL_EFFECT_REVERB || type == AL_EFFECT_EAXREVERB; }
    1.89 +
    1.90 +ALvoid ReleaseALEffects(ALCdevice *device);
    1.91 +
    1.92 +#ifdef __cplusplus
    1.93 +}
    1.94 +#endif
    1.95 +
    1.96 +#endif