aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/Include/alMain.h
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-01-27 17:24:18 -0800
committerChris Robinson <[email protected]>2018-01-27 19:04:32 -0800
commit6a839600b96b73104f8b93a4fa4a1a8da67cae5c (patch)
tree5b5203ce907411f32999e2e3ee3e3cd2a39dda25 /OpenAL32/Include/alMain.h
parent4d1795e90b83f040aa59cf69616a4ff2b32bf71a (diff)
Use a vector to store the effect slot pointers
And make the ID a simple index into it (1-base, to avoid ID 0).
Diffstat (limited to 'OpenAL32/Include/alMain.h')
-rw-r--r--OpenAL32/Include/alMain.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h
index f7ae2ecd..d1ae0a94 100644
--- a/OpenAL32/Include/alMain.h
+++ b/OpenAL32/Include/alMain.h
@@ -387,6 +387,12 @@ typedef struct SourceSubList {
} SourceSubList;
TYPEDEF_VECTOR(SourceSubList, vector_SourceSubList)
+/* Effect slots are rather large, and apps aren't likely to have more than one
+ * or two (let alone 64), so hold them individually.
+ */
+typedef struct ALeffectslot *ALeffectslotPtr;
+TYPEDEF_VECTOR(ALeffectslotPtr, vector_ALeffectslotPtr)
+
typedef struct EnumeratedHrtf {
al_string name;
@@ -600,7 +606,8 @@ struct ALCcontext_struct {
ALuint NumSources;
almtx_t SourceLock;
- UIntMap EffectSlotMap;
+ vector_ALeffectslotPtr EffectSlotList;
+ almtx_t EffectSlotLock;
ATOMIC(ALenum) LastError;