Chris Robinson
ac8dbd7a56
Add a specific function for truncating float-to-int conversions
2018-05-03 22:02:32 -07:00
Raulshc
6d8062a2a7
EFX: Align some arrays used in intrinsics ( #180 )
2018-03-24 05:43:56 -07:00
Chris Robinson
7a23330ffe
Move the filter implementation to a separate directory
2018-03-22 07:05:40 -07:00
Chris Robinson
a211c2f5e4
Avoid AL prefix on internal effect state factory types
...
Also avoid using the generic V/V0 macros for them
2018-02-28 19:37:12 -08:00
Chris Robinson
99f0377ae3
Construct error messages using parameterized values
2018-01-25 15:59:59 -08:00
Chris Robinson
2ded5547ba
Provide messages for the remaining AL errors
2018-01-24 17:07:01 -08:00
Chris Robinson
2873abcbc0
Fix up some types for MSVC
2018-01-11 10:55:35 -08:00
Chris Robinson
ca9e6a4f94
Ensure NextPowerOf2 is being used correctly
2018-01-11 09:53:52 -08:00
Chris Robinson
15f9d15ba0
Avoid using macros to access anonymous structures
2018-01-11 03:45:23 -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
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
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
1a911be617
Update the chorus and flanger state struct less often
2017-12-19 15:12:06 -08:00
Chris Robinson
52569ef562
Fade gains in the chorus and flanger output
2017-12-19 13:52:05 -08:00
Chris Robinson
661bd054aa
Use a single delay line for chorus feedback on a fixed tap
...
The outputs themselves use a variale-delay tap, but using a separate fixed-
delay tap on the feedback helps improve the perceived "wobble" with sustained
notes. This also applies to the flanger effect.
2017-12-18 13:41:12 -08:00
Chris Robinson
eee4aca40b
Apply chorus and flanger feedback on the tapped re-feed
2017-12-17 22:14:20 -08:00
Chris Robinson
04cf832fe6
Use the selected mixer for chorus and flanger output
2017-12-17 22:10:58 -08:00
Chris Robinson
d281b25723
Use a separate LFO offset in the chorus effect
...
Given that the LFO range is not a power-of-two, it won't correctly wrap on
overflow.
2017-12-15 17:26:03 -08:00
Chris Robinson
2a3b5ab9e9
Use linear interpolation for the chorus delay output
2017-12-15 16:50:06 -08:00
Chris Robinson
90cedbea49
Pass the context to the auxiliary effect update method
2017-09-21 05:42:35 -07:00
Chris Robinson
e9a7218a06
Remove the fastf2u conversion function
2017-06-27 07:25:08 -07:00
Chris Robinson
b4aea294c3
Calculate chorus and flanger mod delays separately from feedback
2017-06-07 12:42:54 -07:00
Chris Robinson
653f0a1405
Fix handling chorus and flanger LFO displacement offset
...
The phase offset is modulo-wrapped rather than masked, so it's best to avoid
negative offsets.
2017-05-26 09:09:35 -07:00
Chris Robinson
2b14c1d623
Properly handle the chorus and flanger LFOs
...
The effects' specified delay is the average delay time, meaning the delay
offset should move between -n and +n relative to the delay, where n <= delay.
2017-05-26 08:52:07 -07:00
Chris Robinson
53c3d48fe0
Change some ALuint parameters to ALsizei
2017-05-02 04:54:59 -07:00
Chris Robinson
c2a79f0f7b
Remove CalcXYZCoeffs and inline CalcAngleCoeffs
2017-02-23 16:44:59 -08:00
Chris Robinson
0fbf34fb45
Add a ref count to ALeffectState
...
This is mostly just reorganizing the effects to call the Construct method which
initializes the ref count.
2016-08-25 03:49:57 -07:00
Chris Robinson
2e7ec3979a
Avoid using realloc in a number of places
2016-05-21 03:27:51 -07:00
Chris Robinson
93a94d177c
Get rid of an unnecessary copy of ALeffectProps
2016-05-13 18:28:01 -07:00
Chris Robinson
ef0d4f8210
Provide (mostly) lockless updates for effect slots
...
Similar to the listener, separate containers are provided atomically for the
mixer thread to apply updates without needing to block, and a free-list is used
to reuse container objects.
A couple things to note. First, the lock is still used when the effect state's
deviceUpdate method is called to prevent asynchronous calls to reset the device
from interfering. This can be fixed by using the list lock in ALc.c instead.
Secondly, old effect states aren't immediately deleted when the effect type
changes (the actual type, not just its properties). This is because the mixer
thread is intended to be real-time safe, and so can't be freeing anything. They
are cleared away when updates reuse the container they were kept in, and they
don't incur any extra processing cost, but there may be cases where the memory
is kept around until the effect slot is deleted.
2016-05-12 18:41:33 -07:00
Chris Robinson
f0871c8cfc
Improve radius behavior with scaling of ambisonic coefficients
2016-04-24 21:42:59 -07:00
Chris Robinson
a6c70992b0
More directly map coefficients for ambisonic mixing buffers
...
Instead of looping over all the coefficients for each channel with multiplies,
when we know only one will have a non-0 factor for ambisonic mixing buffers,
just index the one with a non-0 factor.
2016-04-15 22:05:47 -07:00
Chris Robinson
bd65f64d05
Avoid mixing all coefficients together when only some are used
2016-04-15 17:31:04 -07:00
Chris Robinson
a457157516
Organize the dry buffer properties into a struct
2016-03-09 23:43:57 -08:00
Chris Robinson
2fa3ae85c9
Pass a pointer to the input samples array for effect processing
2016-01-27 08:16:47 -08:00
Chris Robinson
f547ef6d39
Separate calculating ambisonic coefficients from the panning gains
2016-01-25 06:11:51 -08:00
Chris Robinson
b348abf5c3
Rename F_2PI to F_TAU
2015-09-13 08:46:48 -07:00
Chris Robinson
c3a36d9b19
Do up to 256 samples at a time with multi-step loops
2014-12-18 09:23:55 -08:00
Chris Robinson
3f7cb8392e
Pas the output device channel count to ALeffectState::process
2014-11-07 03:43:33 -08:00
Chris Robinson
4c3f27193f
Use a separate macro for the max output channel count
2014-11-07 02:18:24 -08:00
Chris Robinson
95ba18cf4e
Make ComputeAngleGains use ComputeDirectionalGains
2014-10-02 18:05:42 -07:00
François Cami
3c13e1e333
Update COPYING to the latest https://www.gnu.org/licenses/old-licenses/lgpl-2.0.txt to fix the FSF' address Fix the FSF' address in the source
2014-08-18 11:34:29 -07:00
Chris Robinson
16d3316f70
Use an enum for the chorus and flanger waveforms
2014-05-14 23:51:24 -07:00
Chris Robinson
0a030c2bd9
Use a void* for the effect state Delete method param
2014-03-21 23:56:18 -07:00
Chris Robinson
4386ee32ce
Use one long buffer for the chorus and flanger delay lines
2013-11-10 02:48:03 -08:00
Chris Robinson
a603dd55ff
Rename lfo_coeff to lfo_scale
2013-11-08 16:54:45 -08:00
Chris Robinson
9228d13333
Use integer modulo for chorus and flanger
...
Also simplify LFO coefficient calculations.
2013-11-08 16:33:42 -08:00
Chris Robinson
bca959f372
Only use the inner loop for the chorus/flanger template method
2013-11-08 05:26:43 -08:00
Chris Robinson
a421e515be
Use a helper macro for pi*2
2013-10-08 16:31:23 -07:00