From d9bf4f7620c1e13846a53ee9df5c8c9eb2fcfe7d Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Fri, 14 Apr 2017 22:56:54 -0700 Subject: 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. --- common/uintmap.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'common/uintmap.h') 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); -- cgit v1.2.3