Chris Robinson
a235259b5e
Further clarify a comment about float precision
2018-05-21 06:16:03 -07:00
Raulshc
d3a81f4f28
EFX: Frequency Shifter implementation
...
Add frequency shifter effect using discrete Hilbert transform. Only mono signal processing by now (LEFT_DIRECTION).
2018-05-20 17:23:03 +02:00
Chris Robinson
7501c8b483
Simplify counting for the bsinc FIR loop
2018-05-19 08:18:08 -07:00
Chris Robinson
5e7513d0a0
Accumulate ambisonic upsampler gains using double-precision
2018-05-18 18:59:27 -07:00
Chris Robinson
0cd375f03c
Add a function to calculate coefficients from X, Y, Z components
2018-05-17 03:52:40 -07:00
Chris Robinson
588a6bcb4f
Simplify counting for SIMD MixRow functions
2018-05-15 23:14:23 -07:00
Chris Robinson
72e39ba1c9
Fix a function comment
2018-05-15 22:11:10 -07:00
Chris Robinson
6534aa0c27
Undefine the correct macros
2018-05-15 21:46:22 -07:00
Chris Robinson
2b9064cb6e
Move the ALcomplex and FFT functions to a separate file
2018-05-15 18:31:41 -07:00
Chris Robinson
197e88cdcc
Avoid using unsigned values for signed
2018-05-15 01:20:39 -07:00
Chris Robinson
4ee04cd444
Use a step counter for gain stepping
...
This should provide more stable stepping, preventing floating-point errors from
accumulating on each step/sample.
2018-05-14 23:41:29 -07:00
Chris Robinson
43dccc8807
Add a faster double-to-int converter for x87 builds
2018-05-14 18:00:43 -07:00
Chris Robinson
df9faba689
Use more accurate elevations for virtual HRTF speaker positions
2018-05-14 05:28:06 -07:00
Chris Robinson
dd055fc858
Use fastf2i instead of manually rounding with float2int
2018-05-12 21:36:23 -07:00
Chris Robinson
e787a241c0
Add and use a method for fast float rounding
...
Unlike fastf2i, this keeps the result as a float instead of converting to
integer.
2018-05-12 00:52:09 -07:00
Chris Robinson
3867cad94d
Simplify calculating the HRTF B-Format IR length
2018-05-04 06:48:20 -07:00
Chris Robinson
be30e6bf8f
Don't assume the FPU is round-to-zero in the pitch shifter
2018-05-04 04:53:50 -07:00
Chris Robinson
75e2cb97f7
Don't assume round-to-zero for fastf2i
2018-05-04 02:09:32 -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
d8a659c6f2
Avoid fastf2i in the converter init
2018-05-03 17:27:30 -07:00
Chris Robinson
af90d89b6b
Use a fixed-point scale for the pitch shifter frequency index
2018-05-03 17:06:55 -07:00
Chris Robinson
a19296e3cf
Avoid excessive if block depths
2018-05-02 21:06:57 -07:00
Chris Robinson
85c03925fb
Avoid duplication for getting the cpuid
2018-05-02 20:59:53 -07:00
Chris Robinson
22413b82ca
Pass in the number of channels per order to InitNearFieldCtrl
2018-05-01 20:21:24 -07:00
Chris Robinson
e8aaa9cb13
An output device buffer is likely
2018-04-29 18:03:33 -07:00
Chris Robinson
2385ab700c
Avoid potentially calling log10f(0)
2018-04-29 14:02:33 -07:00
Chris Robinson
242ed45f65
Rename some struct members for clarity
2018-04-28 22:10:22 -07:00
Chris Robinson
e420752e82
Fix a comment about a float's mantissa
2018-04-28 18:52:40 -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
492c75cb7b
Rename some variables for clarity
2018-04-27 00:41:02 -07:00
Chris Robinson
1e0728af64
Transpose the band-splitter all-pass section
2018-04-26 23:26:11 -07:00
Chris Robinson
1cc6983b96
Use doubles for the pitch shifter's FFTs and processing
2018-04-24 21:40:41 -07:00
Chris Robinson
510efae066
Don't specialize biquad processing for a single sample
2018-04-24 00:17:07 -07:00
Chris Robinson
b3ba90f5fa
Use transposed direct form 2 for the UHJ all-pass filters
...
This has one extra multiply, but avoids two moves and uses almost half as much
memory for the encoder state.
2018-04-22 03:34:29 -07:00
Chris Robinson
e10595df31
Pre-calculate the squares of the UHJ filter coefficients
2018-04-22 02:39:14 -07:00
Chris Robinson
b51d30f84d
Change some if checks to asserts since they must be true
2018-04-22 02:38:09 -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
400ab8766c
Adjust the stereo panning front gain
...
This gives it a (more) precise -4.5dB gain drop for front-center panned sounds.
2018-04-19 21:55:20 -07:00
Chris Robinson
90b8d639f1
Remove unnecessary undefs
2018-04-19 18:24:27 -07:00
Chris Robinson
525b6fe168
Clear ALSA's PCM handle after closing it
2018-04-19 12:22:39 -07:00
Chris Robinson
f96a8fe369
Add some ASSUME statements that ensure mixing at least 1 sample
2018-04-18 20:39:52 -07:00
Chris Robinson
150586d7fe
Add an ASSUME macro that requires a true condition
2018-04-17 22:50:50 -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
9c5307a48a
Rename BiquadState to BiquadFilter
2018-04-04 18:07:46 -07:00
Chris Robinson
869637af2e
Apply biquad and T60 filters using transposed direct form II
2018-04-03 10:15:35 -07:00
Chris Robinson
414b56edec
Initialize COM using the multithreaded apartment
...
I honestly have no idea which is the correct (or better) mode to use given the
confusing mess COM is, but CoInitialize uses single-threaded apartments which
seems to be a problem for with at least a couple games in the STALKER series
(the call fails, which causes us to drop back to the DSound backend).
2018-04-01 16:39:20 -07:00
Chris Robinson
334bc4f551
Limit the near-field control distance to 10m.
2018-03-31 23:11:48 -07:00