From 031cf248808df8cc7d0af2a5c5174d189af7a4ac Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sat, 27 Jan 2018 13:02:17 -0800 Subject: Use an array lookup for source IDs This is now similar to buffers, being stored in groups of 64 in a vector with the ID providing the array indices. --- OpenAL32/Include/alMain.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'OpenAL32/Include/alMain.h') diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h index c4223ac9..f7ae2ecd 100644 --- a/OpenAL32/Include/alMain.h +++ b/OpenAL32/Include/alMain.h @@ -165,6 +165,7 @@ struct FrontStablizer; struct Compressor; struct ALCbackend; struct ALbuffer; +struct ALsource; struct ALcontextProps; struct ALlistenerProps; struct ALvoiceProps; @@ -380,6 +381,12 @@ typedef struct BufferSubList { } BufferSubList; TYPEDEF_VECTOR(BufferSubList, vector_BufferSubList) +typedef struct SourceSubList { + ALuint64 FreeMask; + struct ALsource *Sources; /* 64 */ +} SourceSubList; +TYPEDEF_VECTOR(SourceSubList, vector_SourceSubList) + typedef struct EnumeratedHrtf { al_string name; @@ -589,7 +596,10 @@ struct ALCcontext_struct { struct ALlistener *Listener; - UIntMap SourceMap; + vector_SourceSubList SourceList; + ALuint NumSources; + almtx_t SourceLock; + UIntMap EffectSlotMap; ATOMIC(ALenum) LastError; -- cgit v1.2.3