Chris Robinson
f9e6fbaeff
Use amplitude-matching HF scaling for non-FOA HRTF output
2022-08-15 12:54:34 -07:00
Chris Robinson
a8491ae513
Update in incorrect comment
2022-08-15 09:09:52 -07:00
Chris Robinson
4f346caea3
Update some arrays in preparation for fourth order support
2022-08-14 00:56:38 -07:00
Chris Robinson
7e5dd41968
Add an option for higher quality UHJ filters
2022-08-08 03:44:25 -07:00
Chris Robinson
250f162496
Parameterize the UHJ filter length
2022-08-07 13:09:12 -07:00
Chris Robinson
a1faa5d311
Change an inline function to a class method
2022-08-02 18:26:49 -07:00
Chris Robinson
a700edc171
Check the channel count for a valid DecoderView
...
Ambisonic decoders can be zeroth order, but they need at least one output
channel.
2022-08-02 18:26:49 -07:00
Chris Robinson
af5d4fb77d
Don't store and manage wet buffers separately
2022-07-15 06:58:15 -07:00
Chris Robinson
edadd221ea
Add a speaker-dist config option
...
This can be used to specify an average speaker distance without having the
modify the decoder config files. This also sets a default value of 1, letting
near-field effects work (if imprecisely) without an explicitly-configured
distance.
2022-07-07 14:58:09 -07:00
Chris Robinson
593966c8db
Handle 3D7.1 as a separate channel configuration
...
It's treated as 5.1 + 2 aux channels. This allows AL_DIRECT_CHANNELS_SOFT to
behave better, not forwarding rear left/right channel inputs to lower front and
upper rear, and allows reporting a more appropriate output mode to the app
instead of 7.1.
2022-04-26 23:32:15 -07:00
Chris Robinson
6bc1787a3b
Make and use a Default enum for StereoEncoding
2022-03-29 11:48:57 -07:00
Chris Robinson
f8ac1ffe80
Get rid of MathDefs
2022-01-27 02:59:07 -08:00
Chris Robinson
43ec687ee9
Add a third-order ambisonic decoder for HRTF
...
Using the 20-channel dodecahedron, seems to be good enough to handle 16-channel
third-order ambisonics.
2022-01-05 20:32:03 -08:00
Chris Robinson
c77fd6540c
Update the HRTF second-order ambisonic decoder
...
This only needs 14 virtual channels instead of 20.
2022-01-04 19:27:29 -08:00
Chris Robinson
5e3fcb3a93
Avoid initializing the NFC filter for every voice channel
...
It can be initialized once with the device's speaker distance since it won't
change in between resets, then copied into the voice where it can be adjusted
as needed.
2021-12-11 21:42:34 -08:00
Chris Robinson
a8ea3cad22
Adjust the crossover frequency for HRTF ambisonic decoding
2021-12-08 18:17:16 -08:00
Chris Robinson
49a36334bd
Use a tri-state optional for the stereo output mode
2021-10-24 11:51:39 -07:00
Chris Robinson
096bed35fa
Pass a parameter to aluInitRenderer to specify UHJ output
2021-10-23 11:37:46 -07:00
Chris Robinson
d0e5e138e2
Use a flag to indicate headphone-like output
2021-10-23 07:51:06 -07:00
Chris Robinson
0e93fc53f4
Don't reset the ambisonic layout and scale with stereo output
2021-10-23 05:48:47 -07:00
Chris Robinson
d5dc2828bf
Don't pass the whole decoder to InitDistanceComp
2021-10-23 03:57:49 -07:00
Chris Robinson
aa92c6c0a8
Fix the ambisonic scaling used by custom decoders
2021-10-23 03:24:51 -07:00
Chris Robinson
f963a2c543
Remove some lingering mentions of surround51rear
2021-10-21 07:38:57 -07:00
Chris Robinson
0a0849db99
Use an optional bool instead of two tri-state enums
2021-07-31 14:24:49 -07:00
Chris Robinson
29fba79cd5
Avoid 5.1Rear as its own channel configuration
...
It messes with 5.1 sources using direct channels, and the surround channels are
supposed to map to the side labels. Individual backends can deal with the
channel order/label differences, as they already do to a degree.
2021-07-30 07:38:26 -07:00
Chris Robinson
486eca8ce6
Remove an unused variable
2021-07-30 06:26:53 -07:00
Chris Robinson
d998c03a27
Add a UHJ-specific coefficient scaling array
2021-07-13 06:31:13 -07:00
Chris Robinson
d38c8419c7
Update the 5.1+center decoder and use it by default
...
The itu5.1-nocenter preset is the same as the previous default, so it can still
be used for people that prefer it. But this new one purportedly has better
panning and positioning responses in listening tests, which initial impressions
concur with.
2021-06-30 15:53:15 -07:00
Chris Robinson
c09c94de25
Allow decoders to specify the coefficient scaling
2021-06-25 08:10:41 -07:00
Chris Robinson
247a149115
MSVC doesn't like the decltype
2021-06-23 13:30:17 -07:00
Chris Robinson
9a7bca1116
Add wrapper methods for getting device config values
2021-06-23 10:45:24 -07:00
Chris Robinson
5b2489c3e8
Convert AmbDecConf to DecoderConfig for loading
...
This keeps AmbDecConf uses confined to multi-channel panning initialization,
and avoids spreading conversions and maps all over.
2021-06-23 09:44:58 -07:00
Chris Robinson
2b7c446363
Support built-in 3D ambisonic decoders
2021-06-23 03:22:54 -07:00
Chris Robinson
8d868ff33f
Fix setting the channel distance compensation buffers
2021-05-20 23:48:43 -07:00
Chris Robinson
e3c0b60cc6
Rename alcontext.h and move some functions to context.cpp
2021-04-27 19:04:45 -07:00
Chris Robinson
06dcfc3fcf
Rename alcmain.h to device.h
2021-04-27 16:40:22 -07:00
Chris Robinson
2479483645
Move bformatdec to core
2021-04-25 18:08:08 -07:00
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