Make the filter history buffer size flexible
[openal-soft/openal-hmr.git] / OpenAL32 / Include / alFilter.h
blob40fff4fd0d8d96a5b728b45a3b09b918f6aa0dce
1 #ifndef _AL_FILTER_H_
2 #define _AL_FILTER_H_
4 #include "AL/al.h"
5 #include "alu.h"
7 #ifdef __cplusplus
8 extern "C" {
9 #endif
11 typedef struct {
12 ALfloat coeff;
13 ALfloat history[0];
14 } FILTER;
16 #define AL_FILTER_TYPE 0x8001
18 #define AL_FILTER_NULL 0x0000
19 #define AL_FILTER_LOWPASS 0x0001
20 #define AL_FILTER_HIGHPASS 0x0002
21 #define AL_FILTER_BANDPASS 0x0003
23 #define AL_LOWPASS_GAIN 0x0001
24 #define AL_LOWPASS_GAINHF 0x0002
27 typedef struct ALfilter_struct
29 // Filter type (AL_FILTER_NULL, ...)
30 ALenum type;
32 ALfloat Gain;
33 ALfloat GainHF;
35 // Index to itself
36 ALuint filter;
38 struct ALfilter_struct *next;
39 } ALfilter;
41 ALvoid AL_APIENTRY alGenFilters(ALsizei n, ALuint *filters);
42 ALvoid AL_APIENTRY alDeleteFilters(ALsizei n, ALuint *filters);
43 ALboolean AL_APIENTRY alIsFilter(ALuint filter);
45 ALvoid AL_APIENTRY alFilteri(ALuint filter, ALenum param, ALint iValue);
46 ALvoid AL_APIENTRY alFilteriv(ALuint filter, ALenum param, ALint *piValues);
47 ALvoid AL_APIENTRY alFilterf(ALuint filter, ALenum param, ALfloat flValue);
48 ALvoid AL_APIENTRY alFilterfv(ALuint filter, ALenum param, ALfloat *pflValues);
50 ALvoid AL_APIENTRY alGetFilteri(ALuint filter, ALenum param, ALint *piValue);
51 ALvoid AL_APIENTRY alGetFilteriv(ALuint filter, ALenum param, ALint *piValues);
52 ALvoid AL_APIENTRY alGetFilterf(ALuint filter, ALenum param, ALfloat *pflValue);
53 ALvoid AL_APIENTRY alGetFilterfv(ALuint filter, ALenum param, ALfloat *pflValues);
55 ALvoid ReleaseALFilters(ALvoid);
57 #ifdef __cplusplus
59 #endif
61 #endif