Commit Graph

48 Commits

Author SHA1 Message Date
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 dadf7a4cf2.
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
Chris Robinson
ef7eced7a7 Properly clean up allocated memory at exit 2017-06-28 22:39:11 -07:00
Chris Robinson
a729007887 Implement setting a context current in the router 2017-06-28 21:54:44 -07:00
Chris Robinson
323162c49f Implement creating and destroying contexts 2017-06-28 21:15:30 -07:00
Chris Robinson
ea4379c5b7 Implement opening and closing devices in the router 2017-06-28 21:10:02 -07:00
Chris Robinson
6124f447cd Implement enumeration in the router 2017-06-28 20:45:23 -07:00
Chris Robinson
47f1db36a7 Partially implement ALC functions in the router 2017-06-28 20:03:36 -07:00
Chris Robinson
b88b57868a Add a ptr-to-int map 2017-06-28 19:09:38 -07:00
Chris Robinson
9fd7349220 Add forwarding for the AL functions 2017-06-28 17:02:43 -07:00
Chris Robinson
cfec20830b Load driver dlls in the router 2017-06-28 16:41:38 -07:00
Chris Robinson
ebee8da05c Start a router DLL
Experimental, Windows only. This is intended as an alternative to Creative's
router DLL, fixing a few issues with it (falsely reporting extensions that
aren't supported, not being able to query the ALC version without a device, and
not being able to use ALC extension functions).

When enabled OpenAL Soft's DLL is built as soft_oal.dll, while the router is
OpenAL32.dll.
2017-06-28 12:42:20 -07:00