Chris Robinson
4802465f1a
Hold the effectslot map lock while handling it
2016-05-29 02:47:54 -07:00
Chris Robinson
8aa4a74a7b
Use a linked list for active effect slots
2016-05-29 01:40:16 -07:00
Chris Robinson
576c1116a6
Avoid using a flag to specify if the effect state needs to be updated
...
This fixes a potential missed state change if an update with a new state got
replaced with one that doesn't.
2016-05-15 01:19:05 -07:00
Chris Robinson
93a94d177c
Get rid of an unnecessary copy of ALeffectProps
2016-05-13 18:28:01 -07:00
Chris Robinson
210e150601
Avoid updating the effect state object if it's not changed
2016-05-12 19:05:06 -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
d5e624391b
Update a comment
2016-04-15 10:50:46 -07:00
Chris Robinson
fb97822d8c
Avoid unnecessary loops for setting up effect slot b-format buffer mixing
2016-04-14 21:50:36 -07:00
Chris Robinson
ce575718ef
Store the effect's output buffer in the effect state
2016-03-17 10:10:26 -07:00
Chris Robinson
c1f87414c5
Mix to multichannel for effects
...
This mixes to a 4-channel first-order ambisonics buffer. With ACN ordering and
N3D scaling, this makes it easy to remain compatible with effects that only
care about mono input since channel 0 is an unattenuated mono signal.
2016-01-28 00:02:46 -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
3f7cb8392e
Pas the output device channel count to ALeffectState::process
2014-11-07 03:43:33 -08:00
Chris Robinson
e4b779c492
Use generic atomics in more places
2014-07-22 18:57:51 -07:00
Chris Robinson
1d266aa834
Add a GCC-specific STATIC_UPCAST macro that checks the object type
...
The check is compile time, and is functionally identical to the old/alternate
version.
2014-04-19 03:11:23 -07:00
Chris Robinson
59fc9aac0e
Use C11 alignas when available
2014-04-19 02:11:04 -07:00
Chris Robinson
72986882f5
Remove the click removal buffers for auxiliary effect slots
2014-03-23 16:28:55 -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
d339120145
Move ALfloatBUFFERSIZE to a common location
2013-11-27 00:16:30 -08:00
Chris Robinson
5874e387a8
Move some inline methods to their appropriate headers
2013-11-04 13:51:19 -08:00
Chris Robinson
bc9c3de969
Use a helper macro for making vtable thunks
2013-10-29 20:13:42 -07:00
Chris Robinson
8aa237ac23
Fix effect slot struct declarations so KDevelop doesn't barf on them
2013-10-07 05:41:41 -07:00
Chris Robinson
41175ec84c
Implement the Compressor effect
2013-10-03 07:55:12 -07:00
Chris Robinson
99fa5911bc
Implement the Autowah effect.
2013-10-03 03:37:03 -07:00
Chris Robinson
764e3aa496
Fix up the naming convention of effect methods
2013-05-29 11:17:45 -07:00
Chris Robinson
334a7c1d59
Cleanup the ALeffectStateFactory_create methods
...
Get rid of the ALeffectStateFactory_create macro, and use the VCALL_NOARGS
helper (requires adding the 'this' factory parameter).
2013-05-27 13:16:17 -07:00
Chris Robinson
9e84f38a46
Use generic VCALL[_NOARGS] macros instead of type-specific wrappers
2013-05-27 11:48:29 -07:00
Chris Robinson
d1c5599c8e
Use an ALeffectProps union to store the effect properties
2013-05-25 22:07:31 -07:00
Chris Robinson
6571d80540
Use a Delete method for deletable objects
2013-05-25 21:04:00 -07:00
Chris Robinson
f667c028e6
Move the AL_EFFECT_NULL state into a separate file
2013-05-23 18:50:07 -07:00
Chris Robinson
52efb8d7f4
Use restrict instead of RESTRICT
2013-05-22 15:11:39 -07:00
Chris Robinson
eaccaa5028
Rename the effect state's Destroy method to Destruct
2013-05-21 13:02:56 -07:00
Chris Robinson
a5d94f5d09
Use factories to create and destroy effect states
2013-05-21 12:47:18 -07:00
Chris Robinson
af1936be5d
Remove some unused code
2013-05-21 07:24:53 -07:00
Chris Robinson
5c8c40afef
Auto-generate wrappers to upcast objects before calling user methods
2013-05-21 05:02:25 -07:00
Chris Robinson
5516d8df0b
Use macros to help define vtables for effect states
2013-05-21 04:18:02 -07:00
Chris Robinson
78e7c1c27b
Implement distortion and equalizer effects
...
Code provided by Mike Gorchak
2013-05-18 01:33:01 -07:00
Chris Robinson
3fd0f23e48
Add Chorus and Flanger effects
...
Code provided by Mike Gorchak
2013-03-13 23:31:12 -07:00
Chris Robinson
fb21a73b4e
Add the RESTRICT keyword to a function pointer definition's parameters
2012-10-25 14:52:09 -07:00
Chris Robinson
79b6d89b3f
Explicitly give the wet buffer 1 channel
2012-09-16 08:27:50 -07:00
Chris Robinson
dd9d30e248
Implement an SSE MixSend method
2012-09-16 06:19:39 -07:00
Chris Robinson
9f58edd7a8
Fix up some more header includes
2012-09-14 02:42:36 -07:00
Chris Robinson
4c5cb2189b
Use a non-interleaved DryBuffer
2012-09-11 06:32:42 -07:00
Chris Robinson
583dc8dbca
Don't use all caps for enum value names
2012-06-28 18:49:49 -07:00
Chris Robinson
60da5bd338
Remove an unused field
2012-04-19 22:32:04 -07:00
Chris Robinson
c9e64596a4
Use a consistent name for the self-id field
2012-04-19 22:28:01 -07:00
Chris Robinson
92ccacdc77
Pass the device to InitializeEffect and return the error enum from it
2012-03-13 14:58:34 -07:00
Chris Robinson
b5ed2a5351
Pass a device to the effect update functions
2012-03-13 14:49:58 -07:00
Chris Robinson
f520257463
Avoid duplicating some initialization code
2012-01-20 16:23:15 -08:00
Chris Robinson
51e81f4867
Add a global option to apply a reverb effect on source send 0
...
A special slot on the device is created and processed, so it can be shared
across all contexts on the device. Sources that don't have a slot set on send 0
will use this special slot instead.
2012-01-19 19:30:03 -08:00