93 Commits

Author SHA1 Message Date
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
Chris Robinson
1a287f434a Round the pitch shifter frequency bin targets 2020-05-22 16:36:41 -07:00
Chris Robinson
19baf646d2 Rename applyHfScale to processHfScale 2020-05-19 13:58:55 -07:00
Chris Robinson
2fb4ac1621 Revert "Fix the FFT half point for the shifter effects"
This reverts commit 12bb5a47cda0ef6ec1ced73ccf5d267a71f9e710.
2020-05-09 16:44:29 -07:00
Chris Robinson
12bb5a47cd Fix the FFT half point for the shifter effects 2020-05-08 01:39:48 -07:00
Chris Robinson
48fbad9836 Slightly improve the Hann windows
There's no need to include the 0 terms on the ends since they'll never
contribute a sample. So extend the width to have the 0 terms just outside the
window where it wouldn't contribute anyway.
2020-05-08 01:25:32 -07:00
Chris Robinson
58d953f6aa Clear buffers right before use 2020-05-03 19:13:20 -07:00
Chris Robinson
15fd3da870 Don't put the LFO on the stack 2020-05-03 19:04:43 -07:00
Chris Robinson
fe7a74b09a Use a helper to set an identity ambisonic pan 2020-05-03 18:47:49 -07:00
Chris Robinson
f49238c792 Minor cleanup of reverb code 2020-04-24 02:51:23 -07:00
Chris Robinson
8739833770 Add a method to process two biquads at once 2020-04-23 22:13:52 -07:00
Chris Robinson
2deb5e47d1 Avoid an unnecessary out parameter 2020-04-21 23:58:53 -07:00
Chris Robinson
93e677edb3 Precalculate some values
MSVC isn't as willing to precompute sqrt and log10 results from known input
values.
2020-04-16 23:17:07 -07:00
Chris Robinson
3824b92704 Simplify some reverb update code 2020-04-16 20:52:20 -07:00
Chris Robinson
27ac637a66 Remove another unnecessary return value 2020-04-16 17:29:32 -07:00
Chris Robinson
cf4a848fd0 Remove an always-true return value 2020-04-16 16:00:26 -07:00
Chris Robinson
dc41f276d8 Get rid of the specialized MixRow_ methods 2020-04-16 01:47:33 -07:00
Chris Robinson
6ac5816354 Avoid inlining some potentially costly calls 2020-04-14 11:50:59 -07:00
Chris Robinson
1d8ac4d61f Throw exceptions for errors in the effect getters/setters 2020-04-10 20:23:20 -07:00
Chris Robinson
13153bab60 Add an effect_exception for handling effect properties 2020-04-10 18:26:08 -07:00
Chris Robinson
35a2b0e5f8 Simplify generating chorus delays a bit 2020-04-09 21:00:37 -07:00
Chris Robinson
d67cba99bd Clean up some more unnecessary uses of AL types 2020-04-08 10:15:43 -07:00
Chris Robinson
8a5153ce0d Avoid ALfloat and ALint in the effects 2020-04-08 07:28:07 -07:00
Chris Robinson
7a324231a3 Combine the late reverb feedback and modulator delay lines 2020-04-06 16:14:13 -07:00
Chris Robinson
6ff5339112 Include the average modulation delay for the late reverb feedback 2020-04-06 15:46:14 -07:00
Chris Robinson
ab6afd6fa0 Reimplement the modulation stage for reverb
This seems to be quite close recordings from real hardware, so it's probably
good enough.
2020-04-05 12:00:45 -07:00
Chris Robinson
f1f9a14172 Avoid AL[C]boolean for internal use 2020-03-28 18:15:05 -07:00
Chris Robinson
504745abec Use a standard bool instead of ALboolean 2020-03-28 18:15:05 -07:00
Chris Robinson
e78cb9b77f Avoid using more unnecessary type aliases 2020-03-28 18:15:04 -07:00
Chris Robinson
dc8ccc06ce More cleanup for the pitch shifter 2020-03-22 20:48:02 -07:00
Chris Robinson
f3ff28fb2a Some type cleanup 2020-03-22 10:41:02 -07:00
Chris Robinson
d30d9a2c9f Clean up the pitch and frequency shifter some 2020-03-22 10:06:23 -07:00
Chris Robinson
002d0eb6a0 Fix the frequency shifter channel panning 2020-03-22 08:51:59 -07:00
Chris Robinson
9ce182228d Avoid some pre-C++14 workarounds 2020-03-22 08:51:06 -07:00
Chris Robinson
3b3d3d3a03 Use a span for the band-splitter input 2019-12-25 21:48:58 -08:00
Chris Robinson
f153def941 Pass a span for the biquad filter input 2019-12-25 18:39:22 -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
Raulshc
c5f88ab59f EFX: Add explicit cast to a square function
MSVC 2015 and above returns the expression according to its datatype.
In this case, returns 4294967295 instead of -1.
2019-11-09 12:12:53 +01:00
Chris Robinson
1bb93f4fc2 Avoid direct function template and alias types
It's somewhat ambiguous what they mean. Sometimes acting as a pointer, other
times having weird behavior. Pointer-to-function types are explicitly defined
as such, whereas uses of these tend to be as references (never null and not
changeable).
2019-10-03 04:22:39 -07:00
Chris Robinson
4b746b8d37 Make MAX_RESAMPLER_PADDING specify the total padding 2019-09-28 14:35:42 -07:00
Chris Robinson
5f6a35c960 Avoid storing an integer in a pointer
C++ does not guarantee that, given an int of sufficient size, converting
int->ptr->int will result in the original value. A pointer may have more than
one integer representation. Only ptr->int->ptr round trips are well-defined.
2019-09-21 23:35:24 -07:00
Chris Robinson
65eb0987e2 Remove and simplify some functions 2019-09-20 13:35:29 -07:00