Chris Robinson
c80ee5b701
Use std::array for most mixing buffer arrays
2019-05-28 16:22:36 -07:00
Chris Robinson
819ec8a653
Rename and move ALeffectProps
2019-03-22 22:48:12 -07:00
Chris Robinson
3a6e741e90
Use MixParams for the wet buffers
2019-03-22 19:25:55 -07:00
Chris Robinson
e7e585f65c
Use the effect state factory to set the default effect props
2019-03-22 15:00:37 -07:00
Chris Robinson
f951f4a66b
Implement getDefaultProps for effect state factories
2019-03-22 12:58:24 -07:00
Chris Robinson
935f386982
Use a separate EffectStateFactory for standard reverb
2019-03-22 11:57:32 -07:00
Chris Robinson
9790135127
Add a new EffectStateFactory method to get the default properties
2019-03-22 11:52:55 -07:00
Chris Robinson
45378fe687
Remove the unused FOAOut EffectTarget
2019-02-22 22:03:04 -08:00
Chris Robinson
8d2d7c63da
Get rid of the MAX_EFFECT_CHANNELS macro
2019-02-21 03:52:54 -08:00
Chris Robinson
4b4041319d
Pass the number of input channels to EffectState::process
2019-02-21 02:57:39 -08:00
Chris Robinson
3966665ca3
Store effect slots in groups of 64
...
Now that their wet buffers are allocated dynamically, the ALeffectslot object
itself is rather small.
2019-02-20 22:00:26 -08:00
Chris Robinson
c43381d811
Allocate the effect slot wet buffer dynamically
2019-02-20 21:01:08 -08:00
Chris Robinson
05cdc2cb30
Use relaxed memory ordering for initializing atomic_flags
2019-02-04 21:28:37 -08:00
Minmin Gong
41b9d473a2
Fix compiling problems on VS2019 with vc142 toolset
...
Msvc142 in VS2019 preview 2 doesn't allow std::atomic_flag to be initialized by a bool. Call test_and_set in the constructors instead.
2019-02-04 20:03:18 -08:00
Chris Robinson
81e7222633
Use a flexible array for the active effect slots
2019-01-11 07:28:44 -08:00
Chris Robinson
e7d77f5caa
Use a vector for ALeffectslotArray
2019-01-09 18:29:22 -08:00
Chris Robinson
fbae41020d
Remove extraneous typedef, struct, and enum keywords
2018-12-24 19:29:01 -08:00
Chris Robinson
bbf9e6931c
Propagate an effectslot target property
2018-12-24 15:17:38 -08:00
Chris Robinson
ae86aef4db
Provide effect target parameters through a common struct
2018-12-24 13:29:36 -08:00
Chris Robinson
e218999b4f
Dynamically sort the effect slots when mixing
...
This is to be able to support effects that output to other effects. When an
effect outputs to another effect, the former needs to process first, so the
former mixes to the latter's buffer before the latter is processed.
This sorting needs to happen in the mixer because the effect slot's "Target"
property changes asynchronously.
2018-12-22 22:31:26 -08:00
Chris Robinson
86caf2683e
Constify a parameter
2018-12-22 18:43:34 -08:00
Chris Robinson
053599b243
Avoid using the ATOMIC() macro
2018-11-26 14:48:26 -08:00
Chris Robinson
ec97360352
Avoid a separate function to clean up effect slots
2018-11-25 09:23:01 -08:00
Chris Robinson
191ea90de3
Use atomic_flags and atomic<bools>s where appropriate
2018-11-20 10:45:01 -08:00
Chris Robinson
eb2937de84
Avoid another case of a variable named the same as a type
2018-11-19 23:48:45 -08:00
Chris Robinson
8472a9d916
Use proper inheritence for the effect state objects
2018-11-19 22:34:26 -08:00
Chris Robinson
c5c537cc5f
Use proper inheritence for EffectStateFactory
2018-11-19 06:43:37 -08:00
Chris Robinson
e194d896de
Use constructors/destructors for ALeffectslot
2018-11-18 06:35:45 -08:00
Chris Robinson
310770c531
Add and use new/delete operators to ALeffectslot
2018-11-18 02:52:46 -08:00
Chris Robinson
d10301c209
Remove unused headers and checks
2018-11-17 19:52:54 -08:00
Chris Robinson
a5f68c2121
Avoid using ATOMIC_FLAG
...
Although it cant potentially be better than a regular atomic, it presents
compatibility issues when non-C11 atomics are mixed with C++
2018-11-13 20:26:32 -08:00
Chris Robinson
903d878460
Replace restrict with RESTRICT
2018-10-29 11:32:50 -07:00
Chris Robinson
5c6b8eda4f
Remove another duplicate function
2018-09-19 22:18:46 -07:00
Raulshc
83dba26ea6
EFX: Autowah implementation
...
Add autowah effect using biquad peaking filter and envelope follower
2018-07-25 12:51:09 -07:00
Raulshc
d3a81f4f28
EFX: Frequency Shifter implementation
...
Add frequency shifter effect using discrete Hilbert transform. Only mono signal processing by now (LEFT_DIRECTION).
2018-05-20 17:23:03 +02:00
Raulshc
6fd23f0984
EFX:Pitch Shifter implementation
...
Add pitch shifter effect using standard phase vocoder, based on work of Stephan Bernsee. Only mono signal processing by now.
2018-03-18 17:47:17 +01:00
Chris Robinson
8eb7a94e1c
Apply a distance decay on the source send for the reverb's DecayLFRatio
2018-03-11 22:40:08 -07:00
Chris Robinson
07c8857558
Fix struct forward declaration typo
2018-03-08 17:48:21 -08:00
Chris Robinson
812cb62617
Fix a comment regarding the effect slot channel scaling
2018-02-28 20:39:53 -08: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
dcc5a10c7b
Use a fixed array for the effect state factory list
2018-01-28 00:10:12 -08:00
Chris Robinson
6a839600b9
Use a vector to store the effect slot pointers
...
And make the ID a simple index into it (1-base, to avoid ID 0).
2018-01-27 19:04:32 -08:00
Chris Robinson
63416bf28f
Avoid unnecessarily using type aliases
2018-01-14 09:02:59 -08:00
Chris Robinson
1ab8902621
Re-update effect slots when context properties change
...
Also keep all free property update structs together in the context instead of
per-object.
2017-09-27 11:13:18 -07:00
Chris Robinson
90cedbea49
Pass the context to the auxiliary effect update method
2017-09-21 05:42:35 -07:00
Chris Robinson
e9505b164e
Fix source sends' initial HF absorption and decay calculation
...
The HF absorption is applied given the source distance, as relative to the
source's immediate environment, with additional absorption being applied given
the room/reverb environment. This does double up the amount of absorption
compared to the dry path, but it can be assumed the initial reflections travel
a longer distance.
2017-05-27 22:33:40 -07:00
Chris Robinson
a306407b67
Apply more proper air absorption to the wet path
...
This properly accounts for the room rolloff factor for normal air absorption
(which makes it none by default, like distance attenuation), and uses the
reverb's decay time, decay hf ratio, decay hf limit, and room air absorption
properties to calculate an initial hf decay with the WetGainAuto flag. This
mirrors the behavior of the initial distance decay.
2017-05-19 23:13:39 -07:00
Chris Robinson
53c3d48fe0
Change some ALuint parameters to ALsizei
2017-05-02 04:54:59 -07:00
Chris Robinson
70aefa75e2
Use an array of pointers for effects instead of a linked list
2017-03-27 23:16:23 -07:00
Chris Robinson
1c49d0542d
Use an atomic flag to mark auxiliary effect slot updates
2017-03-23 19:16:32 -07:00