134 Commits

Author SHA1 Message Date
Chris Robinson
62fa6a2277 Avoid including voice.h in alcontext.h 2020-12-27 16:14:11 -08:00
Chris Robinson
507cbfa027 Combine EffectState::deviceUpdate with setBuffer 2020-12-26 12:33:00 -08:00
Chris Robinson
54719de132 Avoid AL enums for the EffectSlot type 2020-12-26 09:21:30 -08:00
Chris Robinson
8a86ec8ac5 Add a crossover frequency field for the device
Used when upsampling low-order ambisonic signals to higher order. Rather than a
hardcoded 400hz, it ensures a consistent crossover point when an ambdec
configuration is used. It can also allow for an alsoft config option.
2020-12-26 05:23:08 -08:00
Chris Robinson
eaf209d2f1 Update a comment and type used in the convolution effect 2020-12-25 07:00:57 -08:00
Chris Robinson
204f7d8811 Rename From2D to FromACN2D 2020-12-25 06:40:13 -08:00
Chris Robinson
0d3b041aa2 Avoid AL types and enums in the effect processors 2020-12-24 22:49:55 -08:00
Chris Robinson
d578bc6cb1 Move logging to core 2020-12-17 02:47:03 -08:00
Chris Robinson
56af137ba0 Move fmt_traits to core 2020-12-13 21:12:03 -08:00
Chris Robinson
191fe888b4 Move ambidefs.h to core 2020-12-12 10:38:24 -08:00
Chris Robinson
bd08b9a5b5 Use constexpr variables instead of macros 2020-12-06 08:49:20 -08:00
Chris Robinson
4ee95dc296 Use a smaller FFT for convolution 2020-12-05 14:18:19 -08:00
Chris Robinson
50e33ce8f4 Change some macros into constexpr variables 2020-12-04 13:53:56 -08:00
Chris Robinson
69d55d7e03 Move the filters to core 2020-12-04 11:15:50 -08:00
Chris Robinson
8750810f5c Change a couple macros into constexpr variables 2020-11-28 03:38:20 -08:00
Chris Robinson
32b9a46b39 Move AL EffectProp handling to separate sources 2020-11-25 13:55:29 -08:00
Chris Robinson
7e76770278 Avoid an unnecessary multiplier 2020-11-09 12:33:07 -08:00
Chris Robinson
3a58bac7bd Fix pitch shifter bin count 2020-11-09 08:10:43 -08:00
Chris Robinson
54e4346f50 Simplify some pitch shifter scaling calculations 2020-11-08 07:59:14 -08:00
Chris Robinson
4e760bbecc Use a separate structure for the active effect slot properties 2020-11-07 08:36:49 -08:00
Chris Robinson
7bb37deb51 Replace the mixer fraction macros with constexpr variables 2020-10-21 17:16:27 -07:00
Chris Robinson
3e62600ecc Replace some more macros with constexpr variables 2020-10-21 16:39:21 -07:00
Chris Robinson
d912b92a60 Support all buffer layouts for convolution 2020-09-22 08:09:42 -07:00
Chris Robinson
8ef242bce0 Don't use direct channels with convolution
It may come back as an effect property, but it's probably better to not try
forcing it by default.
2020-09-18 10:12:58 -07:00
Chris Robinson
07989a34dc Allow higher-order B-Format buffers for convolution
Only the first-order channels will be used, but higher-order buffers will be
allowed.
2020-09-18 00:06:10 -07:00
Chris Robinson
e7d8e7eb3f Avoid extraneous buffers and buffer clears 2020-09-17 21:34:26 -07:00
Chris Robinson
0974b6b47c Use inline wrappers to clarify forward/inverse FFTs 2020-09-13 04:18:40 -07:00
Chris Robinson
ce0a45cbc7 Don't assume iterators are pointers 2020-09-09 14:02:02 -07:00
Chris Robinson
68a099ba35 Apply the first convolution segment in the time domain
This avoids an inherent delay from the effect, at the cost of higher CPU use.
Having a customizable user-specified delay (with said user ensuring a properly
trimmed impulse response) could help alleviate the cost since once the delay
exceeds the segment size, the initial FIR filter could be skipped.
2020-09-09 02:23:38 -07:00
Chris Robinson
f4a55cc8c2 Don't leave the negative frequencies as 0 for inverse FFT 2020-09-08 23:20:06 -07:00
Chris Robinson
29566b995c Avoid an extraneous ConvolutionFilter sub-object 2020-09-06 00:16:50 -07:00
Chris Robinson
c52bf8c401 Rework effect slot buffer setting
Rather than creating an effect-specific buffer that gets passed along as a
property, the buffer is set the effect state when the effect state is created,
the device is updated, or the buffer is changed. The buffer can only be set
while the effect slot isn't playing, so it won't be changed or updated while
the mixer is processing the effect state.
2020-09-05 20:48:56 -07:00
Chris Robinson
c1ad5d6055 Avoid confusing */*...*/ syntax
MSVC warns about */ being outside of a comment.
2020-09-05 14:28:08 -07:00
Chris Robinson
af97a92952 Move more processing to the ConvolutionFilter struct 2020-08-31 06:43:42 -07:00
Chris Robinson
88425becb2 Remove a couple unnecessary pointers 2020-08-30 04:41:19 -07:00
Chris Robinson
82873486b7 Dynamically allocate the convolution channel mixing data 2020-08-30 04:28:01 -07:00
Chris Robinson
ebe0765ce3 Reorganize some convolution fields 2020-08-30 03:42:44 -07:00
Chris Robinson
3fdee6c814 Calculate the correct number of convolution segments 2020-08-28 23:08:44 -07:00
Chris Robinson
ecfb0d4f5b Limit convolution processing to the output ambisonic order 2020-08-28 06:47:21 -07:00
Chris Robinson
7266cd8b6c Don't dereference a null convolution filter 2020-08-28 06:44:05 -07:00
Chris Robinson
52531d8b72 Support B-Format impulse responses for convolution 2020-08-28 05:48:26 -07:00
Chris Robinson
986a58d5b4 Pass a BufferStorage to EffectState::createBuffer 2020-08-28 00:44:55 -07:00
Chris Robinson
ecf30de36f Rename buffer_formats to buffer_storage 2020-08-27 23:02:17 -07:00
Chris Robinson
a9ebcdcb7f Handle 0-length convolution buffers 2020-08-27 21:32:25 -07:00
Chris Robinson
2a01940041 De-duplicate LoadSampleArray and FmtTypeTraits 2020-08-26 21:29:16 -07:00
Chris Robinson
9dab2db33b Avoid copying the convolution filter history to shift it
Instead, the current/head/newest segment is tracked, and decremented with each
process to overwrite the oldest.
2020-08-25 15:43:48 -07:00
Chris Robinson
801c7a9226 Initial implementation of the convolution effect
Currently limited to mono and stereo impulse responses, and stereo IRs try to
use direct/real output rather than panning.
2020-08-25 04:21:10 -07:00
Chris Robinson
1a9fbc1b2f Stub out a convolution effect state 2020-08-24 20:04:16 -07:00
Chris Robinson
9e5a388dfe Add a method for effects to create persistent buffer data 2020-08-24 19:13:46 -07:00
Chris Robinson
f1612ce228 Use dual-biquad processing for the equalizer effect 2020-05-26 18:08:57 -07:00