Chris Robinson
e634564b26
Make a couple functions inline
2018-01-12 02:37:48 -08:00
Chris Robinson
dae5faedb0
Use atomic variables in place of volatile
2018-01-11 23:28:15 -08:00
Chris Robinson
1f236d8f20
Define a function where it's used
2018-01-11 22:42:25 -08:00
Chris Robinson
370817ba60
Move logging declarations to a separate header
2018-01-11 20:17:02 -08:00
Chris Robinson
2873abcbc0
Fix up some types for MSVC
2018-01-11 10:55:35 -08:00
Chris Robinson
e89c183231
Avoid including alMain.h in ringbuffer.c
2018-01-11 10:03:26 -08:00
Chris Robinson
ca9e6a4f94
Ensure NextPowerOf2 is being used correctly
2018-01-11 09:53:52 -08:00
Chris Robinson
2d2ca1d791
Remove SET_VTABLE1
2018-01-11 09:39:52 -08:00
Chris Robinson
85a8f965e5
Clean up the EffectList members and make the list size known
2018-01-11 09:34:01 -08:00
Chris Robinson
3832b25f30
Move the ringbuffer declarations to a separate header
...
And rename alcRing.c to ringbuffer.c for consistency.
2018-01-11 09:16:28 -08:00
Chris Robinson
15ad5245bf
Move the FPU mode declarations to a separate header
...
Also don't use inheritance with FPUCtl.
2018-01-11 08:44:52 -08:00
Chris Robinson
8aa9e35f8c
Move the config function declarations to their own header
...
And rename alcConfig.c to alconfig.c for consistency.
2018-01-11 07:56:54 -08:00
Chris Robinson
81b13f78ea
Move the CPU capability flags to a separate header
2018-01-11 07:19:19 -08:00
Chris Robinson
9b9ec2c21a
Move the compressor/limiter declarations to their own header
2018-01-11 06:50:53 -08:00
Chris Robinson
f3c9bc114c
Move the polymorphic/inheritance macros to a separate header
2018-01-11 06:32:45 -08:00
Chris Robinson
ff231b42ff
Reorder some loops in the equalizer and use MixSamples
2018-01-11 05:03:00 -08:00
Chris Robinson
9c33f4aea8
Use MixSamples for the dedicated and ring modulator effect output
2018-01-11 04:48:18 -08:00
Chris Robinson
f55583330b
Apply the distortion gain to the mixing gains
2018-01-11 04:34:51 -08:00
Chris Robinson
2c8e4467c3
Move some HRTF structures to hrtf.h
2018-01-11 03:53:25 -08:00
Chris Robinson
15f9d15ba0
Avoid using macros to access anonymous structures
2018-01-11 03:45:23 -08:00
Chris Robinson
279799ad70
Don't return whether the bsinc filter cuts or not
2018-01-10 19:20:58 -08:00
Chris Robinson
ea6b384980
Make a function pointer static
2018-01-10 19:13:41 -08:00
Chris Robinson
ef63ec3fe9
Use one macro to handle both resample padding sizes
2018-01-09 23:55:59 -08:00
Chris Robinson
de8c5b1824
Combine the chorus and flanger processing functions
...
Given that they're nearly identical, it should be relatively simple to use the
same effect state to process either of them, similar to the reverbs. The big
differences seem to be the delay range (much shorter with flanger) and the
defaults.
2018-01-09 23:21:16 -08:00
Chris Robinson
9e2eb5dc23
Rename the device's temp buffer storage to be more generic
2018-01-09 22:01:46 -08:00
Chris Robinson
5d1207104a
Remove standard reverb specific processing functions
2018-01-07 22:48:03 -08:00
Chris Robinson
d547f52d8f
Move the UNEXPECTED macro to the main header and rename it
2018-01-07 22:20:08 -08:00
Chris Robinson
56e9cb69d3
Ensure the chorus delay and depth leave enough padding for resampling
...
Also use cubic resampling for the modulated tap. Applies to flanger too.
2018-01-07 21:15:18 -08:00
Chris Robinson
70973035de
Use a separate function to get the cubic value
2018-01-07 17:24:29 -08:00
Chris Robinson
c423b6c8b7
Remove the sinc4 table
2018-01-07 05:58:52 -08:00
Chris Robinson
4cc1c64646
Replace the sinc4 resampler with cubic
...
Turns out the C version of the cubic resampler is just slightly faster than
even the SSE3 version of the FIR4 resampler. This is likely due to not using a
64KB random-access lookup table along with unaligned loads, both offseting the
gains from SSE.
2018-01-07 05:32:07 -08:00
Chris Robinson
ecd327e5e1
Test the correct offset for the loop start range
2018-01-04 21:21:48 -08:00
Chris Robinson
510bccb6ac
Use the correct start point when looping
2018-01-04 20:21:46 -08:00
Chris Robinson
32330c5eef
Use separate outputs for the vector reverse and scatter functions
2018-01-04 20:04:39 -08:00
Chris Robinson
e00ef16893
Avoid the modulated output tap for late reverb
...
And fix the output filtering. The modulation code is still there since it's
(probably) technically correct, but the interaction with the feedback loop and
filtering on the output caused improper behavior which needs to be sorted out.
2018-01-04 19:17:16 -08:00
Chris Robinson
08a4840298
Don't offset the reverb modulation sinus
2018-01-02 19:52:57 -08:00
Chris Robinson
a16f933e3a
Use a float literal for float math
2018-01-02 19:44:31 -08:00
Chris Robinson
b8de63d608
Reset CompLen when loading loop repeats in the mixer
2018-01-02 19:29:58 -08:00
Chris Robinson
6dd1643a70
Avoid dereferencing a NULL pointer
...
Even though it's taking the address of a member, it's still technically a
derefernce and thus undefined behavior. sizeof doesn't "execute" the
expression, so derefering in it instead is fine.
2017-12-31 23:19:41 -08:00
Chris Robinson
98731bb574
Update resampler padding checks
2017-12-29 16:28:49 -08:00
Chris Robinson
27dfb7fd11
Fix up a comment
2017-12-24 20:41:20 -08:00
Chris Robinson
6457df54bb
Don't make a pass-through macro for FadedDelayLineOut
2017-12-24 20:41:20 -08:00
Chris Robinson
07f3ed0419
Use linear interpolation for reverb modulation
...
The core LateReverb_* functions are explicitly written out now, since the
tapping and blending done by the Faded version is a bit more complex and it's
not so easy to ensure proper optimizing on the Unfaded version.
2017-12-24 20:40:53 -08:00
Chris Robinson
dabb99de8d
Don't offset the chorus/flanger delay and LFO
...
The delay being added to the scaled LFO will ensure a proper positive result
regardless.
2017-12-24 20:40:33 -08:00
Chris Robinson
254ebe5f96
Fade between depths in the reverb modulator
2017-12-24 16:23:30 -08:00
Chris Robinson
b32a366137
Use a separate unmodulated feedback tap for reverb
2017-12-24 14:21:13 -08:00
Chris Robinson
ce74098b40
Clarify some reverb values
2017-12-23 21:13:57 -08:00
Chris Robinson
5769efe48e
Reorder some global variables
2017-12-23 18:50:38 -08:00
Chris Robinson
02051ab51a
Cleanup reverb modulation scaling
2017-12-23 14:18:14 -08:00
Chris Robinson
02c0620141
Add missing integer queries
2017-12-21 11:46:01 -08:00