Audio: Implement support for ALC_EXT_thread_local_context

This commit is contained in:
SirLynix
2023-12-04 17:38:05 +01:00
parent 3e1b61070c
commit 3fb1096d07
3 changed files with 74 additions and 14 deletions

View File

@@ -27,6 +27,7 @@ namespace Nz
enum class OpenALExtension
{
SourceLatency,
ThreadLocalContext,
Max = SourceLatency
};
@@ -82,6 +83,8 @@ namespace Nz
OpenALDevice& operator=(const OpenALDevice&) = delete;
OpenALDevice& operator=(OpenALDevice&&) = delete;
static const OpenALDevice* GetCurrentDevice();
// We give each device its own set of function pointer, even though regular OpenAL extensions are always the same (for a set library).
// This makes it easier to wrap them (for error handling), and extension pointers are device-local anyway.
#define NAZARA_AUDIO_AL_ALC_FUNCTION(name) decltype(&::name) name;