19 Commits

Author SHA1 Message Date
Chris Robinson
1130597562 Use structs for the mixer and resampler tags 2020-04-03 03:52:23 -07:00
Chris Robinson
f56ef433d8 Move the FPUCtl methods to its own source 2020-03-20 15:01:45 -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
2c348cecb6 Fix some more implicit conversions noted by GCC 2019-09-14 18:35:23 -07:00
Chris Robinson
a250b6a986 Return unsigned values from the FromDevFmt functions 2019-09-13 14:29:25 -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
a895709b6f Fix function declaration 2019-09-11 06:58:27 -07:00
Chris Robinson
5b37e2339b Simplify flexible array member usage 2019-09-11 03:59:53 -07:00
Chris Robinson
65374dc5d0 Avoid dynamically allocating ChannelConverter 2019-09-10 23:01:33 -07:00
Chris Robinson
0961f4eb00 Pass a span to the Resample function 2019-08-20 08:46:12 -07:00
Chris Robinson
ce76cc1441 Use unsigned for the sample and channel converters 2019-08-20 07:57:37 -07:00
Chris Robinson
80a85febcf Update some includes 2019-08-05 18:36:39 -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