aboutsummaryrefslogtreecommitdiffstats
path: root/core/bformatdec.h
diff options
context:
space:
mode:
authorSven Göthel <[email protected]>2024-01-05 13:52:12 +0100
committerSven Göthel <[email protected]>2024-01-05 13:52:12 +0100
commitec98cdacc85ff0202852472c7756586437912f22 (patch)
tree42414746a27ab35cb8cdbc95af521d74821e57f4 /core/bformatdec.h
parentfd5269bec9a5fe4815974b1786a037e6a247bfd2 (diff)
parentb82cd2e60edb8fbe5fdd3567105ae76a016a554c (diff)
Merge remote-tracking branch 'upstream/master'HEADmaster
Diffstat (limited to 'core/bformatdec.h')
-rw-r--r--core/bformatdec.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/core/bformatdec.h b/core/bformatdec.h
index 3bb7f544..8513db03 100644
--- a/core/bformatdec.h
+++ b/core/bformatdec.h
@@ -25,15 +25,15 @@ class BFormatDec {
static constexpr size_t sNumBands{2};
struct ChannelDecoderSingle {
- float mGains[MAX_OUTPUT_CHANNELS];
+ std::array<float,MaxOutputChannels> mGains{};
};
struct ChannelDecoderDual {
BandSplitter mXOver;
- float mGains[sNumBands][MAX_OUTPUT_CHANNELS];
+ std::array<std::array<float,MaxOutputChannels>,sNumBands> mGains{};
};
- alignas(16) std::array<FloatBufferLine,2> mSamples;
+ alignas(16) std::array<FloatBufferLine,2> mSamples{};
const std::unique_ptr<FrontStablizer> mStablizer;
@@ -44,7 +44,7 @@ public:
const al::span<const ChannelDec> coeffslf, const float xover_f0norm,
std::unique_ptr<FrontStablizer> stablizer);
- bool hasStablizer() const noexcept { return mStablizer != nullptr; }
+ [[nodiscard]] auto hasStablizer() const noexcept -> bool { return mStablizer != nullptr; }
/* Decodes the ambisonic input to the given output channels. */
void process(const al::span<FloatBufferLine> OutBuffer, const FloatBufferLine *InSamples,
@@ -58,8 +58,6 @@ public:
static std::unique_ptr<BFormatDec> Create(const size_t inchans,
const al::span<const ChannelDec> coeffs, const al::span<const ChannelDec> coeffslf,
const float xover_f0norm, std::unique_ptr<FrontStablizer> stablizer);
-
- DEF_NEWDEL(BFormatDec)
};
#endif /* CORE_BFORMATDEC_H */