89 Commits

Author SHA1 Message Date
Chris Robinson
0fe38c053d Move some functions to core
And clean up more includes
2021-04-25 11:36:37 -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
7387148006 Use the root mean square for the HRTF B-Format HF scale
For the second-order decoder. Since the delays are adjusted to avoid most high
frequency phase cancelation, the energy-based scaling with the number of
channels used creates a significant HF increase. Using the RMS-based scaling
seems to create a more level response, though it's not perfect either. More
testing and measurements may be needed.
2021-04-24 03:12:05 -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
c6dbc487b3 Rename Uhj2Encoder to UhjEncoder 2021-04-01 05:37:54 -07:00
Chris Robinson
9665171ea3 Clean up some formatting 2021-02-16 05:48:42 -08:00
Chris Robinson
20f5e7c1fa Avoid global constexpr arrays 2021-01-21 04:03:30 -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
8850a3f730 Combine variable terms separate from the scaling weights 2020-12-26 06:27:49 -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
f6e29ce5bb Return an optional for an error 2020-12-25 09:26:24 -08:00
Chris Robinson
78f73a4277 Avoid dynamic vectors in AmbDecConf
Also add a bit more sanity checking
2020-12-25 08:31:02 -08:00
Chris Robinson
204f7d8811 Rename From2D to FromACN2D 2020-12-25 06:40:13 -08:00
Chris Robinson
20820fd01b Move the ambdec loader to core 2020-12-25 06:30:47 -08:00
Chris Robinson
d578bc6cb1 Move logging to core 2020-12-17 02:47:03 -08:00
Chris Robinson
191fe888b4 Move ambidefs.h to core 2020-12-12 10:38:24 -08:00
Chris Robinson
1bb7f575f0 Don't modify the IR size of loaded HRTFs 2020-12-11 15:08:50 -08:00
Chris Robinson
50e33ce8f4 Change some macros into constexpr variables 2020-12-04 13:53:56 -08:00
Chris Robinson
c4132b80ed Move a couple more things to core 2020-12-04 13:13:52 -08:00
Chris Robinson
b0919240ab Move some sources to a separate directory
To begin separating the ALC interfaces from internal ones.
2020-11-27 19:18:17 -08:00
Chris Robinson
54afcbe113 Use clearer variable names 2020-11-20 22:02:20 -08:00
Chris Robinson
4e760bbecc Use a separate structure for the active effect slot properties 2020-11-07 08:36:49 -08:00
Chris Robinson
120776bec5 Use a range-for loop instead of for_each 2020-11-06 15:44:49 -08:00
Chris Robinson
03389f390c Avoid a full wipe and reallocation of wet buffers 2020-11-02 05:19:17 -08:00
Chris Robinson
52d58a4023 Store the wet buffers in the context
This is rather ugly, but we need the wet buffers to remain allocated after its
effect slot is deleted, because a voice can still use it for its final fade-out
mix.
2020-11-02 04:24:36 -08:00
Chris Robinson
3e62600ecc Replace some more macros with constexpr variables 2020-10-21 16:39:21 -07:00
Jan Niklas Hasse
bd9d5d7bf0 Silence warning about unused return values
warning C4834: discarding return value of function with 'nodiscard'
attribute
2020-10-20 18:33:53 +02:00
Chris Robinson
a6aefeccd8 Use enum class for a couple enums 2020-09-01 05:46:19 -07:00
Chris Robinson
1f486f820e Use a separate structure for buffer storage 2020-08-28 00:09:46 -07:00
Chris Robinson
b0b720c609 Avoid an unnecessary local variable 2020-06-16 14:01:39 -07:00
Chris Robinson
6db6d1510a Remove the Lower channel labels and rename the Upper labels 2020-06-15 13:49:45 -07:00
Chris Robinson
401a9bacd1 Don't bother with otherwise unused Aux channels 2020-06-15 02:27:29 -07:00
Chris Robinson
540315b07c Handle the front stablizer with the B-Format decoder 2020-06-15 02:13:14 -07:00
Chris Robinson
7ed37a8282 Use dual-band for the internal quad and 7.1 decoders 2020-05-07 03:15:46 -07:00
Chris Robinson
faec0c78eb Allow declaring internal dual-band decoders 2020-05-07 02:13:11 -07:00
Chris Robinson
ca851298ad Update the quad and 7.1 decoders 2020-05-06 22:36:29 -07:00
Chris Robinson
bef25361f1 Make the built-in decoders more flexible 2020-05-06 19:31:31 -07:00
Chris Robinson
8acf16fc82 Make BuildBFormatHrtf a member of DirectHrtfState 2020-05-01 10:28:16 -07:00
Chris Robinson
2deb5e47d1 Avoid an unnecessary out parameter 2020-04-21 23:58:53 -07:00
Chris Robinson
d67cba99bd Clean up some more unnecessary uses of AL types 2020-04-08 10:15:43 -07:00
Chris Robinson
55539787fb Avoid ALfloat in some places 2020-04-08 06:17:04 -07:00
Chris Robinson
f1f9a14172 Avoid AL[C]boolean for internal use 2020-03-28 18:15:05 -07:00
Chris Robinson
9ce182228d Avoid some pre-C++14 workarounds 2020-03-22 08:51:06 -07:00
Chris Robinson
3e1a2c0f77 Use an intrusive_ptr for the device's HrtfStore 2020-03-01 17:16:09 -08:00
Chris Robinson
43780913cd Fix the output channel count for the B-Format decoder 2020-01-19 13:40:39 -08:00
Chris Robinson
32c9dbd7ff Avoid an extraneous index map 2020-01-15 10:45:08 -08:00
Chris Robinson
6a8c6eae6f Make a couple helper methods to create BFormatDec 2020-01-15 10:33:56 -08:00