7100 Commits

Author SHA1 Message Date
Chris Robinson
978f32acf7 Round the scaled HRTF delays 2020-05-21 17:59:15 -07:00
Chris Robinson
109875942c Slightly increase the HRTF direct delay
To help improve the phase-corrected HF scaler.
2020-05-21 15:25:03 -07:00
Chris Robinson
94105409f8 Print why a sofa file couldn't be opened 2020-05-21 13:51:48 -07:00
Chris Robinson
da3dfa2fb0 Simplify handling the stablizer side channel delay 2020-05-21 13:48:50 -07:00
Chris Robinson
e98017b475 Avoid a log10 constant call 2020-05-21 09:46:39 -07:00
Chris Robinson
5bbbe8341e Use an enum class for SpatializeMode 2020-05-21 09:10:32 -07:00
Chris Robinson
e880c04f32 Clarify a comment about the band-splitter 2020-05-20 11:22:53 -07:00
Chris Robinson
200c164d78 Improve HRTF delay handling
Ensures source-level HRTF, the dry mix, and direct output all align properly,
and simplifies adding the delay in the direct mix output.
2020-05-20 11:13:06 -07:00
Chris Robinson
f38b813ba8 Fix some comments 2020-05-19 18:22:38 -07:00
Chris Robinson
19baf646d2 Rename applyHfScale to processHfScale 2020-05-19 13:58:55 -07:00
Chris Robinson
c5e90ed6c7 Use an enum for FamCount 2020-05-19 12:15:57 -07:00
Chris Robinson
825206bfa2 Apply the ambisonic HF scaling in real-time with HRTF
Rather than applying the HF scale to the IRs necessitating them to be truncated
along with increasing the IR size, it can be applied to the input signal for
the same results. Consequently, the IR size can be notably shortened while
avoiding the extra truncation. In its place, the delayed reversed all-pass
technique can still be used on the input for maintaining phase when applying
the bandsplit/hfscalar filter to the input signal.
2020-05-19 10:27:52 -07:00
Chris Robinson
a512eae7bb Move BUFFERSIZE and FloatBufferLine to a separate header 2020-05-19 10:21:19 -07:00
Chris Robinson
463591663c Check that aligned_alloc is available with cmake
Some compilers support C++17 even on targets that lack required functions.
Projects that want to force C++17 will then run into a problem with
std::aligned_alloc not existing on those targets, so it needs to be explicitly
checked for. The alternative is to simply never use it even when it would be
available.
2020-05-19 08:13:13 -07:00
Chris Robinson
400a108ead Also search for asimd for Neon 2020-05-17 16:23:24 -07:00
Chris Robinson
c75c96ce2d Assume Neon support if cpu_caps.cpp is compiled with it 2020-05-17 14:14:29 -07:00
Chris Robinson
36aebbb6ae Include the existing direct signal in the UHJ delay
So any direct_channels sources and normal panned sources remain aligned, and
the reported latency is accurate.
2020-05-16 11:35:55 -07:00
Chris Robinson
0f81fafc62 Fix some standard calls 2020-05-16 01:21:09 -07:00
Chris Robinson
d086e78a38 Fix the all-pass's shuffle order 2020-05-14 21:16:21 -07:00
Chris Robinson
91b8387c0a Give names to parameter value constants 2020-05-13 00:57:03 -07:00
Chris Robinson
f5bf7dc76e Do two samples at once with the SSE UHJ all-pass 2020-05-12 05:51:48 -07:00
Chris Robinson
ad95cb6312 Clear the whole buffer 2020-05-12 04:46:15 -07:00
Chris Robinson
2f8f829772 Properly count the last number of samples to mix 2020-05-12 04:45:25 -07:00
Chris Robinson
3ce8a9914c Fix applying the UHJ phase-shift filter 2020-05-11 23:49:39 -07:00
Chris Robinson
2574b98f8a Move the bsinc tables out of common 2020-05-11 02:24:08 -07:00
Chris Robinson
0406e3bef7 Change a couple functions into member functions 2020-05-10 20:16:43 -07:00
Chris Robinson
2fb4ac1621 Revert "Fix the FFT half point for the shifter effects"
This reverts commit 12bb5a47cda0ef6ec1ced73ccf5d267a71f9e710.
2020-05-09 16:44:29 -07:00
Chris Robinson
52a5dc23a3 Fix the UHJ filter generator
The half point needs to be included in the frequency response.
2020-05-09 16:42:43 -07:00
Chris Robinson
73569dfeca Avoid a reference on a constexpr variable 2020-05-08 20:11:30 -07:00
Chris Robinson
1c320c3532 Use a FIR filter for the UHJ all-pass 2020-05-08 15:38:14 -07:00
Chris Robinson
12bb5a47cd Fix the FFT half point for the shifter effects 2020-05-08 01:39:48 -07:00
Chris Robinson
48fbad9836 Slightly improve the Hann windows
There's no need to include the 0 terms on the ends since they'll never
contribute a sample. So extend the width to have the 0 terms just outside the
window where it wouldn't contribute anyway.
2020-05-08 01:25:32 -07:00
Chris Robinson
301f8f5db5 Use std::arrays for the UHJ filters 2020-05-08 01:24:14 -07:00
Chris Robinson
0cfb8fee44 Combine multiple UHJ encoder all-pass loops 2020-05-07 21:01:37 -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
4630a535b2 Re-add an option for installing the main lib 2020-05-07 00:02:23 -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
f82fca2c6a Fix the dual-band decoder 2020-05-05 16:56:25 -07:00
Chris Robinson
ee82db3966 Use a flexible array for the front stablizer delay buffers 2020-05-05 01:34:14 -07:00
Chris Robinson
deac36a1eb Improve the front stablizer
Apply the all-pass+band-split only once, after generating the mid and side
signals separately.
2020-05-05 01:05:38 -07:00
Chris Robinson
fcec76663f Move some sin/cos constants out of a loop 2020-05-04 16:16:55 -07:00
Chris Robinson
58d953f6aa Clear buffers right before use 2020-05-03 19:13:20 -07:00
Chris Robinson
15fd3da870 Don't put the LFO on the stack 2020-05-03 19:04:43 -07:00
Chris Robinson
fe7a74b09a Use a helper to set an identity ambisonic pan 2020-05-03 18:47:49 -07:00
Chris Robinson
b52fde7c0e Simplify SIMD linear resampler loop count 2020-05-02 20:27:05 -07:00
Chris Robinson
b051f2e33d Use a matching type given the initializer 2020-05-02 19:24:21 -07:00
Chris Robinson
6823fa2de2 Improve the leftover and realignment mixing loops
Using a mask helps the compiler recognize that the leftover (any remaining non-
multiple-of-4) and realignment loops will only have 3 iterations at most, which
it can unroll or otherwise make more meaningful optimizations for. Previously
it would try to vectorize and partially unroll the loops, which is wasteful
when there would never be enough to vectorize.
2020-05-02 16:42:24 -07:00
Chris Robinson
3898b77dd6 Avoid iterators for the main mixer 2020-05-01 21:14:41 -07:00