aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/Include
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2019-02-20 21:01:08 -0800
committerChris Robinson <[email protected]>2019-02-20 21:01:08 -0800
commitc43381d811f436187b99c51951365c33fc735dc5 (patch)
treed7c542ccf07bd04f45902b4dfa1f5cf401951ce5 /OpenAL32/Include
parent77ba61ecb3973dab4fff5fdc8bc237a6f4cd0056 (diff)
Allocate the effect slot wet buffer dynamically
Diffstat (limited to 'OpenAL32/Include')
-rw-r--r--OpenAL32/Include/alAuxEffectSlot.h17
1 files changed, 7 insertions, 10 deletions
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 <array>
+
#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<std::array<ALfloat,BUFFERSIZE>,16> WetBuffer;
+ BFChannelConfig ChanMap[MAX_AMBI_CHANNELS];
ALeffectslot() { PropsClean.test_and_set(std::memory_order_relaxed); }
ALeffectslot(const ALeffectslot&) = delete;