From 5b2489c3e8d19d0be49b94131b6e6a813d37e5ea Mon Sep 17 00:00:00 2001
From: Chris Robinson <chris.kcat@gmail.com>
Date: Wed, 23 Jun 2021 09:44:58 -0700
Subject: Convert AmbDecConf to DecoderConfig for loading

This keeps AmbDecConf uses confined to multi-channel panning initialization,
and avoids spreading conversions and maps all over.
---
 core/bformatdec.h | 14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)

(limited to 'core/bformatdec.h')

diff --git a/core/bformatdec.h b/core/bformatdec.h
index a0ae3f27..2cc057f4 100644
--- a/core/bformatdec.h
+++ b/core/bformatdec.h
@@ -12,7 +12,6 @@
 #include "devformat.h"
 #include "filters/splitter.h"
 
-struct AmbDecConf;
 struct FrontStablizer;
 
 
@@ -40,13 +39,11 @@ class BFormatDec {
 
     al::FlexArray<ChannelDecoder> mChannelDec;
 
-public:
-    BFormatDec(const AmbDecConf *conf, const bool allow_2band, const size_t inchans,
-        const uint srate, const uint (&chanmap)[MAX_OUTPUT_CHANNELS],
-        std::unique_ptr<FrontStablizer> stablizer);
     BFormatDec(const size_t inchans, const al::span<const ChannelDec> coeffs,
-        const al::span<const ChannelDec> coeffslf, std::unique_ptr<FrontStablizer> stablizer);
+        const al::span<const ChannelDec> coeffslf, const float xover_f0norm,
+        std::unique_ptr<FrontStablizer> stablizer);
 
+public:
     bool hasStablizer() const noexcept { return mStablizer != nullptr; };
 
     /* Decodes the ambisonic input to the given output channels. */
@@ -58,12 +55,9 @@ public:
         const FloatBufferLine *InSamples, const size_t lidx, const size_t ridx, const size_t cidx,
         const size_t SamplesToDo);
 
-    static std::unique_ptr<BFormatDec> Create(const AmbDecConf *conf, const bool allow_2band,
-        const size_t inchans, const uint srate, const uint (&chanmap)[MAX_OUTPUT_CHANNELS],
-        std::unique_ptr<FrontStablizer> stablizer);
     static std::unique_ptr<BFormatDec> Create(const size_t inchans,
         const al::span<const ChannelDec> coeffs, const al::span<const ChannelDec> coeffslf,
-        std::unique_ptr<FrontStablizer> stablizer);
+        const float xover_f0norm, std::unique_ptr<FrontStablizer> stablizer);
 
     DEF_FAM_NEWDEL(BFormatDec, mChannelDec)
 };
-- 
cgit v1.2.3