Use a lockless method for updating listener and context properties
commit186b54aa3d5f1398a384fa318aa000210d82437e
authorChris Robinson <chris.kcat@gmail.com>
Thu, 12 May 2016 01:40:17 +0000 (11 18:40 -0700)
committerChris Robinson <chris.kcat@gmail.com>
Thu, 12 May 2016 04:02:11 +0000 (11 21:02 -0700)
tree32daef17365aee1fb61a05db9b6c23aec25f6e07
parent21bc0f5ef8f0e410ea840061589b844d6e401afc
Use a lockless method for updating listener and context properties

This uses a separate container to provide the relevant properties to the
internal update method, using atomic pointer swaps. A free-list is used to
avoid having too many individual containers.

This allows the mixer to update the internal listener properties without
requiring the lock to protect against async updates. It also allows concurrent
read access to the user-facing property values, even the multi-value ones (e.g.
the vectors).
Alc/ALc.c
Alc/ALu.c
OpenAL32/Include/alListener.h
OpenAL32/Include/alMain.h
OpenAL32/alAuxEffectSlot.c
OpenAL32/alListener.c
OpenAL32/alState.c