261 Commits

Author SHA1 Message Date
Chris Robinson
06dcfc3fcf Rename alcmain.h to device.h 2021-04-27 16:40:22 -07:00
Chris Robinson
ff380298e4 Move BufferStorage and Voice to core 2021-04-27 08:26:42 -07:00
Chris Robinson
99157f149f Move ContextBase and VoiceChange to core 2021-04-27 08:04:09 -07:00
Chris Robinson
26c8c50c26 Partially implement an extension to hold sources on disconnect
Rather than stopping voices/sources when the device becomes disconnected, the
context can be set to leave them alone. As a consequence, their state will
remain as playing and they'll keep their last known sample offset indefinately.
For applications mindful of this behavior, it will allow resetting or reopening
the device to reconnect and automatically resume where it left off.
2021-04-26 20:25:24 -07:00
Chris Robinson
2479483645 Move bformatdec to core 2021-04-25 18:08:08 -07:00
Chris Robinson
8d09d03ed3 Move async_event.h to core 2021-04-25 14:29:21 -07:00
Chris Robinson
9b65ca4556 More include cleanup 2021-04-24 15:52:53 -07:00
Chris Robinson
fc7d55be4b Don't bother with al string types 2021-04-24 11:50:49 -07:00
Chris Robinson
6d5dfbd09b Move the DeviceBase declaraction to core 2021-04-24 10:46:32 -07:00
Chris Robinson
b54bb388a3 Create a base the ALCdevice and ALCcontext structs
A base that contains the API-agnostic data, with ALCdevice and ALCcontext being
for AL-specific data.
2021-04-24 08:28:13 -07:00
Chris Robinson
65b85f7cb9 Move hrtf.cpp/h to core 2021-04-22 10:26:20 -07:00
Chris Robinson
d6d6fd7378 Avoid using config methods in hrtf.cpp 2021-04-22 10:13:49 -07:00
Chris Robinson
d2f587ee23 Move helpers.cpp to core 2021-04-22 03:15:26 -07:00
Chris Robinson
f0154c4366 Move declarations to a more appropriate header 2021-04-22 03:00:05 -07:00
Chris Robinson
8f8e9aa913 Print an error when starting the backend fails 2021-04-20 22:03:56 -07:00
Chris Robinson
37730927ef Lower RLIMIT_RTTIME to allow RTKit to give RT priority 2021-04-20 07:35:42 -07:00
Chris Robinson
29cf7ebb75 Make an inverted atomic flag type and use it
The inverted atomic flag replaces test_and_set+clear with test_and_clear+set,
essentially inverting the flag status. This makes more logical sense for
flagging dirty state, which is less confusing than flagging clean state. The
one caveat is ATOMIC_FLAG_INIT (or default construction in C++20) initializes
the state to true rather than false.
2021-04-15 15:17:04 -07:00
Chris Robinson
f8299c60ec Log the reset exception error 2021-04-07 16:17:03 -07:00
Chris Robinson
a2c45f8928 Advertise the in-progress AL_SOFT_UHJ extension 2021-04-01 08:20:47 -07:00
Chris Robinson
c6dbc487b3 Rename Uhj2Encoder to UhjEncoder 2021-04-01 05:37:54 -07:00
Chris Robinson
051d6fb243 Combine some duplicate code 2021-03-30 07:04:06 -07:00
Chris Robinson
8ab5e5dba2 Move the UHJ phase shifter to a common header 2021-03-28 06:09:11 -07:00
Chris Robinson
063da94bd8 Load/convert samples from all channels at once for mixing
This uses a bit more memory (each voice needs to hold buffers for the
deinterleaved samples of each channel, instead of just one buffer for the
current channel being mixed on the device), but it will allow for handling
formats that need or prefer their channels decoded together.
2021-03-19 23:15:27 -07:00
Chris Robinson
ca0a6024a3 Avoid shadowing variable names 2021-03-11 04:59:58 -08:00
Chris Robinson
e43bbbd3b8 Declare the attribute counts closer to where they are 2021-03-10 02:46:01 -08:00
Chris Robinson
d750983a58 Prevent querying the capture device name from a playback device
And vice-versa.
2021-03-09 07:09:27 -08:00
Chris Robinson
5e481e7654 Don't verify and hold a device reference in alcRenderSamplesSOFT
NULL devices are still checked, but invalid non-NULL device handles will invoke
undefined behavior, as will attempting to close the device while the function
is being executed (modifying the device state while the function is being
called was inadvertently already UB, and will now remain so).

