From c43381d811f436187b99c51951365c33fc735dc5 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Wed, 20 Feb 2019 21:01:08 -0800 Subject: Allocate the effect slot wet buffer dynamically --- OpenAL32/Include/alAuxEffectSlot.h | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'OpenAL32') diff --git a/OpenAL32/Include/alAuxEffectSlot.h b/OpenAL32/Include/alAuxEffectSlot.h index de9e14a4..ccb01266 100644 --- a/OpenAL32/Include/alAuxEffectSlot.h +++ b/OpenAL32/Include/alAuxEffectSlot.h @@ -1,8 +1,11 @@ #ifndef _AL_AUXEFFECTSLOT_H_ #define _AL_AUXEFFECTSLOT_H_ +#include + #include "alMain.h" #include "alEffect.h" +#include "ambidefs.h" #include "almalloc.h" #include "atomic.h" @@ -99,19 +102,13 @@ struct ALeffectslot { /* Self ID */ ALuint id{}; - ALsizei NumChannels{}; - BFChannelConfig ChanMap[MAX_EFFECT_CHANNELS]; - /* Wet buffer configuration is ACN channel order with N3D scaling: - * * Channel 0 is the unattenuated mono signal. - * * Channel 1 is OpenAL -X * sqrt(3) - * * Channel 2 is OpenAL Y * sqrt(3) - * * Channel 3 is OpenAL -Z * sqrt(3) + /* Wet buffer configuration is ACN channel order with N3D scaling. * Consequently, effects that only want to work with mono input can use * channel 0 by itself. Effects that want multichannel can process the - * ambisonics signal and make a B-Format source pan for first-order device - * output (FOAOut). + * ambisonics signal and make a B-Format source pan. */ - alignas(16) ALfloat WetBuffer[MAX_EFFECT_CHANNELS][BUFFERSIZE]; + al::vector,16> WetBuffer; + BFChannelConfig ChanMap[MAX_AMBI_CHANNELS]; ALeffectslot() { PropsClean.test_and_set(std::memory_order_relaxed); } ALeffectslot(const ALeffectslot&) = delete; -- cgit v1.2.3