aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/Include
diff options
context:
space:
mode:
Diffstat (limited to 'OpenAL32/Include')
-rw-r--r--OpenAL32/Include/alu.h38
1 files changed, 16 insertions, 22 deletions
diff --git a/OpenAL32/Include/alu.h b/OpenAL32/Include/alu.h
index cb0b675c..25a1d422 100644
--- a/OpenAL32/Include/alu.h
+++ b/OpenAL32/Include/alu.h
@@ -253,39 +253,33 @@ struct ALvoice {
ALuint mFlags;
- struct ResampleData {
- alignas(16) std::array<ALfloat,MAX_RESAMPLE_PADDING*2> mPrevSamples;
-
- ALfloat mAmbiScale;
- BandSplitter mAmbiSplitter;
- };
- std::array<ResampleData,MAX_INPUT_CHANNELS> mResampleData;
-
- struct {
+ struct DirectData {
int FilterType;
- DirectParams Params[MAX_INPUT_CHANNELS];
-
al::span<FloatBufferLine> Buffer;
ALsizei ChannelsPerOrder[MAX_AMBI_ORDER+1];
- } mDirect;
+ };
+ DirectData mDirect;
struct SendData {
int FilterType;
- SendParams Params[MAX_INPUT_CHANNELS];
-
al::span<FloatBufferLine> Buffer;
};
- al::FlexArray<SendData> mSend;
+ std::array<SendData,MAX_SENDS> mSend;
+
+ struct ChannelData {
+ alignas(16) std::array<ALfloat,MAX_RESAMPLE_PADDING*2> mPrevSamples;
- ALvoice(size_t numsends) : mSend{numsends} { }
+ ALfloat mAmbiScale;
+ BandSplitter mAmbiSplitter;
+
+ DirectParams mDryParams;
+ std::array<SendParams,MAX_SENDS> mWetParams;
+ };
+ std::array<ChannelData,MAX_INPUT_CHANNELS> mChans;
+
+ ALvoice() = default;
ALvoice(const ALvoice&) = delete;
ALvoice& operator=(const ALvoice&) = delete;
-
- static constexpr size_t Sizeof(size_t numsends) noexcept
- {
- return maxz(sizeof(ALvoice),
- al::FlexArray<SendData>::Sizeof(numsends, offsetof(ALvoice, mSend)));
- }
};
void DeinitVoice(ALvoice *voice) noexcept;