Commit Graph

56 Commits

Author SHA1 Message Date
Chris Robinson ec3a6f8cde Use FloatBufferLine for the effect process method 2019-05-29 09:37:25 -07:00
Chris Robinson b0e12ccf71 Ensure a couple calls are constexpr 2019-05-26 15:57:17 -07:00
Chris Robinson 7cbf82afe4 Avoid a few more NUM_LINES assumptions 2019-05-26 11:34:17 -07:00
Chris Robinson 8ca97a7d9a Move a couple functions into its related class 2019-05-25 11:54:51 -07:00
Chris Robinson 9eea2e4c73 Use BUFFERSIZE for the reverb loop limit
At 44/48khz, the main delay line comes out to 20k to 22k samples, which gets
rounded up to 32k as the next power of two. This leaves plenty of room for the
full 1k BUFFERSIZE without having to increase the delay line beyond what it
already is.
2019-05-03 12:59:04 -07:00
Chris Robinson 2f2ec2b6e3 Add some assumes and consts 2019-05-03 00:50:47 -07:00
Chris Robinson a72c47164c Avoid a few more array length assumptions 2019-05-01 11:15:17 -07:00
Chris Robinson 6281f6e85a Avoid masking offsets in the inner reverb loops 2019-04-30 23:28:57 -07:00
Chris Robinson 9d6619efdc Combine some reverb processing loops
Specifically, the A2B and output mixing, as well as applying the band-pass with
B2A mixing (the latter of which hiding a bug that was overwriting the early
buffer storage).
2019-04-28 08:56:41 -07:00
Chris Robinson 819ec8a653 Rename and move ALeffectProps 2019-03-22 22:48:12 -07:00
Chris Robinson ea8b02dead Pass ALeffectProps directly to the get/setParam* methods 2019-03-22 16:04:13 -07:00
Chris Robinson e7e585f65c Use the effect state factory to set the default effect props 2019-03-22 15:00:37 -07:00
Chris Robinson f951f4a66b Implement getDefaultProps for effect state factories 2019-03-22 12:58:24 -07:00
Chris Robinson 935f386982 Use a separate EffectStateFactory for standard reverb 2019-03-22 11:57:32 -07:00
Chris Robinson 12721f94a7 Add a method to apply an HF scale without band-splitting 2019-03-10 10:30:33 -07:00
Chris Robinson 86926f0998 Combine the reverb output mixes into a single call 2019-02-25 05:52:37 -08:00
Chris Robinson 81aa5af3b9 Make sure the reverb fading completes
The processing loop doesn't depend on being aligned anymore, so it won't get
stuck when only less than 4 samples can be done in a non-final update.
2019-02-25 01:08:11 -08:00
Chris Robinson a2ba550ebf Rework reverb A/B-Format conversion mixing
This should help improve performance using the optimized mixers, and fewer
passes on the transforms, though at the cost of more memory.
2019-02-24 15:43:56 -08:00
Chris Robinson 4ec0aed286 Change some functions to proper methods 2019-02-23 03:18:12 -08:00
Chris Robinson 42934b09e5 Avoid multiple int-to-float conversions 2019-02-23 01:43:55 -08:00
Chris Robinson 317206e8f3 Remove the FOAOut mixing buffer and associated post-processes 2019-02-22 22:35:37 -08:00
Chris Robinson 5b35e60a98 Apply ambisonic upsampling on reverb output as needed
This isn't the greatest thing since it splits the A-to-B-Format transform from
the panning transform. The A-to-B and HF scale mixes are also not as optimal as
they could be, since they can't use the main mixer functions (wrong buffer line
length).

It does, however, get rid of the final use of the FOAOut buffer, so the
upsampling post-process is no longer needed.
2019-02-22 21:53:45 -08:00
Chris Robinson 6a3c10d850 Ensure reverb fading doesn't end with less than 4 samples 2019-02-22 02:15:22 -08:00
Chris Robinson 6a2cf96448 Avoid some unnecessary local variables 2019-02-22 01:00:57 -08:00
Chris Robinson 01ac6e2e56 Combine reverb transform matrices one column at a time 2019-02-21 19:05:20 -08:00
Chris Robinson 462e320847 Make sure the B2A matrix has enough values for the input count 2019-02-21 03:31:24 -08:00
Chris Robinson d95e144c48 Remove some now-unnecessary ReverbState fields 2019-02-21 03:07:36 -08:00
Chris Robinson 4b4041319d Pass the number of input channels to EffectState::process 2019-02-21 02:57:39 -08:00
Chris Robinson 77ba61ecb3 Partially handle non-periphonic reverb input 2019-02-19 22:55:43 -08:00
Chris Robinson 87902fa3b2 Use the right macro for the number of reverb panning gains 2019-02-19 20:51:10 -08:00
Filip Gawin 6ddb2c36fc Remove redundant void argument list in function def 2019-01-09 19:43:54 +01:00
Filip Gawin 4169c6f37d Use c++ headers 2019-01-09 19:42:40 +01:00
Filip Gawin 0d3a0635d9 Avoid using old style casts
To think about:
examples/alffplay.cpp:600
OpenAL32/Include/alMain.h:295
2019-01-08 19:42:44 +01:00
Chris Robinson da3a916042 Replace macros with constexpr inline functions 2019-01-06 04:16:51 -08:00
Chris Robinson c36798fd07 Avoid unnecessary extra buffers for filter chains 2019-01-01 02:41:27 -08:00
Chris Robinson 8336de6653 Rename a couple filter files for consistency 2018-12-25 10:28:02 -08:00
Chris Robinson ae86aef4db Provide effect target parameters through a common struct 2018-12-24 13:29:36 -08:00
Chris Robinson 3fe38fed7c Mix effect slot output to the effect target if it's set 2018-12-23 08:51:28 -08:00
Chris Robinson bfa98be48a Cleanup definitions and declarations in reverb.cpp 2018-12-22 19:31:12 -08:00
Chris Robinson 86caf2683e Constify a parameter 2018-12-22 18:43:34 -08:00
Chris Robinson 640c06c292 Avoid some explicit loop counts 2018-12-15 01:48:54 -08:00
Chris Robinson 5a283c66ee Use proper classes for Vector and Matrix types 2018-12-12 04:22:11 -08:00
Chris Robinson c9f5617f06 Avoid several uses of memset 2018-12-08 14:22:20 -08:00
Chris Robinson 164a86a381 Use class methods for the biquad filter 2018-12-04 22:31:08 -08:00
Chris Robinson 288dbbe886 Use default initialization for the reverb effect state 2018-11-19 22:48:56 -08:00
Chris Robinson 8472a9d916 Use proper inheritence for the effect state objects 2018-11-19 22:34:26 -08:00
Chris Robinson 7f3584ec4c Fix the reverb buffer size calculation 2018-11-19 19:13:44 -08:00
Chris Robinson 3ae1c78d1a Use std::isfinite instead of isfinite 2018-11-19 09:51:29 -08:00
Chris Robinson ddfed7187f Use a regular vector for the reverb sample buffer 2018-11-19 09:36:59 -08:00
Chris Robinson 55637ff1fc Rename reverb struct members 2018-11-19 09:29:22 -08:00