Use std::accumulate to find the max channel count
[openal-soft.git] / Alc / ambdec.h
blob33e74d36e8f2b1a3b1b05e035935ff7f119229d3
1 #ifndef AMBDEC_H
2 #define AMBDEC_H
4 #include <string>
6 #include "alMain.h"
8 /* Helpers to read .ambdec configuration files. */
10 enum class AmbDecScale {
11 N3D,
12 SN3D,
13 FuMa,
15 struct AmbDecConf {
16 std::string Description;
17 ALuint Version; /* Must be 3 */
19 ALuint ChanMask;
20 ALuint FreqBands; /* Must be 1 or 2 */
21 ALsizei NumSpeakers;
22 AmbDecScale CoeffScale;
24 ALfloat XOverFreq;
25 ALfloat XOverRatio;
27 struct {
28 std::string Name;
29 ALfloat Distance;
30 ALfloat Azimuth;
31 ALfloat Elevation;
32 std::string Connection;
33 } Speakers[MAX_OUTPUT_CHANNELS];
35 /* Unused when FreqBands == 1 */
36 ALfloat LFOrderGain[MAX_AMBI_ORDER+1];
37 ALfloat LFMatrix[MAX_OUTPUT_CHANNELS][MAX_AMBI_COEFFS];
39 ALfloat HFOrderGain[MAX_AMBI_ORDER+1];
40 ALfloat HFMatrix[MAX_OUTPUT_CHANNELS][MAX_AMBI_COEFFS];
42 int load(const char *fname) noexcept;
45 #endif /* AMBDEC_H */