From a7fc952036668d6e6bdf7737cc13e92b4002259c Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Tue, 12 Sep 2023 22:32:34 -0700 Subject: Add a alcGetProcAddress2 function This is essentially just a copy of alcGetProcAddress. It's purpose is to bypass Creative's router's alcGetProcAddress implementation, which returns its own functions even if given a device handle. When combined with it also wrapping the drivers' device and context handles, that prevents any extention function that needs a recognizable device or context handle from working, like the *Direct functions, as there's no way for the app to get a device or context handle the driver can know about). An alternate function to get function pointers allows a driver to return its own implementation for standard and extension functions, which an application can use to "bootstrap" audio to use a particular driver directly, enabling use of extensions that the router gets in the way of (and also avoid the overhead of the router, however small that may be). --- alc/alc.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'alc/alc.cpp') diff --git a/alc/alc.cpp b/alc/alc.cpp index 0c42edbc..baa4788f 100644 --- a/alc/alc.cpp +++ b/alc/alc.cpp @@ -2564,6 +2564,9 @@ ALC_API ALCboolean ALC_APIENTRY alcIsExtensionPresent(ALCdevice *device, const A } +ALCvoid* ALC_APIENTRY alcGetProcAddress2(ALCdevice *device, const ALCchar *funcName) noexcept +{ return alcGetProcAddress(device, funcName); } + ALC_API ALCvoid* ALC_APIENTRY alcGetProcAddress(ALCdevice *device, const ALCchar *funcName) noexcept { if(!funcName) -- cgit v1.2.3