From 6a4a88f8f5c050b2a1e312984d072d806d7c387c Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Thu, 1 Feb 2018 23:56:35 -0800 Subject: Store an index to a given source's voice For more efficient voice lookups when needed. --- OpenAL32/Include/alSource.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'OpenAL32/Include') diff --git a/OpenAL32/Include/alSource.h b/OpenAL32/Include/alSource.h index b346e619..2892a245 100644 --- a/OpenAL32/Include/alSource.h +++ b/OpenAL32/Include/alSource.h @@ -100,6 +100,11 @@ typedef struct ALsource { ATOMIC_FLAG PropsClean; + /* Index into the context's Voices array. Lazily updated, only checked and + * reset when looking up the voice. + */ + ALint VoiceIdx; + /** Self ID */ ALuint id; } ALsource; -- cgit v1.2.3