aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/Include
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-01-27 19:40:47 -0800
committerChris Robinson <[email protected]>2018-01-27 19:40:47 -0800
commitcb9fb3121499b02efd7ce513ea95173a3ce64f4c (patch)
treef4d47b5368d96be9d1e709cd7febde1963743b09 /OpenAL32/Include
parente8c268ef09d53461386fa7e81bd853cd1007d6c2 (diff)
Store filters in an array of lists
Diffstat (limited to 'OpenAL32/Include')
-rw-r--r--OpenAL32/Include/alFilter.h16
-rw-r--r--OpenAL32/Include/alMain.h10
2 files changed, 10 insertions, 16 deletions
diff --git a/OpenAL32/Include/alFilter.h b/OpenAL32/Include/alFilter.h
index c1932e2e..e28b7b2b 100644
--- a/OpenAL32/Include/alFilter.h
+++ b/OpenAL32/Include/alFilter.h
@@ -163,21 +163,7 @@ typedef struct ALfilter {
ALuint id;
} ALfilter;
-inline void LockFiltersRead(ALCdevice *device)
-{ LockUIntMapRead(&device->FilterMap); }
-inline void UnlockFiltersRead(ALCdevice *device)
-{ UnlockUIntMapRead(&device->FilterMap); }
-inline void LockFiltersWrite(ALCdevice *device)
-{ LockUIntMapWrite(&device->FilterMap); }
-inline void UnlockFiltersWrite(ALCdevice *device)
-{ UnlockUIntMapWrite(&device->FilterMap); }
-
-inline struct ALfilter *LookupFilter(ALCdevice *device, ALuint id)
-{ return (struct ALfilter*)LookupUIntMapKeyNoLock(&device->FilterMap, id); }
-inline struct ALfilter *RemoveFilter(ALCdevice *device, ALuint id)
-{ return (struct ALfilter*)RemoveUIntMapKeyNoLock(&device->FilterMap, id); }
-
-ALvoid ReleaseALFilters(ALCdevice *device);
+void ReleaseALFilters(ALCdevice *device);
#ifdef __cplusplus
}
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h
index 8908d93f..d21ec3b0 100644
--- a/OpenAL32/Include/alMain.h
+++ b/OpenAL32/Include/alMain.h
@@ -166,6 +166,7 @@ struct Compressor;
struct ALCbackend;
struct ALbuffer;
struct ALeffect;
+struct ALfilter;
struct ALsource;
struct ALcontextProps;
struct ALlistenerProps;
@@ -388,6 +389,12 @@ typedef struct EffectSubList {
} EffectSubList;
TYPEDEF_VECTOR(EffectSubList, vector_EffectSubList)
+typedef struct FilterSubList {
+ ALuint64 FreeMask;
+ struct ALfilter *Filters; /* 64 */
+} FilterSubList;
+TYPEDEF_VECTOR(FilterSubList, vector_FilterSubList)
+
typedef struct SourceSubList {
ALuint64 FreeMask;
struct ALsource *Sources; /* 64 */
@@ -496,7 +503,8 @@ struct ALCdevice_struct
almtx_t EffectLock;
// Map of Filters for this device
- UIntMap FilterMap;
+ vector_FilterSubList FilterList;
+ almtx_t FilterLock;
/* HRTF state and info */
struct DirectHrtfState *Hrtf;