aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/Include
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-01-27 19:01:25 -0800
committerChris Robinson <[email protected]>2018-01-27 19:04:32 -0800
commite8c268ef09d53461386fa7e81bd853cd1007d6c2 (patch)
tree9c17f4bac398ca3de8c74661bf28a9b5fc046933 /OpenAL32/Include
parent6a839600b96b73104f8b93a4fa4a1a8da67cae5c (diff)
Store effects in an array of lists
Diffstat (limited to 'OpenAL32/Include')
-rw-r--r--OpenAL32/Include/alEffect.h14
-rw-r--r--OpenAL32/Include/alMain.h10
2 files changed, 9 insertions, 15 deletions
diff --git a/OpenAL32/Include/alEffect.h b/OpenAL32/Include/alEffect.h
index dbbd8966..30055f1f 100644
--- a/OpenAL32/Include/alEffect.h
+++ b/OpenAL32/Include/alEffect.h
@@ -166,20 +166,6 @@ typedef struct ALeffect {
ALuint id;
} ALeffect;
-inline void LockEffectsRead(ALCdevice *device)
-{ LockUIntMapRead(&device->EffectMap); }
-inline void UnlockEffectsRead(ALCdevice *device)
-{ UnlockUIntMapRead(&device->EffectMap); }
-inline void LockEffectsWrite(ALCdevice *device)
-{ LockUIntMapWrite(&device->EffectMap); }
-inline void UnlockEffectsWrite(ALCdevice *device)
-{ UnlockUIntMapWrite(&device->EffectMap); }
-
-inline struct ALeffect *LookupEffect(ALCdevice *device, ALuint id)
-{ return (struct ALeffect*)LookupUIntMapKeyNoLock(&device->EffectMap, id); }
-inline struct ALeffect *RemoveEffect(ALCdevice *device, ALuint id)
-{ return (struct ALeffect*)RemoveUIntMapKeyNoLock(&device->EffectMap, id); }
-
inline ALboolean IsReverbEffect(ALenum type)
{ return type == AL_EFFECT_REVERB || type == AL_EFFECT_EAXREVERB; }
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h
index d1ae0a94..8908d93f 100644
--- a/OpenAL32/Include/alMain.h
+++ b/OpenAL32/Include/alMain.h
@@ -165,6 +165,7 @@ struct FrontStablizer;
struct Compressor;
struct ALCbackend;
struct ALbuffer;
+struct ALeffect;
struct ALsource;
struct ALcontextProps;
struct ALlistenerProps;
@@ -381,6 +382,12 @@ typedef struct BufferSubList {
} BufferSubList;
TYPEDEF_VECTOR(BufferSubList, vector_BufferSubList)
+typedef struct EffectSubList {
+ ALuint64 FreeMask;
+ struct ALeffect *Effects; /* 64 */
+} EffectSubList;
+TYPEDEF_VECTOR(EffectSubList, vector_EffectSubList)
+
typedef struct SourceSubList {
ALuint64 FreeMask;
struct ALsource *Sources; /* 64 */
@@ -485,7 +492,8 @@ struct ALCdevice_struct
almtx_t BufferLock;
// Map of Effects for this device
- UIntMap EffectMap;
+ vector_EffectSubList EffectList;
+ almtx_t EffectLock;
// Map of Filters for this device
UIntMap FilterMap;