3314 Commits

Author SHA1 Message Date
Chris Robinson
d82e3be8f7 Increase the HRTF transition to 128 samples 2017-05-05 04:54:07 -07:00
alexey.lysiuk
17dfaca43d Implement cross-platform embedding of HRTF data 2017-05-05 14:30:06 +03:00
Chris Robinson
9c9ad2f60a Start an extension to change the source's spatialize property 2017-05-05 02:41:34 -07:00
Chris Robinson
b639bc9913 Add a property to force source spatialization on or off 2017-05-04 12:27:10 -07:00
Chris Robinson
7829ad8fc9 Handle attenuated sources in CalcPanningAndFilters 2017-05-04 11:09:45 -07:00
Chris Robinson
23bf3d3959 Calculate the multi-channel panning in a separate function 2017-05-04 04:35:53 -07:00
Chris Robinson
ab1cca729f Finalize AL_SOFT_source_resampler 2017-05-03 04:33:38 -07:00
Chris Robinson
444e9563b3 Add a mixing function to blend HRIRs
This is a bit more efficient than calling the normal HRTF mixing function
twice, and helps solve the problem of the values generated from convolution not
being consistent with the new HRIR.
2017-05-03 03:29:21 -07:00
Chris Robinson
4e5c4b8e01 Add a slight bit of attenuation to the reverb output 2017-05-02 15:55:58 -07:00
Chris Robinson
66f9640787 Remove a duplicate check 2017-05-02 07:34:28 -07:00
Chris Robinson
53c3d48fe0 Change some ALuint parameters to ALsizei 2017-05-02 04:54:59 -07:00
Chris Robinson
1e5334176e Rename VOICE_IS_HRTF to VOICE_HAS_HRTF 2017-05-02 04:25:08 -07:00
Chris Robinson
2f8d597f4e Rename 'moving' flag to 'fading' 2017-05-02 04:09:01 -07: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
8d50b72d8f Allow querying the output limiter state 2017-04-30 08:54:49 -07:00
Chris Robinson
fc2afa1eaa Start an extension to toggle the output limiter 2017-04-30 04:21:48 -07:00
Chris Robinson
9767f4f9c3 Don't do more reverb samples than there are to fade.
This avoids having to clamp the fade value when incrementing it.
2017-04-28 10:25:22 -07:00
Chris Robinson
dc25370063 Fade HRTF coefficients over 64 samples at most
This greatly improves HRTF performance since the dual-mix only applies to the
64-sample coefficient transition. So rather than doubling the full mix, it only
doubles 64 samples out of the full mix.
2017-04-28 10:05:57 -07:00
Chris Robinson
bf138fb4ea Combine mostly duplicate functions 2017-04-27 19:23:42 -07:00
Chris Robinson
5dc7265ad3 Properly update the delay line offsets when fading is done 2017-04-27 18:54:33 -07:00
Chris Robinson
55d9988f3f Write directly to the output for HRTF 2017-04-27 06:35:53 -07:00
Chris Robinson
ca5c732261 Implement a limiter on the device output
This reduces the output volume when the mixed samples extend outside of -1,+1,
to prevent excessive clipping. It can reduce the volume by -80dB in 50ms, and
increase it by +80dB in 1s (it will not go below -80dB or above 0dB).
2017-04-26 18:38:09 -07:00
Chris Robinson
12fb0404c1 Reverb code update
This update modifies the reverb in numerous ways. The 3-series, 4-parallel
all-pass is replaced with a Gerzon vector all-pass. The vector all-pass is also
applied to the early reflections, to help with the initial diffusion in the
late reverb. The late reverb filter and feedback attenuation has been replaced
with a dual first-order equalization filter, which controls the low and high
frequencies with individual low-pass/high-shelf and high-pass/low-shelf filters
with gain control.

