From 70aefa75e2253ef7a93cdd6412e8523663d3c6e9 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Mon, 27 Mar 2017 23:16:23 -0700 Subject: Use an array of pointers for effects instead of a linked list --- OpenAL32/Include/alAuxEffectSlot.h | 8 ++++++-- OpenAL32/Include/alMain.h | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'OpenAL32/Include') diff --git a/OpenAL32/Include/alAuxEffectSlot.h b/OpenAL32/Include/alAuxEffectSlot.h index c6e40a55..7f95dc91 100644 --- a/OpenAL32/Include/alAuxEffectSlot.h +++ b/OpenAL32/Include/alAuxEffectSlot.h @@ -75,6 +75,12 @@ static const struct ALeffectStateFactoryVtable T##_ALeffectStateFactory_vtable = #define MAX_EFFECT_CHANNELS (4) +struct ALeffectslotArray { + ALsizei count; + struct ALeffectslot *slot[]; +}; + + struct ALeffectslotProps { ALfloat Gain; ALboolean AuxSendAuto; @@ -134,8 +140,6 @@ typedef struct ALeffectslot { * first-order device output (FOAOut). */ alignas(16) ALfloat WetBuffer[MAX_EFFECT_CHANNELS][BUFFERSIZE]; - - ATOMIC(struct ALeffectslot*) next; } ALeffectslot; inline void LockEffectSlotsRead(ALCcontext *context) diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h index 2182d3f0..9c1ef099 100644 --- a/OpenAL32/Include/alMain.h +++ b/OpenAL32/Include/alMain.h @@ -855,7 +855,7 @@ struct ALCcontext_struct { ALsizei VoiceCount; ALsizei MaxVoices; - ATOMIC(struct ALeffectslot*) ActiveAuxSlotList; + ATOMIC(struct ALeffectslotArray*) ActiveAuxSlots; ALCdevice *Device; const ALCchar *ExtensionList; -- cgit v1.2.3