132 Commits

Author SHA1 Message Date
Chris Robinson
034935b2e1 Modify how VCALL is handled
Now instead of specifying the arguments as a third argument to the macro, like
VCALL(object,function,(arg1, arg2));
they are specified separately after the macro, like
VCALL(object,function)(arg1, arg2);

Also, VCALL_NOARGS has been removed in favor of VCALL0, which behaves like
above but expects an empty argument list (a separate macro is needed to work
around preprocessor limitations).
2013-10-28 11:06:04 -07:00
Chris Robinson
c787a9bf74 Remove al_try from alAuxEffectSlot.c 2013-10-07 11:30:11 -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
52096234e1 Limit the source step to 10
This means the combination of the buffer frequency, source pitch, and
doppler shift can't exceed 10x the device playback frequency.

This is needed to keep the mixer from starving with a really high
increment, causing small DstBufferSize values that require a lot of
iterations.
2013-07-02 06:57:27 -07:00
Chris Robinson
764e3aa496 Fix up the naming convention of effect methods 2013-05-29 11:17:45 -07:00
Chris Robinson
e96cc656e9 Use C99's inline instead of __inline 2013-05-28 22:27:07 -07:00
Chris Robinson
0ad71a67d4 Store pointers to the getFactory funcs in the map 2013-05-27 13:41:16 -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
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
0a07ed14c2 Rename DELETE to DELETE_OBJ
Because Windows.
2013-05-21 23:42:40 -07:00
Chris Robinson
604726c639 Add a DELETE macro to help destroy objects 2013-05-21 13:27:27 -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
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
43b406ad9b Simplify al_try code 2013-03-24 13:55:41 -07:00
Chris Robinson
fb11eb1190 Avoid explicitly checking each effect to create 2013-03-19 05:39:34 -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
991aba286f Move the effect-specific get/set methods to where the effect is implemented 2013-03-13 21:53:42 -07:00
Chris Robinson
404d601666 Add a couple missing RESTRICTs 2012-10-25 17:02:21 -07:00
Chris Robinson
d3891af36e Ensure effect slots are aligned 2012-09-26 18:00:38 -07:00
Chris Robinson
79b6d89b3f Explicitly give the wet buffer 1 channel 2012-09-16 08:27:50 -07:00
Chris Robinson
657ee85136 Use a struct to store the FPU mode 2012-09-16 01:35:16 -07:00
Chris Robinson
4c5cb2189b Use a non-interleaved DryBuffer 2012-09-11 06:32:42 -07:00
Chris Robinson
0865db564f Move the device lock into the backend function table
For backend-specific implementations: this should hold the audio mixer loop for
playback devices, and provide recursive mutex behavior.
2012-08-18 15:58:04 -07:00
Chris Robinson
583dc8dbca Don't use all caps for enum value names 2012-06-28 18:49:49 -07:00
Chris Robinson
6995ac1ed2 Change alAuxEffectSlot.c to the new error handling 2012-04-24 22:57:23 -07:00
Chris Robinson
8092cd9205 Remove hungarian notation from some function parameters 2012-04-19 22:40:40 -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
8ef777ebbe Restore the FPU mode in an error path 2012-03-12 23:58:12 -07:00
Chris Robinson
cc2cb1142b Remove unused variables 2012-02-17 12:32:43 -08: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
Chris Robinson
886f874ff3 Use a proper typedef for handling atomic pointer swaps 2012-01-01 15:00:03 -08:00
Chris Robinson
3c27c24dec Set the mixer FPU mode when setting a new effect on an effect slot 2011-09-29 05:25:01 -07:00
Chris Robinson
e9da6950ee Centralize the Lookup and Remove macros 2011-09-24 18:34:45 -07:00
Chris Robinson
0988023d30 Constify some parameters 2011-09-22 00:31:42 -07:00
Chris Robinson
404cfde33e Rename the ALEffect_ macros to ALeffectState_ to reflect what they work on 2011-09-12 05:59:23 -07:00
Chris Robinson
0ceea27b44 Remove the effect slot parameter from the effect process method 2011-09-12 00:44:52 -07:00
Chris Robinson
0dc5837b82 Fix a possible race condition when setting an effect on a slot 2011-09-11 20:51:30 -07:00
Chris Robinson
d85c12c385 Avoid holding the context lock when setting auxiliary slot properties 2011-09-11 02:01:31 -07:00
Chris Robinson
e80aa008b2 Combine the reverb effects
Updating and processing still differs depending on whether standard or EAX
reverb is used or not. The only functional difference should be that the
allocated buffer (and subsequent offsets) take into account the modulation
and echo times.
2011-09-01 20:06:51 -07:00
Chris Robinson
812d91cbf8 Don't recreate the effect when switching between the dedicated effect types 2011-09-01 18:51:24 -07:00