Avoid using AL types with the filters
[openal-soft.git] / Alc / filters / splitter.h
blob96ecdb4335b27e662e0f6949d6f84bf698356c99
1 #ifndef FILTER_SPLITTER_H
2 #define FILTER_SPLITTER_H
4 #include "alMain.h"
5 #include "almalloc.h"
8 /* Band splitter. Splits a signal into two phase-matching frequency bands. */
9 struct BandSplitter {
10 float coeff{0.0f};
11 float lp_z1{0.0f};
12 float lp_z2{0.0f};
13 float hp_z1{0.0f};
16 void bandsplit_init(BandSplitter *splitter, float f0norm);
17 void bandsplit_clear(BandSplitter *splitter);
18 void bandsplit_process(BandSplitter *splitter, float *RESTRICT hpout, float *RESTRICT lpout,
19 const float *input, int count);
21 /* The all-pass portion of the band splitter. Applies the same phase shift
22 * without splitting the signal.
24 struct SplitterAllpass {
25 float coeff{0.0f};
26 float z1{0.0f};
29 void splitterap_init(SplitterAllpass *splitter, float f0norm);
30 void splitterap_clear(SplitterAllpass *splitter);
31 void splitterap_process(SplitterAllpass *splitter, float *RESTRICT samples, int count);
34 struct FrontStablizer {
35 SplitterAllpass APFilter[MAX_OUTPUT_CHANNELS];
36 BandSplitter LFilter, RFilter;
37 alignas(16) float LSplit[2][BUFFERSIZE];
38 alignas(16) float RSplit[2][BUFFERSIZE];
40 DEF_NEWDEL(FrontStablizer)
43 #endif /* FILTER_SPLITTER_H */