~ubuntu-branches/ubuntu/utopic/openal-soft/utopic

« back to all changes in this revision

Viewing changes to OpenAL32/Include/alEffect.h

  • Committer: Package Import Robot
  • Author(s): Michael Terry
  • Date: 2012-05-22 10:14:53 UTC
  • mfrom: (7.1.9 sid)
  • Revision ID: package-import@ubuntu.com-20120522101453-knsv1m1m8vl5ccfp
Tags: 1:1.14-3ubuntu1
* Merge from Debian testing.  Remaining changes:
  - Add a symbols file for libopenal1
* debian/libopenal1.symbols:
  - Update for 1.14

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
// NOTE:  The effect structure is getting too large, it may be a good idea to
2
 
//        start using a union or another form of unified storage.
3
1
#ifndef _AL_EFFECT_H_
4
2
#define _AL_EFFECT_H_
5
3
 
14
12
    REVERB,
15
13
    ECHO,
16
14
    MODULATOR,
 
15
    DEDICATED,
17
16
 
18
17
    MAX_EFFECTS
19
18
};
20
19
extern ALboolean DisabledEffects[MAX_EFFECTS];
21
20
 
 
21
extern ALfloat ReverbBoost;
 
22
extern ALboolean EmulateEAXReverb;
 
23
 
22
24
typedef struct ALeffect
23
25
{
24
26
    // Effect type (AL_EFFECT_NULL, ...)
69
71
        ALint Waveform;
70
72
    } Modulator;
71
73
 
 
74
    struct {
 
75
        ALfloat Gain;
 
76
    } Dedicated;
 
77
 
 
78
    void (*SetParami)(struct ALeffect *effect, ALCcontext *context, ALenum param, ALint val);
 
79
    void (*SetParamiv)(struct ALeffect *effect, ALCcontext *context, ALenum param, const ALint *vals);
 
80
    void (*SetParamf)(struct ALeffect *effect, ALCcontext *context, ALenum param, ALfloat val);
 
81
    void (*SetParamfv)(struct ALeffect *effect, ALCcontext *context, ALenum param, const ALfloat *vals);
 
82
 
 
83
    void (*GetParami)(struct ALeffect *effect, ALCcontext *context, ALenum param, ALint *val);
 
84
    void (*GetParamiv)(struct ALeffect *effect, ALCcontext *context, ALenum param, ALint *vals);
 
85
    void (*GetParamf)(struct ALeffect *effect, ALCcontext *context, ALenum param, ALfloat *val);
 
86
    void (*GetParamfv)(struct ALeffect *effect, ALCcontext *context, ALenum param, ALfloat *vals);
 
87
 
72
88
    // Index to itself
73
89
    ALuint effect;
74
90
} ALeffect;
75
91
 
76
 
 
 
92
#define ALeffect_SetParami(x, c, p, v)  ((x)->SetParami((x),(c),(p),(v)))
 
93
#define ALeffect_SetParamiv(x, c, p, v) ((x)->SetParamiv((x),(c),(p),(v)))
 
94
#define ALeffect_SetParamf(x, c, p, v)  ((x)->SetParamf((x),(c),(p),(v)))
 
95
#define ALeffect_SetParamfv(x, c, p, v) ((x)->SetParamfv((x),(c),(p),(v)))
 
96
 
 
97
#define ALeffect_GetParami(x, c, p, v)  ((x)->GetParami((x),(c),(p),(v)))
 
98
#define ALeffect_GetParamiv(x, c, p, v) ((x)->GetParamiv((x),(c),(p),(v)))
 
99
#define ALeffect_GetParamf(x, c, p, v)  ((x)->GetParamf((x),(c),(p),(v)))
 
100
#define ALeffect_GetParamfv(x, c, p, v) ((x)->GetParamfv((x),(c),(p),(v)))
 
101
 
 
102
static __inline ALboolean IsReverbEffect(ALenum type)
 
103
{ return type == AL_EFFECT_REVERB || type == AL_EFFECT_EAXREVERB; }
 
104
 
 
105
ALenum InitEffect(ALeffect *effect);
77
106
ALvoid ReleaseALEffects(ALCdevice *device);
78
107
 
 
108
ALvoid LoadReverbPreset(const char *name, ALeffect *effect);
 
109
 
79
110
#ifdef __cplusplus
80
111
}
81
112
#endif