Chris Robinson
ec84a107a4
Don't hardcode the max channels for HRTF B-Format decoding
2018-05-26 00:26:11 -07:00
Chris Robinson
6534aa0c27
Undefine the correct macros
2018-05-15 21:46:22 -07:00
Chris Robinson
dd055fc858
Use fastf2i instead of manually rounding with float2int
2018-05-12 21:36:23 -07:00
Chris Robinson
3867cad94d
Simplify calculating the HRTF B-Format IR length
2018-05-04 06:48:20 -07:00
Chris Robinson
ac8dbd7a56
Add a specific function for truncating float-to-int conversions
2018-05-03 22:02:32 -07:00
Chris Robinson
54109043b8
Remove some unnecessary floor calls
2018-04-28 01:14:17 -07:00
Chris Robinson
ddd4751f87
Increase the band-split IR for decoding ambisonics to HRTF
2018-04-27 18:42:26 -07:00
Chris Robinson
9575eebac4
Move the bnad-splitter filters to a separate source
2018-04-21 23:23:46 -07:00
Chris Robinson
4ee26f4ca3
Add some more ASSUME statements
2018-04-21 02:44:01 -07:00
Chris Robinson
09194fd488
Accumulate the B-Format HRTF responses using doubles
...
The final result is still truncated to single-precision float, but this should
keep the responses more stable as it accumulates the various inputs.
2018-04-17 21:27:47 -07:00
Chris Robinson
e619b64175
Don't minimize the HRTF per-response delay
...
The reverts both fa9ab9af7cb559ff9ecc1846f2996265bfbea1ec and
79604c3c0e0f3f71832a09348cc273a38882cc3e. As helpful as it was for the high
frequencies, the overall response's gain suffered.
2018-04-16 18:54:41 -07:00
Chris Robinson
6ff50558a0
Use a proper struct for specifying angular points
2018-02-18 23:56:51 -08:00
Chris Robinson
fa9ab9af7c
Minimize each response delay for the ambisonic HRTF decode
2018-02-18 23:56:51 -08:00
Chris Robinson
ee3d53a673
Use an alternate virtual layout for Ambisonic HRTF decoding
...
This uses 16 channels, an 8-channel octagon + 8-channel cube, which should
improve horizontal resolution without affecting vertical too much.
2018-02-10 05:16:28 -08:00
Chris Robinson
44795b8614
Assign the HRTF storage pointers separately
2018-01-15 08:38:25 -08:00
Chris Robinson
2873abcbc0
Fix up some types for MSVC
2018-01-11 10:55:35 -08:00
Chris Robinson
8aa9e35f8c
Move the config function declarations to their own header
...
And rename alcConfig.c to alconfig.c for consistency.
2018-01-11 07:56:54 -08:00
Chris Robinson
8253014fe9
Fix some types to make MSVC happy
2017-12-17 15:56:30 -08:00
Chris Robinson
b82d2cf055
Store the HRTF distance in the Hrtf handle
2017-10-23 13:26:35 -07:00
Chris Robinson
0349bcc500
Update mhr format for 24-bit, multi-field, stereo measurements
...
Currently only single field HRTFs are supported, but the format now allows up
to 16.
2017-10-22 15:36:42 -07:00
Chris Robinson
2987c87645
Check the right size for the in-progress mhr update
2017-08-09 20:42:22 -07:00
Chris Robinson
649bf575e2
Declare that a couple arrays are aligned
2017-08-09 14:57:01 -07:00
Chris Robinson
ad3c4b81e2
Add experimental support for 24-bit, dual-ear HRTFs
...
Currently makehrtf only handles 24-bit output, not dual-ear, and only when
given the --experimental switch. Files produced this way will not be guaranteed
future compatibility. When the mhr format is also updated with multi-distance
measurements, the experimental switch can go away.
2017-08-08 20:30:26 -07:00
Chris Robinson
88c0d22e7c
Don't bother returning the IR length for B-Format decoding
2017-07-31 01:20:42 -07:00
Chris Robinson
75841642bf
Update makehrtf to use a larger FFT by default
...
Also fixes DC offset removal and increases the max IR size.
2017-07-25 16:17:46 -07:00
Chris Robinson
9fc01934c2
Use helpers to get data from byte streams
2017-06-16 22:58:13 -07:00
Chris Robinson
879b79740f
Round the B-Format HRTF response where the multiple is defined
2017-06-16 19:00:00 -07:00
alexey.lysiuk
17dfaca43d
Implement cross-platform embedding of HRTF data
2017-05-05 14:30:06 +03:00
Chris Robinson
f1a249b47a
Reimplement bilinear interpolation between HRIRs
...
Some data sets are just too sparse, having noticeably few measurements to
properly handle slowly panning sources. Although not perfect, bilinearly
interpolating the HRIR measurements improves the positional accuracy.
2017-05-01 15:46:25 -07:00
Chris Robinson
fbb5295f13
Fix a mixed-sign-comparison warning on MSVC
2017-04-19 15:17:55 -07:00
Chris Robinson
55011d4bfd
Use a different way to get the size of structs with flexible array members
2017-04-18 14:11:15 -07:00
Chris Robinson
f1a5b6b668
Overwrite the old search path with the new one
2017-04-08 03:00:53 -07:00
Chris Robinson
5e9f5693a4
Combine a couple loops
2017-04-07 14:56:23 -07:00
Chris Robinson
7fd88086f6
Make sure malloc succeeded for 'delays'
2017-04-07 09:49:06 -07:00
Chris Robinson
8f2e4d46ec
Store the HRTF coeffs as a stereo pair
...
This will make it easier to handle HRTF data sets that have separate left and
right ear responses. Will need an mhr version update to take advantage of that.
2017-04-07 08:46:50 -07:00
Chris Robinson
b551291840
Allocate temp storage for delays when loading HRTFs
2017-04-07 06:40:42 -07:00
Chris Robinson
338d61f907
Reference count HRTFs and unload them when unused
2017-04-06 13:00:29 -07:00
Chris Robinson
94f514ae5a
Load embedded HRTF entries as-needed
2017-04-06 01:35:09 -07:00
Chris Robinson
37f666fbab
Fix an incorrect message
2017-04-05 12:46:02 -07:00
Chris Robinson
2eaa10fc21
Load HRTF files as needed
...
Currently only applies to external files, rather than embedded datasets. Also,
HRTFs aren't unloaded after being loaded, until library shutdown.
2017-04-05 12:27:30 -07:00
Chris Robinson
f76dea0c03
Store the loaded hrtf entry container in the enumerated hrtf entry
2017-04-05 11:29:58 -07:00
Chris Robinson
e7ca61e8b5
Store the HRTF's filename separate from the entry storage
2017-04-05 07:09:16 -07:00
Chris Robinson
26144ca9df
Rename al_string_* functions to alstr_*
2017-04-04 06:58:53 -07:00
Chris Robinson
5f245d5950
Avoid some unnecessary string reallocation
2017-03-31 23:22:06 -07:00
Chris Robinson
9fb07101dc
Load HRTF coefficients as pre-normalized floats
2017-03-31 04:59:09 -07:00
Chris Robinson
2a8970368f
Combine some HRTF loading code
2017-03-31 03:45:26 -07:00
Chris Robinson
7dc3fb98ab
Use the correct types' sizes for HRTF storage
2017-03-31 02:15:24 -07:00
Chris Robinson
96aaab9366
Rework HRTF coefficient fading
...
This improves fading between HRIRs as sources pan around. In particular, it
improves the issue with individual coefficients having various rounding errors
in the stepping values, as well as issues with interpolating delay values.
It does this by doing two mixing passes for each source. First using the last
coefficients that fade to silence, and then again using the new coefficients
that fade from silence. When added together, it creates a linear fade from one
to the other. Additionally, the gain is applied separately so the individual
coefficients don't step with rounding errors. Although this does increase CPU
cost since it's doing two mixes per source, each mix is a bit cheaper now since
the stepping is simplified to a single gain value, and the overall quality is
improved.
2017-03-11 18:04:06 -08:00
Chris Robinson
98e8f941b7
Allocate as many channels for DirectHrtfState as needed
2017-03-11 06:20:04 -08:00
Chris Robinson
aa56af1ecb
Move the B-Format HRTF virtual speaker stuff to InitHrtfPanning
...
This keeps the decoder matrices and coefficient mapping together for if it
changes in the future.
2017-01-18 19:16:24 -08:00