88 Commits

Author SHA1 Message Date
Chris Robinson
167bdce48d Hold the ListLock while opening a device
Since it may rely on the enumerated device list that could be updated
asynchronously.
2020-03-30 13:50:50 -07:00
Chris Robinson
cc009b8aa0 Move the FrontStablizer definition to its own header 2020-03-30 01:16:15 -07:00
Chris Robinson
d70912c034 Remove the QSA backend
It's been broken for who knows how long, and could really do with a rewrite for
the new interface anyway.
2020-03-29 20:37:58 -07:00
Chris Robinson
5dfa24d5e2 Stop updating effects when one fails 2020-03-29 03:10:35 -07:00
Chris Robinson
963d9b761b Rename ALvoice and related structs to Voice 2020-03-28 18:15:05 -07:00
Chris Robinson
f1f9a14172 Avoid AL[C]boolean for internal use 2020-03-28 18:15:05 -07:00
Chris Robinson
a27096dd63 Dynamically allocate voice channel data
Rather than allocating for a full 8 channels for each voice, when the vast
majority will only need 1 or 2. The voice channel data is relatively big since
it needs to hold HRTF coefficients and history, and this will allow increasing
the maximum number of buffer channels without an obscene memory increase.
2020-03-25 21:06:24 -07:00
Chris Robinson
813d4ed566 Use make_unique instead of new'ing into a unique_ptr 2020-03-22 18:48:33 -07:00
Chris Robinson
9ce182228d Avoid some pre-C++14 workarounds 2020-03-22 08:51:06 -07:00
Chris Robinson
f56ef433d8 Move the FPUCtl methods to its own source 2020-03-20 15:01:45 -07:00
Chris Robinson
accc1ec1c8 Add a helper to wait for the device mix 2020-03-03 20:32:44 -08:00
Chris Robinson
3e1a2c0f77 Use an intrusive_ptr for the device's HrtfStore 2020-03-01 17:16:09 -08:00
Chris Robinson
b42d241da5 Use real-time priority by default 2020-02-26 09:53:06 -08:00
Chris Robinson
eb49290dab Remove unnecessary locks now that the mixer doesn't require one 2020-02-26 04:58:02 -08:00
Chris Robinson
795c4fcecc Make the source's send array static instead of dynamic 2020-02-25 06:39:03 -08:00
Chris Robinson
52d86ad51f Ignore VoiceChange objects while disconnected
And try to improve ALvoice/VoiceChange handling when attempting to recover a
lost device.
2020-02-24 11:01:45 -08:00
Chris Robinson
6044e0d7ca Remove a couple unnecessary type aliases 2020-02-22 00:08:55 -08:00
Chris Robinson
a8162a77c2 Use an array of ALvoice pointers for the active voices
This allows growing the array atomically with the mixer since the ALvoice
objects themselves don't move, and a new larger array of them can be swapped in
without blocking the mixer.
2020-02-21 20:14:28 -08:00
Chris Robinson
bdb8ef22b0 Asynchronously stop voices if its source is being deleted 2020-02-20 22:50:37 -08:00
Chris Robinson
3aad01d3ba Add AL_SOFTX_callback_buffer to the extension list 2020-02-19 17:32:32 -08:00
Chris Robinson
4277c05b0c Workaround a 32-bit GCC/MinGW TLS bug 2020-02-18 18:14:59 -08:00
Chris Robinson
3156b17057 Stub out an interface for a callback-driven buffer 2020-02-16 23:49:29 -08:00
Aleš Gajdacz
7e319ad99b
Fix unreachable code warning 2020-02-08 23:34:09 +01:00
Chris Robinson
3904289af7 Only sort active effect slots as needed 2020-01-18 18:53:58 -08:00
Chris Robinson
e6e2f509f8 Make CreateRingBuffer a static RingBuffer method 2020-01-10 07:56:43 -08:00
Chris Robinson
84f65c1883 Avoid auto-releasing containers for the global device list
If any are left open at process shutdown, it may try to clean them up, and
subsequently close the device. This is dangerous to do at process exit, so
don't. The app should have closed the device(s) prior to exiting anyway
2020-01-07 03:12:49 -08:00
Chris Robinson
6ed8061cbf Finalize AL_SOFT_bformat_ex 2020-01-05 03:45:35 -08:00
Chris Robinson
cdd24c7d01 Combine identical arrays 2020-01-04 00:59:49 -08:00
Chris Robinson
c1cf10f508 Handle downmixing for mono output 2019-12-29 20:35:47 -08:00
Chris Robinson
137394c2cf Make the new direct channel remix extension public 2019-12-28 16:40:10 -08:00
Chris Robinson
2e6a55a87c Handle padding between device sample frames
The padding must be constant and sample type aligned (e.g. some fixed multiple
of two bytes between the start of two consecutive frames for 16-bit output).
The intent is to always have the ability for stereo output with WASAPI even if
the device has some other unsupported configuration, as long as front-left and
front-right exist.
2019-12-21 20:43:46 -08:00
Chris Robinson
c2ca617ed6 Use size_t for the compressor channel count
And general cleanup of the compressor
2019-12-21 03:21:13 -08:00
Chris Robinson
22bbb14a65 Use a standard bool type 2019-12-19 05:16:56 -08:00
Chris Robinson
4634002104 Remix missing channels with direct channels enabled
Instead of dropping them.
2019-12-19 04:38:34 -08:00
Chris Robinson
200b07b288 Fully reset the voice when updating the device 2019-12-05 00:18:59 -08:00
Chris Robinson
799c60f3bb Add an interface to set a B-Format buffer's layout and scaling 2019-12-02 11:51:27 -08:00
Chris Robinson
f6105cbff0 Resample HRIRs when loading 2019-11-28 12:33:26 -08:00
Chris Robinson
925e6e979c Rework HRTF enuemration so the loaded HRTFs are separate 2019-11-28 08:24:29 -08:00
Chris Robinson
1e93fba6d0 Rename HrtfEntry to HrtfStore 2019-11-28 06:10:36 -08:00
Chris Robinson
d2608e4bde Avoid holding HRTF accumulation samples per-source
It notably simplifies things to mix HRTF sources into an accumulation buffer
together, which the Dry buffer's Ambisonic-to-HRTF decode is then added to,
before being mixed to the Real output.
2019-11-03 00:30:33 -07:00
Chris Robinson
0cba99ed1b Avoid static constexpr for arrays iterated over at run-time 2019-10-25 01:43:23 -07:00
Chris Robinson
2842df5a02 Catch exceptions from backend start calls 2019-10-09 00:11:19 -07:00
Chris Robinson
02d80cd74d Use exceptions for backend open failures 2019-10-07 21:37:56 -07:00
Chris Robinson
f8ff4e269b Put the pragma defines in a separate header 2019-10-07 15:26:35 -07:00
Chris Robinson
267b79f337 Avoid duplicate structs 2019-10-05 16:11:38 -07:00
Chris Robinson
58085f1c7b Clean up some unnecessary includes 2019-10-02 19:13:07 -07:00
Chris Robinson
a0a55d300f Remove an unnecessary function 2019-10-01 21:45:44 -07:00
Chris Robinson
fabb9add9b Silence an MSVC warning 2019-09-28 23:31:49 -07:00
Chris Robinson
66565ca7a3 Enable and fix some more warnings 2019-09-18 10:09:04 -07:00
Chris Robinson
2c5c5a5397 Add and use custom string types and functions 2019-09-16 13:45:14 -07:00