diff options
author | Chris Robinson <[email protected]> | 2022-08-02 23:29:21 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2022-08-02 23:29:21 -0700 |
commit | 9d296a9c753909bb2f2ba5d281c6b13f112e4f4d (patch) | |
tree | 6a7dba158e088a39502c5ab1740cd935526006c7 /core/device.h | |
parent | b286e6497fdf03e008077a8188abcaee8f579aed (diff) |
Avoid putting a 1KB array on the stack
Diffstat (limited to 'core/device.h')
-rw-r--r-- | core/device.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/core/device.h b/core/device.h index 0af7b0e9..e52d015f 100644 --- a/core/device.h +++ b/core/device.h @@ -100,7 +100,6 @@ struct BFChannelConfig { uint Index; }; - struct MixParams { /* Coefficient channel mapping for mixing to the buffer. */ std::array<BFChannelConfig,MAX_OUTPUT_CHANNELS> AmbiMap{}; @@ -115,6 +114,8 @@ struct RealMixParams { al::span<FloatBufferLine> Buffer; }; +using AmbiRotateMatrix = std::array<std::array<float,MaxAmbiChannels>,MaxAmbiChannels>; + enum { // Frequency was requested by the app or config file FrequencyRequest, @@ -182,6 +183,8 @@ struct DeviceBase { std::chrono::nanoseconds ClockBase{0}; std::chrono::nanoseconds FixedLatency{0}; + AmbiRotateMatrix mAmbiRotateMatrix{}; + /* Temp storage used for mixer processing. */ static constexpr size_t MixerLineSize{BufferLineSize + MaxResamplerPadding + UhjDecoder::sFilterDelay}; |