Use function pointers for setting the AL context
commitec214b6bfd3589178e9297d508e43440311281d3
authorChris Robinson <chris.kcat@gmail.com>
Sat, 9 Jun 2018 08:00:35 +0000 (9 01:00 -0700)
committerChris Robinson <chris.kcat@gmail.com>
Sat, 9 Jun 2018 08:00:35 +0000 (9 01:00 -0700)
treefd3c8c56cc763b8607adada425df22433e0f64fe
parentd505d735512e1ecd4c221426b95eaa6712e32f03
Use function pointers for setting the AL context

Since they may be set using thread-local contexts (avoiding extraneous locks)
or using the global context (requiring a global lock), constantly checking
every time OpenAL calls are made is wasteful.

This also stores the current thread-local context in TLS storage, allowing
simpler checking if the context needs to be (re)set.
dsound8.c
dsound_main.c
dsound_private.h