]> git.tdb.fi Git - ext/openal.git/blob - al/effects/convolution.cpp
Import OpenAL Soft 1.23.1 sources
[ext/openal.git] / al / effects / convolution.cpp
1
2 #include "config.h"
3
4 #include "AL/al.h"
5 #include "alc/inprogext.h"
6
7 #include "alc/effects/base.h"
8 #include "effects.h"
9
10
11 namespace {
12
13 void Convolution_setParami(EffectProps* /*props*/, ALenum param, int /*val*/)
14 {
15     switch(param)
16     {
17     default:
18         throw effect_exception{AL_INVALID_ENUM, "Invalid null effect integer property 0x%04x",
19             param};
20     }
21 }
22 void Convolution_setParamiv(EffectProps *props, ALenum param, const int *vals)
23 {
24     switch(param)
25     {
26     default:
27         Convolution_setParami(props, param, vals[0]);
28     }
29 }
30 void Convolution_setParamf(EffectProps* /*props*/, ALenum param, float /*val*/)
31 {
32     switch(param)
33     {
34     default:
35         throw effect_exception{AL_INVALID_ENUM, "Invalid null effect float property 0x%04x",
36             param};
37     }
38 }
39 void Convolution_setParamfv(EffectProps *props, ALenum param, const float *vals)
40 {
41     switch(param)
42     {
43     default:
44         Convolution_setParamf(props, param, vals[0]);
45     }
46 }
47
48 void Convolution_getParami(const EffectProps* /*props*/, ALenum param, int* /*val*/)
49 {
50     switch(param)
51     {
52     default:
53         throw effect_exception{AL_INVALID_ENUM, "Invalid null effect integer property 0x%04x",
54             param};
55     }
56 }
57 void Convolution_getParamiv(const EffectProps *props, ALenum param, int *vals)
58 {
59     switch(param)
60     {
61     default:
62         Convolution_getParami(props, param, vals);
63     }
64 }
65 void Convolution_getParamf(const EffectProps* /*props*/, ALenum param, float* /*val*/)
66 {
67     switch(param)
68     {
69     default:
70         throw effect_exception{AL_INVALID_ENUM, "Invalid null effect float property 0x%04x",
71             param};
72     }
73 }
74 void Convolution_getParamfv(const EffectProps *props, ALenum param, float *vals)
75 {
76     switch(param)
77     {
78     default:
79         Convolution_getParamf(props, param, vals);
80     }
81 }
82
83 EffectProps genDefaultProps() noexcept
84 {
85     EffectProps props{};
86     return props;
87 }
88
89 } // namespace
90
91 DEFINE_ALEFFECT_VTABLE(Convolution);
92
93 const EffectProps ConvolutionEffectProps{genDefaultProps()};