Chris Robinson
e8b3e82f96
Change a couple functions into member functions
2020-08-07 06:22:39 -07:00
Chris Robinson
88ad84edf6
Reduce the MAX_PITCH to 10
...
255 is insanely overkill. The bsinc resamplers fade to silence after a few
octaves, and the others would be a mess.
2020-06-29 11:32:15 -07:00
Chris Robinson
fe7a74b09a
Use a helper to set an identity ambisonic pan
2020-05-03 18:47:49 -07:00
Chris Robinson
2deb5e47d1
Avoid an unnecessary out parameter
2020-04-21 23:58:53 -07:00
Chris Robinson
3cb12da765
Move a type to where it's used
2020-04-16 02:05:07 -07:00
Chris Robinson
dc41f276d8
Get rid of the specialized MixRow_ methods
2020-04-16 01:47:33 -07:00
Chris Robinson
02d7fbfa0c
Use standard attribute declarations
2020-04-13 23:27:56 -07:00
Chris Robinson
d67cba99bd
Clean up some more unnecessary uses of AL types
2020-04-08 10:15:43 -07:00
Chris Robinson
8f47013e43
Some more ALfloat->float cleanup
2020-04-03 08:49:15 -07:00
Chris Robinson
af6584b8fc
Reduce the maximum number of source sends to 6
2020-02-25 04:52:39 -08:00
Chris Robinson
2e6a55a87c
Handle padding between device sample frames
...
The padding must be constant and sample type aligned (e.g. some fixed multiple
of two bytes between the start of two consecutive frames for 16-bit output).
The intent is to always have the ability for stereo output with WASAPI even if
the device has some other unsupported configuration, as long as front-left and
front-right exist.
2019-12-21 20:43:46 -08:00
Chris Robinson
eb89faf963
Use a span instead of a reference-to-array
2019-10-05 20:00:22 -07:00
Chris Robinson
58085f1c7b
Clean up some unnecessary includes
2019-10-02 19:13:07 -07:00
Chris Robinson
64e2c377d8
Move ALvoice from alu.h to a separate header
2019-10-02 16:53:23 -07:00
Chris Robinson
d639935e19
Move a couple types to the source they're used in
2019-10-02 15:37:33 -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
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
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
24db8a3f4b
Make the resampler type an enum class
2019-09-22 21:19:19 -07:00
Chris Robinson
aca9f4e095
Make the bsinc l and m coefficients unsigned
2019-09-17 18:38:46 -07:00
Chris Robinson
f09734b707
Pass IrSize to the HRTF mixers as unsigned
2019-09-13 11:19:11 -07:00
Chris Robinson
c1690178ec
Make the resampler increment unsigned
2019-09-13 03:25:13 -07:00
Chris Robinson
5f862a5b49
Clean up sample converter implicit conversions
2019-09-12 17:45:06 -07:00
Chris Robinson
2e010d29cb
Clean up implicit conversions in source.cpp
2019-09-12 11:33:04 -07:00
Chris Robinson
ef2769af03
Use a normal vector for the voices array
2019-09-04 23:04:55 -07:00
Chris Robinson
3973334a64
Store the voice fraction offset as unsigned
2019-08-31 15:49:34 -07:00
Chris Robinson
a546343148
Make MixVoice a member function
2019-08-31 14:53:28 -07:00
Chris Robinson
164626a7be
Pass unsigned sample count to aluMixData
2019-08-25 17:54:36 -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
0961f4eb00
Pass a span to the Resample function
2019-08-20 08:46:12 -07:00
Chris Robinson
2ab52968f4
Track the MixVoice sample count and fade counter as unsigned
2019-08-20 06:03:31 -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
5b33b4aa97
Make the post-process methods member functions
2019-08-07 11:43:53 -07:00
Chris Robinson
80a85febcf
Update some includes
2019-08-05 18:36:39 -07:00
Chris Robinson
3154a915b1
Remove the ReverbSpeedOfSound hack
...
No other effect depends on context or listener properties, so reverb being the
only exception for speed of sound and meters per unit was putting extra work on
the effect engine for no real reason. Especially since the reverb decay time
should be the time actual time to decay irrespective of other settings.
2019-08-05 11:37:05 -07:00
Chris Robinson
151ff51e7d
Don't templatize HrirArray
2019-07-31 10:46:33 -07:00
Chris Robinson
4c9e18c5a0
Rename al/* sources to avoid camel-case
2019-07-29 17:54:07 -07:00
Chris Robinson
d38d255364
More include cleanups
2019-07-28 21:29:59 -07:00
Chris Robinson
cb3e96e756
Rename Alc to alc
2019-07-28 18:56:04 -07:00