This change is solely so alcRenderSamplesSOFT can be used in a buffer callback,
and other places that need functions to be real-time safe. The verification
requires locking to access the device list, which isn't allowed in a real-time
callback.
2021-03-09 06:01:27 -08:00
Chris Robinson
e824c808a0 Add a function/extension to reopen a playback device 2021-03-09 05:52:40 -08:00
Chris Robinson
27e8807a5b Export EFX functions from the router 2021-01-27 21:24:03 -08:00
Chris Robinson
8c2592b4d9 Ignore SI-style configuration strings for device names 2021-01-27 19:44:33 -08:00
Chris Robinson
13c1d7efb7 Store buffer info in the queue entry 2021-01-24 02:07:39 -08:00
Chris Robinson
da59ad5105 Make PopCount and CountTrailingZeros more standard-like 2021-01-22 04:58:42 -08:00
Chris Robinson
5ff5fd8ecc Use a standard bitset for bitfield flags 2021-01-22 00:00:10 -08:00
Chris Robinson
20f5e7c1fa Avoid global constexpr arrays 2021-01-21 04:03:30 -08:00
Chris Robinson
20ef8bf390 Move cpu_caps and fpu_ctrl to core 2020-12-31 16:47:12 -08:00
Chris Robinson
96942d7968 Combine multiple functions into one 2020-12-28 08:37:49 -08:00
Chris Robinson
04358890d9 Use a unique_ptr to hold DistanceComp data 2020-12-27 11:30:45 -08:00
Chris Robinson
e20143fcc4 Move the WetBuffer reference to EffectSlot 2020-12-27 00:14:58 -08:00
Chris Robinson
507cbfa027 Combine EffectState::deviceUpdate with setBuffer 2020-12-26 12:33:00 -08:00
Chris Robinson
8a86ec8ac5 Add a crossover frequency field for the device
Used when upsampling low-order ambisonic signals to higher order. Rather than a
hardcoded 400hz, it ensures a consistent crossover point when an ambdec
configuration is used. It can also allow for an alsoft config option.
2020-12-26 05:23:08 -08:00
Chris Robinson
5f233a2c24 Use more constexpr variables instead of macros 2020-12-25 20:52:18 -08:00
Chris Robinson
eedc42890f Move alexcpt to core 2020-12-24 22:49:55 -08:00
Chris Robinson
63ea62bea1 Avoid some more AL types 2020-12-24 22:49:55 -08:00
Chris Robinson
6ae0115bf7 Avoid AL/ALC types in the backends 2020-12-17 23:21:45 -08:00
Chris Robinson
5edd5a11fc Don't use ALC error enums for the backend error code 2020-12-17 21:07:53 -08:00
Chris Robinson
4d1ac95ae2 Don't return an enum from captureSamples
It's always no_error
2020-12-17 03:06:52 -08:00
Chris Robinson
d578bc6cb1 Move logging to core 2020-12-17 02:47:03 -08:00
Chris Robinson
efc9c146c3 Move AsyncEvent to a separate header 2020-12-16 13:58:51 -08:00
Chris Robinson
5ad28f8cba Move VoiceChange to a separate header 2020-12-16 00:50:50 -08:00
Chris Robinson
daf9d46478 Use a separate structure for the context/listener params 2020-12-15 18:41:50 -08:00