Chris Robinson
fcf03705e6
Clear the resampler after use
2019-11-29 18:19:01 -08:00
Chris Robinson
a8d06c0731
Store HRTF delays with some fractional precision
...
Since the delays get bilinearly filtered before use, maintaining a bit of extra
precision can help accuracy even if it ultimately gets rounded to the nearest
integer before use. This should help with resampled HRTFs, which need to scale
the delays that are already rounded, and can also be leveraged by an updated
MHR format.
2019-11-29 14:01:39 -08:00
Chris Robinson
2453f4ec14
Avoid a shadow declaration warning
2019-11-29 08:41:20 -08:00
Chris Robinson
7ff165b095
Use unsigned for array indices
2019-11-29 08:33:46 -08:00
Chris Robinson
34edd3a914
Fix sorting of loaded HRTFs
2019-11-29 06:19:06 -08:00
Chris Robinson
e80256e394
Remove an unnecessary alias
2019-11-28 16:17:00 -08:00
Chris Robinson
b310e09f59
Rename the default HRTF
2019-11-28 15:48:07 -08:00
Chris Robinson
6069eef94d
Also scale the HRTF delays for different rates
2019-11-28 14:53:13 -08:00
Chris Robinson
846a997956
Add an option to limit the HRTF's IR size
2019-11-28 14:51:45 -08:00
Chris Robinson
4eb9a0b835
Don't keep a resampled default HRTF
2019-11-28 12:57:42 -08:00
Chris Robinson
f6105cbff0
Resample HRIRs when loading
2019-11-28 12:33:26 -08:00
Chris Robinson
576adf06b1
Store HRIR coefficients using HrirArray
2019-11-28 09:46:16 -08:00
Chris Robinson
925e6e979c
Rework HRTF enuemration so the loaded HRTFs are separate
2019-11-28 08:24:29 -08:00
Chris Robinson
1e93fba6d0
Rename HrtfEntry to HrtfStore
2019-11-28 06:10:36 -08:00
Chris Robinson
eb8922596a
Apply the full HRIR length for the B-Format decoder
2019-11-21 23:55:10 -08:00
Chris Robinson
2fd8c619b3
Rename a couple struct fields
2019-11-21 02:58:35 -08:00
Chris Robinson
7bc4a27900
Allocate storage for full HRTF coefficient lengths
2019-11-21 02:43:34 -08:00
Chris Robinson
6159b837cf
Add a first-order ambisonic decoder for HRTF
2019-11-18 00:32:01 -08:00
Chris Robinson
c86a28af5c
Simplify some pi statements
2019-11-16 14:33:09 -08:00
Chris Robinson
6ad252efda
Use wrappers to distinguish elevation and azimuth values
2019-11-16 14:07:31 -08:00
Chris Robinson
d120e1464f
Improve precision of the HRTF ambisonic decoder matrix
2019-11-13 08:39:27 -08:00
Chris Robinson
0ad512dd51
Clear the whole response HRIR before blending
2019-11-10 21:56:19 -08:00
Chris Robinson
74cbba511d
Limit HRTF ambisonic decoding to second-order
...
The generated third-order matrix has incorrect first-order coefficients,
indicating a wonky decoder. The generated second-order matrix looks more
stable.
2019-11-09 13:04:44 -08:00
Raulshc
c5f88ab59f
EFX: Add explicit cast to a square function
...
MSVC 2015 and above returns the expression according to its datatype.
In this case, returns 4294967295 instead of -1.
2019-11-09 12:12:53 +01:00
Chris Robinson
d2608e4bde
Avoid holding HRTF accumulation samples per-source
...
It notably simplifies things to mix HRTF sources into an accumulation buffer
together, which the Dry buffer's Ambisonic-to-HRTF decode is then added to,
before being mixed to the Real output.
2019-11-03 00:30:33 -07:00
Chris Robinson
2741a94e58
Use rotate to reorder the default list entry
2019-10-28 23:47:30 -07:00
Chris Robinson
d37a294d4c
Add a config option for custom ALSA capture devices
2019-10-27 19:20:26 -07:00
Chris Robinson
101afb1ee4
Convert HRTF field distances to meters when creating storage
2019-10-27 15:50:59 -07:00
Chris Robinson
cac4072781
Change a few more really small gain values to 0
2019-10-26 19:57:17 -07:00
Chris Robinson
0cba99ed1b
Avoid static constexpr for arrays iterated over at run-time
2019-10-25 01:43:23 -07:00
Chris Robinson
5ac1f19241
Don't dereference the end iterator
2019-10-24 21:58:35 -07:00
Chris Robinson
48347f62b5
Don't trace twice for a new HRTF data file
2019-10-24 15:28:28 -07:00
Chris Robinson
f0977e5cc9
Print the found file entries after sorting
2019-10-24 15:10:37 -07:00
Chris Robinson
7bed2fe7cc
Report the real ambisonic order set for HRTF rendering
2019-10-24 14:33:43 -07:00
Chris Robinson
f40e69f9e3
Use a 26-point Lebedev grid for the HRTF ambisonic decode
2019-10-23 23:36:02 -07:00
Chris Robinson
4733fc6f1e
Fix azimuth limit
2019-10-22 15:23:17 -07:00
Chris Robinson
fcde56e1fc
Increase the max elevation and azimuth count for HRTFs
2019-10-21 11:30:39 -07:00
Chris Robinson
f58167e72d
More sanely handle the voice state when mixing
2019-10-14 20:45:23 -07:00
Chris Robinson
33fd1f9efd
Use better types for some specific sizes
2019-10-13 09:37:07 -07:00
Chris Robinson
630d4d573d
Gracefully drain the OpenSL capture buffer on disconnect
2019-10-10 13:33:27 -07:00
Chris Robinson
d2053e6784
Use one PulseAudio mainloop per device
...
To help avoid devices blocking on each other when handling asynchronous
messages.
2019-10-09 23:25:56 -07:00
Chris Robinson
8bf3da0cd2
Remove a useless prebuf check with PulseAudio
2019-10-09 09:45:02 -07:00
Chris Robinson
57cdac3368
Create the initial PulseAudio stream corked
2019-10-09 09:42:35 -07:00
Chris Robinson
404f3e2d08
Don't track the PulseAudio context state in devices
2019-10-09 05:01:30 -07:00
Chris Robinson
b687e952ef
Make C callbacks noexcept
...
No telling what would happen if exceptions managed to get back into presumably
C-based callers.
2019-10-09 03:29:25 -07:00
Chris Robinson
a7c1245360
Use smart pointers for ALSA param handles
...
And simplify some related error handling
2019-10-09 02:16:08 -07:00
Chris Robinson
2842df5a02
Catch exceptions from backend start calls
2019-10-09 00:11:19 -07:00
Chris Robinson
963580c2d5
Never return null from CreateRingBuffer
...
Allocation failure would already throw a bad_alloc anyway, now a size overflow
throws an exception too.
2019-10-08 21:55:03 -07:00
Chris Robinson
7726a06d26
Clean up some exception messages and avoid duplicate log messages
2019-10-08 05:44:38 -07:00
Chris Robinson
360330b2ad
Define some simple wrapper methods inline
2019-10-08 03:41:49 -07:00