8 #include "aloptional.h"
9 #include "core/ambidefs.h"
11 /* Helpers to read .ambdec configuration files. */
13 enum class AmbDecScale
{
20 std::string Description
;
21 int Version
{0}; /* Must be 3 */
23 unsigned int ChanMask
{0u};
24 unsigned int FreqBands
{0u}; /* Must be 1 or 2 */
25 AmbDecScale CoeffScale
{AmbDecScale::Unset
};
27 float XOverFreq
{0.0f
};
28 float XOverRatio
{0.0f
};
34 float Elevation
{0.0f
};
35 std::string Connection
;
37 size_t NumSpeakers
{0};
38 std::unique_ptr
<SpeakerConf
[]> Speakers
;
40 using CoeffArray
= std::array
<float,MaxAmbiChannels
>;
41 std::unique_ptr
<CoeffArray
[]> Matrix
;
43 /* Unused when FreqBands == 1 */
44 float LFOrderGain
[MaxAmbiOrder
+1]{};
47 float HFOrderGain
[MaxAmbiOrder
+1]{};
52 al::optional
<std::string
> load(const char *fname
) noexcept
;
55 #endif /* CORE_AMBDEC_H */