40 Commits

Author SHA1 Message Date
Chris Robinson
ac7a5dcbfa Use size_t for array indices 2019-12-11 02:44:05 -08:00
Chris Robinson
053de62398 Don't force the HRIR length to a rounded value
The coefficient and accumulation buffers are guaranteed large enough for the
full size, and the SIMD handlers will behave the same either way.
2019-12-11 02:24:44 -08:00
Chris Robinson
7ff165b095 Use unsigned for array indices 2019-11-29 08:33:46 -08: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
1bb93f4fc2 Avoid direct function template and alias types
It's somewhat ambiguous what they mean. Sometimes acting as a pointer, other
times having weird behavior. Pointer-to-function types are explicitly defined
as such, whereas uses of these tend to be as references (never null and not
changeable).
2019-10-03 04:22:39 -07:00
Chris Robinson
b350ae3766 Remove the Offset parameter from ApplyCoeffs 2019-10-02 22:38:19 -07:00
Chris Robinson
50198ee30c Clean up some ALfloat -> float 2019-10-02 17:07:23 -07:00
Chris Robinson
64e2c377d8 Move ALvoice from alu.h to a separate header 2019-10-02 16:53:23 -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
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
aca9f4e095 Make the bsinc l and m coefficients unsigned 2019-09-17 18:38:46 -07:00
Chris Robinson
650764775f Fix typo 2019-09-16 07:50:39 -07:00
Chris Robinson
bf2c865d39 Clean up some more shadowing warnings 2019-09-16 07:16:31 -07:00
Chris Robinson
4b8f78a8d6 Fix a few more GCC warnings 2019-09-14 19:42:54 -07:00
Chris Robinson
2c348cecb6 Fix some more implicit conversions noted by GCC 2019-09-14 18:35:23 -07:00
Chris Robinson
f09734b707 Pass IrSize to the HRTF mixers as unsigned 2019-09-13 11:19:11 -07:00
Chris Robinson
4254888576 Make IrSize unsigned 2019-09-13 09:38:35 -07:00
Chris Robinson
c1690178ec Make the resampler increment unsigned 2019-09-13 03:25:13 -07:00
Chris Robinson
1a9f1e0869 Fix a few more C-style casts 2019-09-11 08:08:23 -07:00
Chris Robinson
e873165019 Only ASSUME values where a variable is used 2019-09-04 19:31:30 -07:00
Chris Robinson
8940bbd034 Only use one accumulation buffer for B-Format HRTF mixing
It's all getting added together anyway and all channels are continuous inputs,
so this is fewer passes over various buffers.
2019-09-03 23:19:24 -07:00
Chris Robinson
3973334a64 Store the voice fraction offset as unsigned 2019-08-31 15:49:34 -07:00
Chris Robinson
b7ab8b6896 Fix a variable declaration 2019-08-22 18:53:09 -07:00
Chris Robinson
7ad2ed965c Avoid reading from pointers to __m128 values 2019-08-21 07:43:28 -07:00
Chris Robinson
3a6676b61e Fix NEON store call 2019-08-20 12:19:38 -07:00
Chris Robinson
80710c146a Use size_t for the mixers' fade counter and outpos 2019-08-20 12:00:24 -07:00
Chris Robinson
3fa83547e9 Use size_t for HrtfMixer functions' buffer size 2019-08-20 11:39:39 -07:00
Chris Robinson
a7f078927d Fix MixRow definition for NEON 2019-08-20 09:20:18 -07:00
Chris Robinson
0961f4eb00 Pass a span to the Resample function 2019-08-20 08:46:12 -07:00
Chris Robinson
102ef6cb33 Pass a span for the Mix function's input 2019-08-20 04:16:44 -07:00
Chris Robinson
4883091f5d Rename the Mix function input for clarity 2019-08-20 01:24:02 -07:00
Chris Robinson
8fd90334a1 Pass the MixRow buffer size as a span 2019-08-20 00:27:28 -07:00
Chris Robinson
2d0568c048 Allow using a variable channel stride for MixRowSamples 2019-08-19 08:02:08 -07:00
Chris Robinson
4f4ef3a410 Don't require MixRow's output to be a FloatBufferLine 2019-08-18 15:15:56 -07:00
Chris Robinson
2fa2c35bdc Modify LIKELY and UNLIKELY to not need extra parenthesis 2019-08-04 11:59:14 -07:00
Chris Robinson
151ff51e7d Don't templatize HrirArray 2019-07-31 10:46:33 -07:00
Chris Robinson
d1f72624a7 Fix a couple ASSUME statements 2019-07-31 10:28:04 -07:00
Chris Robinson
471f905fbd Use enums for the resampler and mixer template tags 2019-07-31 10:09:43 -07:00
Chris Robinson
4c9e18c5a0 Rename al/* sources to avoid camel-case 2019-07-29 17:54:07 -07:00
Chris Robinson
cb3e96e756 Rename Alc to alc 2019-07-28 18:56:04 -07:00