11 #include "core/ambidefs.h"
13 /* Helpers to read .ambdec configuration files. */
15 enum class AmbDecScale
{
22 std::string Description
;
23 int Version
{0}; /* Must be 3 */
25 unsigned int ChanMask
{0u};
26 unsigned int FreqBands
{0u}; /* Must be 1 or 2 */
27 AmbDecScale CoeffScale
{AmbDecScale::Unset
};
29 float XOverFreq
{0.0f
};
30 float XOverRatio
{0.0f
};
36 float Elevation
{0.0f
};
37 std::string Connection
;
39 std::vector
<SpeakerConf
> Speakers
;
41 using CoeffArray
= std::array
<float,MaxAmbiChannels
>;
42 std::vector
<CoeffArray
> Matrix
;
44 /* Unused when FreqBands == 1 */
45 std::array
<float,MaxAmbiOrder
+1> LFOrderGain
{};
46 al::span
<CoeffArray
> LFMatrix
;
48 std::array
<float,MaxAmbiOrder
+1> HFOrderGain
{};
49 al::span
<CoeffArray
> HFMatrix
;
53 std::optional
<std::string
> load(const char *fname
) noexcept
;
56 #endif /* CORE_AMBDEC_H */