Chris Robinson
85395b23a4
Clear voice target gains earlier
2020-02-08 18:10:59 -08:00
Chris Robinson
ebb1aaa06d
Make sure stereo angles are kept in-range.
2020-01-31 11:11:06 -08:00
Chris Robinson
3904289af7
Only sort active effect slots as needed
2020-01-18 18:53:58 -08:00
Chris Robinson
75a58ae333
Simplify appending delayed samples
2020-01-14 12:13:00 -08:00
Chris Robinson
5324bdb908
Signal the event handler only once per update
2020-01-14 10:39:41 -08:00
Chris Robinson
6608e5dd9f
Make sure unassociated voices give back their update structs
2020-01-08 07:31:01 -08:00
Chris Robinson
cdd24c7d01
Combine identical arrays
2020-01-04 00:59:49 -08:00
Chris Robinson
c1cf10f508
Handle downmixing for mono output
2019-12-29 20:35:47 -08:00
Chris Robinson
9ac8f25a05
Ignore direct channels for mono and B-Format buffers
2019-12-29 19:17:29 -08:00
Chris Robinson
701d43b41e
Start a new extension for a new direct_channels state
...
So existing behavior remains consistent for anything that needs it, and new
behavior is opt-in.
2019-12-28 11:33:19 -08:00
Chris Robinson
3b3d3d3a03
Use a span for the band-splitter input
2019-12-25 21:48:58 -08:00
Chris Robinson
28e68d03d3
Fix a shadowed parameter warning
2019-12-23 23:13:45 -08:00
Chris Robinson
bff6696814
Avoid reading a struct field twice
2019-12-23 23:00:59 -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
54e7f48df9
Use unique setters for biquad filter parameters
...
One for whether a slope parameter is used, and one for bandwidth.
2019-12-21 02:02:57 -08:00
Chris Robinson
274fd36edd
Improve gain/hf/lf packing when processing voice updates
2019-12-21 00:48:58 -08:00
Chris Robinson
4634002104
Remix missing channels with direct channels enabled
...
Instead of dropping them.
2019-12-19 04:38:34 -08:00
Chris Robinson
6480c2c854
Don't apply direct channels with mono output
2019-12-18 23:29:52 -08:00
Chris Robinson
5e35f73cad
Don't process direct channel sources with attenuation
2019-12-17 22:40:49 -08:00
Chris Robinson
a8de1570e9
Update a comment since B-Format input isn't always FuMa
2019-12-17 22:25:00 -08:00
Chris Robinson
466c6faeb5
Correctly scale spatialized B-Format sources
2019-12-17 22:20:38 -08:00
Chris Robinson
0a65ed2190
Use normal panning for B-Format output
...
It can never work since it only uses auxiliary channel labels.
2019-12-17 22:12:47 -08:00
Chris Robinson
2215a4072c
Don't apply stereo panning with direct channels enabled
2019-12-17 21:49:58 -08:00
Chris Robinson
38037e29ba
Handle the buffer's ambisonic properties
2019-12-02 12:50:18 -08:00
Chris Robinson
58e4d643d3
Make B-Format rotation more robust
...
This should now handle higher orders, and can be easily extended to non-FuMa
layouts and scalings.
2019-12-01 22:33:41 -08:00
Chris Robinson
0cba99ed1b
Avoid static constexpr for arrays iterated over at run-time
2019-10-25 01:43:23 -07:00
Chris Robinson
33fd1f9efd
Use better types for some specific sizes
2019-10-13 09:37:07 -07:00
Chris Robinson
acb6baad90
Use std::array instead of plain arrays in a couple places
2019-10-05 21:23:31 -07:00
Chris Robinson
64e2c377d8
Move ALvoice from alu.h to a separate header
2019-10-02 16:53:23 -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
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
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
bf2c865d39
Clean up some more shadowing warnings
2019-09-16 07:16:31 -07:00
Chris Robinson
2c348cecb6
Fix some more implicit conversions noted by GCC
2019-09-14 18:35:23 -07:00
Chris Robinson
df306b5524
Make NumAuxSends unsigned
2019-09-13 04:15:05 -07:00
Chris Robinson
5b763e1437
Clean up implicit conversions in alu.cpp
2019-09-13 03:47:23 -07:00
Chris Robinson
5f862a5b49
Clean up sample converter implicit conversions
2019-09-12 17:45:06 -07:00
Chris Robinson
6699f3cf1c
Use unsigned channel indices
2019-09-12 04:17:21 -07:00
Chris Robinson
ef2769af03
Use a normal vector for the voices array
2019-09-04 23:04:55 -07:00
Chris Robinson
c47a6d2279
Increment the mix count during disconnect
...
So attempts to get the current playback offset behave correctly while
disconnecting.
2019-09-04 20:31:55 -07:00
Chris Robinson
d15950f383
Avoid accumulating a temporary
2019-09-01 15:03:22 -07:00
Chris Robinson
a546343148
Make MixVoice a member function
2019-08-31 14:53:28 -07:00
Chris Robinson
7dbf69afa2
Use a span for effect state input
2019-08-26 09:16:20 -07:00
Chris Robinson
164626a7be
Pass unsigned sample count to aluMixData
2019-08-25 17:54:36 -07:00
Chris Robinson
88a8bf903b
Use size_t for the post-process sample length
2019-08-25 15:36:40 -07:00