Make a couple more operator bools explicit
[openal-soft.git] / core / ambdec.h
blobb6aa122576abf7d2a061cc33affcfa7bcdf18c33
1 #ifndef CORE_AMBDEC_H
2 #define CORE_AMBDEC_H
4 #include <array>
5 #include <memory>
6 #include <string>
8 #include "aloptional.h"
9 #include "core/ambidefs.h"
11 /* Helpers to read .ambdec configuration files. */
13 enum class AmbDecScale {
14 N3D,
15 SN3D,
16 FuMa,
18 struct AmbDecConf {
19 std::string Description;
20 int Version{0}; /* Must be 3 */
22 unsigned int ChanMask{0u};
23 unsigned int FreqBands{0u}; /* Must be 1 or 2 */
24 AmbDecScale CoeffScale{};
26 float XOverFreq{0.0f};
27 float XOverRatio{0.0f};
29 struct SpeakerConf {
30 std::string Name;
31 float Distance{0.0f};
32 float Azimuth{0.0f};
33 float Elevation{0.0f};
34 std::string Connection;
36 size_t NumSpeakers{0};
37 std::unique_ptr<SpeakerConf[]> Speakers;
39 using CoeffArray = std::array<float,MaxAmbiChannels>;
40 std::unique_ptr<CoeffArray[]> Matrix;
42 /* Unused when FreqBands == 1 */
43 float LFOrderGain[MaxAmbiOrder+1]{};
44 CoeffArray *LFMatrix;
46 float HFOrderGain[MaxAmbiOrder+1]{};
47 CoeffArray *HFMatrix;
49 al::optional<std::string> load(const char *fname) noexcept;
52 #endif /* CORE_AMBDEC_H */