Chris Robinson
0e7d5736c0
Add EFX functions back to the router
...
They're necessary for proper exports whem building the router. And if there's
ever a spec update that standardizes them, they'll be needed anyway.
2022-06-18 08:20:34 -07:00
Chris Robinson
410f08c4e4
Forward the DriverIface constructor's name
2022-02-26 12:06:12 -08:00
Chris Robinson
c2d2ef2c0e
Don't handle EFX functions in the router
...
Creative's wrapper driver doesn't handle them through alcGetProcAddress, at
least with a null device. For this to work properly, they'd have to be loaded
per-context instead of per-driver.
2022-02-26 10:41:06 -08:00
Chris Robinson
633c332dee
Work around a MinGW thread_local bug
...
MinGW-w64 generates bad code when accessing extern thread_local objects.
Wrapper functions are used to ensure it only accesses them from the same place
they're defined. This unfortunately adds a bit of overhead for what should be a
relatively simple thing.
These functions are inlined for non-MinGW targets, avoiding the overhead on
non-affected targets.
2021-12-20 10:27:39 -08:00
Chris Robinson
27e8807a5b
Export EFX functions from the router
2021-01-27 21:24:03 -08:00
Chris Robinson
7e3fed42ed
Use a recursive_mutex for the router enumeration lock
2020-09-05 12:41:28 -07:00
Chris Robinson
cf64dc1103
Fix up some more uses of [AL[C]]void
2020-04-28 14:48:12 -07:00
Chris Robinson
accac7950c
Silence some warnings from GCC in the router
2019-10-01 22:22:46 -07:00
Chris Robinson
28d54efe72
Use al::getenv to get the router env vars
2019-10-01 22:15:40 -07:00
Chris Robinson
8907a4fb04
Cleanup some router warnings
2019-09-20 15:45:59 -07:00
Chris Robinson
2c5c5a5397
Add and use custom string types and functions
2019-09-16 13:45:14 -07:00
Chris Robinson
b4d56d3fdf
Remove the UNUSED macro
2019-07-28 17:15:34 -07:00
Chris Robinson
b37bc9f8b7
Fix an MSVC warning
2018-12-12 19:24:06 -08:00
Chris Robinson
9ac76c0a7f
Simplify some binary search lookups
2018-11-26 20:55:00 -08:00
Chris Robinson
da150572f9
Clean up the DriverIface in its destructor
2018-10-30 17:03:21 -07:00
Chris Robinson
615c025b67
Add a missing include for array
2018-10-30 16:35:14 -07:00
Chris Robinson
08aa9d898b
Remove an unnecessary include
2018-10-30 16:32:25 -07:00
Chris Robinson
f747ac8882
Clean up the router's PtrIntMap
2018-10-30 14:28:19 -07:00
Chris Robinson
44f91760b5
Use std::array instead of raw arrays
2018-10-30 10:01:49 -07:00
Chris Robinson
e2a1dd4503
Use std::wstring in place of some fixed WCHAR arrays
2018-10-30 09:31:52 -07:00
Chris Robinson
c17e59f63a
Use std::vector instead of custom dynamic arrays
2018-10-30 08:33:40 -07:00
Chris Robinson
e75e0a342e
Use C++ atomics and mutexes in the router
2018-10-30 07:30:46 -07:00
Chris Robinson
a0d03e50e8
Convert the router to C++
2018-10-30 07:06:03 -07:00
Chris Robinson
f17b930638
Add extern "C" for router.h
2018-10-30 06:45:44 -07:00
Filip Gawin
08226bc6b0
Simplify some statements
2018-10-29 13:38:58 +01:00
Chris Robinson
8f3d496541
Avoid duplicate path searches in the router
...
And avoid inadvertently increasing the priority of the system path over the
executable's path, or either of them over the current working directory.
2018-03-21 20:39:04 -07:00
Chris Robinson
dac9379449
Add methods to clean up althrd and altss data
2018-03-10 12:10:58 -08:00
Chris Robinson
b3f7df6f5b
Use a typedef to declare extern atomic variables
...
Some systems use anonymous structs for atomic storage, and extern declarations
need to have the same type as their non-extern definition.
2017-10-07 14:58:35 -07:00
Chris Robinson
67ab9ec466
Don't trace for every GetDriverIndexForName call
2017-07-11 22:43:22 -07:00
Chris Robinson
0da55fd912
Trace a version for the router
2017-07-11 00:43:15 -07:00
Chris Robinson
e4e240fa9b
Support ALC_EXT_thread_local_context in the router
...
Note that a given context's device must also support the extension to work. The
router's support simply lets a driver's capabilities through.
2017-07-07 18:41:03 -07:00
Chris Robinson
6be752a9b1
Add methods for thread-local contexts to the router
2017-07-07 18:33:54 -07:00
Chris Robinson
faefa1d554
Revert "Try all drivers for an unknown device name"
...
This reverts commit dadf7a4cf2bb008fc9e20251f6e8895c0f5bf0d4.
2017-07-05 14:18:16 -07:00
Chris Robinson
dadf7a4cf2
Try all drivers for an unknown device name
2017-07-05 12:23:08 -07:00
Chris Robinson
3af2ff7b25
Trace if a driver was found for a device name
2017-07-05 12:16:28 -07:00
Chris Robinson
72ce0d1e9c
Open a device only when a driver index is found
2017-07-03 22:14:15 -07:00
Chris Robinson
a14f651034
Flush the log file after writing
2017-07-01 15:34:42 -07:00
Chris Robinson
958fa34272
Use a weaker memory order for the current context iface
2017-07-01 15:25:39 -07:00
Chris Robinson
af626fdded
Initialize ALC resources in the file they're used in
2017-07-01 15:25:11 -07:00
Chris Robinson
7daefd4e77
Use the al alloc functions instead of standard
2017-07-01 12:22:25 -07:00
Chris Robinson
32bda7b94c
Add tracing capabilities to the router
2017-06-30 17:22:15 -07:00
Chris Robinson
77e317609b
Add special handling for alGerError in the router
2017-06-30 17:21:26 -07:00
Chris Robinson
ce9222b686
Clear initial ALC version vars before querying it
2017-06-29 23:21:07 -07:00
Chris Robinson
d874b6bb27
Don't assume the first driver has the default device
2017-06-29 15:59:16 -07:00
Chris Robinson
00694826ef
Protect context switches with a lock in the router
2017-06-29 10:56:32 -07:00
Chris Robinson
058d57ef03
Protect device enumeration in the router with a mutex
2017-06-29 10:39:27 -07:00
Chris Robinson
cee2d226d2
Return the extension list in the router
2017-06-29 08:55:44 -07:00
Chris Robinson
f08a7b341f
Prepare the new driver in a local variable
2017-06-29 08:46:06 -07:00
Chris Robinson
15e6821147
Avoid unnecessary reenumeration in the router
2017-06-29 08:35:21 -07:00
Chris Robinson
3a16fed279
Handle the ALC version for some extension capabilities
...
Also fix some improper parenthesis.
2017-06-28 23:18:39 -07:00