Chris Robinson
a0a55d300f
Remove an unnecessary function
2019-10-01 21:45:44 -07:00
Chris Robinson
5d7a1fa6da
Clear the HRTF state values on allocation
2019-09-30 19:29:01 -07:00
Chris Robinson
4d127a2f98
Avoid infs/nans in the crest detector
...
It needs to be investigated why the rendered mix sometimes has such large
sample values when starting, but the compressor/limiter shouldn't generate NaNs
because of it.
2019-09-30 17:29:04 -07:00
Chris Robinson
cf617760b6
Separate a couple assignments from conditionals
2019-09-30 03:03:27 -07:00
Chris Robinson
c833af9ecd
Repack the bsinc resamplers coefficients
...
This puts the base coefficients and the phase deltas next to each other. This
improves caching, as the base and phase deltas are always used together while
the scales are only used for the non-fast versions.
2019-09-29 23:39:04 -07:00
Chris Robinson
fb56b02041
Modify the bsinc resampler
...
Readjusted the bsinc12 cutoff back to -60dB. Also increased the filter's phase
count.
2019-09-29 22:43:46 -07:00
Chris Robinson
fabb9add9b
Silence an MSVC warning
2019-09-28 23:31:49 -07:00
Chris Robinson
00250042c8
Check MAX_RESAMPLER_PADDING properly to ensure it's large enough
2019-09-28 19:14:27 -07:00
Chris Robinson
7783fa738c
Make the BSincTables constexpr in an anonymous namespace
2019-09-28 16:40:38 -07:00
Chris Robinson
4b746b8d37
Make MAX_RESAMPLER_PADDING specify the total padding
2019-09-28 14:35:42 -07:00
Chris Robinson
2d2e5539c0
Use FastBSinc24 for WASAPI and CoreAudio capture
...
Given a fixed rate, there's no downside to the fast version.
2019-09-28 03:44:13 -07:00
Chris Robinson
cbc00bcffe
Combine two function calls into one
2019-09-28 03:42:17 -07:00
Chris Robinson
882b4acae8
Add "fast" variants for the bsinc resamplers
...
This simply omits the scale factor from the filter, similar to how up-sampling
does. The consequence of this is less smooth transitions when ramping the
pitch while down-sampling, but otherwise behaves fine.
2019-09-28 01:58:29 -07:00
Chris Robinson
9b64e5e0db
Implement a "fast" bsinc path
...
This takes advantage of the fact than when increment <= 1 (when not down-
sampling), the scale factor is always 0. As a result, the scale and scale-phase
deltas never contribute to the filtered output. Removing those multiply+add
operations cuts half of the work done by the inner loop.
Sounds that do need to down-sample (when played with a high pitch, or is 48khz
on 44.1khz output, for example), still go through the normal bsinc process.
2019-09-26 19:24:29 -07:00
Chris Robinson
f009219523
Avoid extraneous parameters
2019-09-25 02:11:37 -07:00
Chris Robinson
5bb91b858f
Use blended HRIRs for the B-Format decode
2019-09-24 22:27:12 -07:00
Chris Robinson
16a715a2b5
Fix unsigned 8-bit buffers
2019-09-24 21:49:12 -07:00
Chris Robinson
6963712d46
Use an array to match the HRTF rendering method
2019-09-24 13:51:40 -07:00
Chris Robinson
bf31ce688a
Add a missing header for Android
2019-09-23 19:23:33 -07:00
Chris Robinson
61ffa23e44
Fix a couple more conversion warnings
2019-09-22 21:27:10 -07:00
Chris Robinson
24db8a3f4b
Make the resampler type an enum class
2019-09-22 21:19:19 -07:00
Chris Robinson
95996effaf
Move the ifstream wrapper to common
2019-09-22 12:23:41 -07:00
Chris Robinson
5f6a35c960
Avoid storing an integer in a pointer
...
C++ does not guarantee that, given an int of sufficient size, converting
int->ptr->int will result in the original value. A pointer may have more than
one integer representation. Only ptr->int->ptr round trips are well-defined.
2019-09-21 23:35:24 -07:00
Chris Robinson
9325f1d507
Split some code into separate functions
2019-09-21 21:14:11 -07:00
Chris Robinson
146afcbd70
Explicitly mark a couple functions as inline
2019-09-21 16:12:48 -07:00
Chris Robinson
28e62456ac
Use an array and loop instead of individual tests
2019-09-21 12:08:45 -07:00
Chris Robinson
65eb0987e2
Remove and simplify some functions
2019-09-20 13:35:29 -07:00
Chris Robinson
057b253adb
Use an anonymous namespace instead of static
2019-09-19 21:01:10 -07:00
Chris Robinson
ffb5623ead
Fix a couple more annoying conversion warnings
2019-09-18 20:13:58 -07:00
Chris Robinson
a092624ed3
Fix some Windows warnings
2019-09-18 18:20:11 -07:00
Chris Robinson
9a0a5c79d8
Avoid hiding a class member function
2019-09-18 17:02:33 -07:00
Chris Robinson
66565ca7a3
Enable and fix some more warnings
2019-09-18 10:09:04 -07:00
Chris Robinson
aca9f4e095
Make the bsinc l and m coefficients unsigned
2019-09-17 18:38:46 -07:00
Chris Robinson
1da7512628
Avoid an unnecessary multiply
2019-09-16 21:49:06 -07:00
Chris Robinson
899a414591
Remove the last uses of the system's str[n]casecmp
2019-09-16 15:10:36 -07:00
Chris Robinson
10a841cd7e
Avoid an unused variable
2019-09-16 14:10:48 -07:00
Chris Robinson
2c5c5a5397
Add and use custom string types and functions
2019-09-16 13:45:14 -07:00
Chris Robinson
650764775f
Fix typo
2019-09-16 07:50:39 -07:00
Chris Robinson
fcf850c1dd
Clean up some more conversion warnings
2019-09-16 07:32:13 -07:00
Chris Robinson
bf2c865d39
Clean up some more shadowing warnings
2019-09-16 07:16:31 -07:00
Chris Robinson
e16e2269b6
Add a fallback if SLAndroidDataFormat_PCM_EX isn't available
2019-09-15 20:46:37 -07:00
Chris Robinson
35129d66b7
Clean up the spaghetti mess in alcCaptureSamples
2019-09-15 13:42:56 -07:00
Chris Robinson
a999df8ce5
Rename ALautowah* for consistency
2019-09-15 12:58:58 -07:00
Chris Robinson
47f0d301dc
Make the BackendFactory base destructor protected
2019-09-15 10:22:56 -07:00
Chris Robinson
c5a3c52822
Return and pass more appropriate types for backends
2019-09-15 09:50:28 -07:00
Chris Robinson
e4cc77ea23
Fix a few warnings from MSVC
2019-09-14 20:19:59 -07:00
Chris Robinson
4b8f78a8d6
Fix a few more GCC warnings
2019-09-14 19:42:54 -07:00
Chris Robinson
e82c43fb38
Fix a copy-paste error
2019-09-14 19:07:30 -07:00
Chris Robinson
807d3b64ca
Enable and fix more warnings
2019-09-14 18:35:23 -07:00
Chris Robinson
2cc0600476
Avoid recalculations in the formant filter process
2019-09-14 18:35:23 -07:00