Additionally, delay lines now have the ability to blend the output between two
offsets, to help smooth out the transition for when the delay changes (without
such, it could result in undesirable clicks and pops).
2017-04-26 02:07:51 -07:00
Chris Robinson
ad782c0000 Skip mixing the fade out step when starting silent
Unfortunately it can't skip mixing the fade in when going to silence because
the history needs to be up to date.
2017-04-25 22:10:27 -07:00
Chris Robinson
a0a41921fc Remove const from _Atomic vars to make Clang happy
Clang does not allow using C11's atomic_load on const _Atomic variables.
Previously it just disabled use of C11 atomics if atomic_load didn't work on a
const _Atomic variable, but I think I'd prefer to have Clang use C11 atomics
for the added features (more explicit memory ordering) even if it means a few
instances of breaking const.
2017-04-21 16:58:55 -07:00
Chris Robinson
d2d5f1d7bd Add the ability to change the source resampler 2017-04-21 15:48:39 -07:00
Chris Robinson
44f026220f Correctly enable the ambisonic upsampler for HOA output 2017-04-21 13:26:29 -07:00
Chris Robinson
b59359f80f Add a method to enumerate resamplers 2017-04-21 04:15:08 -07:00
Chris Robinson
26b49c54af Store the resampler as part of the source 2017-04-21 00:06:40 -07:00
Chris Robinson
1e8ea59564 Make the default resampler a variable 2017-04-20 23:21:46 -07:00
Chris Robinson
7776ebcedc Try NEON mixers before SSE 2017-04-20 20:58:32 -07:00
Chris Robinson
5dcbb8db38 Make the buffer list next pointer atomic 2017-04-19 19:54:17 -07:00
Chris Robinson
fbb5295f13 Fix a mixed-sign-comparison warning on MSVC 2017-04-19 15:17:55 -07:00
Chris Robinson
0407285c53 Allocate a new context's voices after updating the device params 2017-04-19 12:34:45 -07:00
Chris Robinson
f1be335486 Check for the upsampler to determine if HRTF uses HOA 2017-04-18 17:39:10 -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
de62ab97e9 Store the source queue head in the voice to signify looping
This removes the need to access a couple more source fields in the mixer, and
also makes the looping and queue fields non-atomic.
2017-04-18 00:58:33 -07:00
Chris Robinson
45d52f7124 Remove unnecessary functions in the JACK backend 2017-04-17 21:31:20 -07:00
Chris Robinson
14bc7baeb7 Store the source prop updates with the mixer voice
Also move its declaration and rename it for consistency.
2017-04-17 21:16:01 -07:00
Chris Robinson
6d3973f965 Trace unhandled device reset attributes 2017-04-16 16:21:11 -07:00
Chris Robinson
8f1a968d79 Correctly handle the attribute array size for alcGetInteger64vSOFT 2017-04-15 20:10:32 -07:00
Chris Robinson
fca83263f4 Implement capture support in the OpenSL backend 2017-04-15 18:08:52 -07:00
Chris Robinson
d9bf4f7620 Allow increasing the maximum source limit
If the requested number of mono and stereo sources exceeds 256, the source
limit will be expanded. Any config file setting overrides this. If the device
is reset to have fewer sources than are currently allocated, excess sources
will remain and be usable as normal, but no more can be generated until enough
are delated to go back below the limit.
2017-04-14 23:50:49 -07:00
Chris Robinson
f94fa5d5cf Use separate atomic macros for pointers 2017-04-14 17:47:55 -07:00
Chris Robinson
6476f3277a Mark some pointers with restrict 2017-04-13 11:48:43 -07:00
Chris Robinson
24c172bb96 Use ALsizei for the fir4 resampler fraction 2017-04-12 22:45:54 -07:00
Chris Robinson
684823ebc4 Select NEON when available before SSE 2017-04-12 22:44:16 -07:00
Chris Robinson
901804d724 Store the ambisonic order separate from the channel enum 2017-04-12 18:26:07 -07:00
Chris Robinson
46046f9caa Remove an unnecessary variable 2017-04-11 12:06:57 -07:00
Chris Robinson
05531fbee4 Use the correct channel conversion functions 2017-04-11 11:47:23 -07:00