aboutsummaryrefslogtreecommitdiffstats
path: root/common/uintmap.h
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2017-04-14 22:56:54 -0700
committerChris Robinson <[email protected]>2017-04-14 23:50:49 -0700
commitd9bf4f7620c1e13846a53ee9df5c8c9eb2fcfe7d (patch)
treeb3ab3fb963b8fbc5dbcafe4c8a6ffbd9e72ec572 /common/uintmap.h
parentafb59e7f98f40cde77c150414a8a5bd13f40781a (diff)
Allow increasing the maximum source limit
If the requested number of mono and stereo sources exceeds 256, the source limit will be expanded. Any config file setting overrides this. If the device is reset to have fewer sources than are currently allocated, excess sources will remain and be usable as normal, but no more can be generated until enough are delated to go back below the limit.
Diffstat (limited to 'common/uintmap.h')
-rw-r--r--common/uintmap.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/common/uintmap.h b/common/uintmap.h
index f70d99fd..47bd0d42 100644
--- a/common/uintmap.h
+++ b/common/uintmap.h
@@ -19,10 +19,11 @@ typedef struct UIntMap {
RWLock lock;
} UIntMap;
#define UINTMAP_STATIC_INITIALIZE_N(_n) { NULL, NULL, 0, 0, (_n), RWLOCK_STATIC_INITIALIZE }
-#define UINTMAP_STATIC_INITIALIZE UINTMAP_STATIC_INITIALIZE_N(~0)
+#define UINTMAP_STATIC_INITIALIZE UINTMAP_STATIC_INITIALIZE_N(INT_MAX)
void InitUIntMap(UIntMap *map, ALsizei limit);
void ResetUIntMap(UIntMap *map);
+void RelimitUIntMapNoLock(UIntMap *map, ALsizei limit);
ALenum InsertUIntMapEntry(UIntMap *map, ALuint key, ALvoid *value);
ALenum InsertUIntMapEntryNoLock(UIntMap *map, ALuint key, ALvoid *value);
ALvoid *RemoveUIntMapKey(UIntMap *map, ALuint key);