diff options
Diffstat (limited to 'core/ambidefs.h')
-rw-r--r-- | core/ambidefs.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/core/ambidefs.h b/core/ambidefs.h index 001edc5b..20b3942e 100644 --- a/core/ambidefs.h +++ b/core/ambidefs.h @@ -114,20 +114,26 @@ struct AmbiScale { } /* Retrieves per-order HF scaling factors for "upsampling" ambisonic data. */ - static std::array<float,MaxAmbiOrder+1> GetHFOrderScales(const uint order) noexcept + static std::array<float,MaxAmbiOrder+1> GetHFOrderScales(const uint order, const bool is3D) noexcept { - if(order >= 3) return DecoderHFScale3O; - if(order == 2) return DecoderHFScale2O; - return DecoderHFScale10; + if(order >= 3) return is3D ? DecoderHFScale3O : DecoderHFScale3O2D; + if(order == 2) return is3D ? DecoderHFScale2O : DecoderHFScale2O2D; + return is3D ? DecoderHFScale10 : DecoderHFScale1O2D; } static const std::array<float,MaxAmbiOrder+1> DecoderHFScale10; + static const std::array<float,MaxAmbiOrder+1> DecoderHFScale1O2D; static const std::array<float,MaxAmbiOrder+1> DecoderHFScale2O; + static const std::array<float,MaxAmbiOrder+1> DecoderHFScale2O2D; static const std::array<float,MaxAmbiOrder+1> DecoderHFScale3O; + static const std::array<float,MaxAmbiOrder+1> DecoderHFScale3O2D; static const std::array<std::array<float,MaxAmbiChannels>,4> FirstOrderUp; + static const std::array<std::array<float,MaxAmbiChannels>,4> FirstOrder2DUp; static const std::array<std::array<float,MaxAmbiChannels>,9> SecondOrderUp; + static const std::array<std::array<float,MaxAmbiChannels>,9> SecondOrder2DUp; static const std::array<std::array<float,MaxAmbiChannels>,16> ThirdOrderUp; + static const std::array<std::array<float,MaxAmbiChannels>,16> ThirdOrder2DUp; }; struct AmbiIndex { |