Commit Graph

1880 Commits

Author SHA1 Message Date
Raulshc
83dba26ea6 EFX: Autowah implementation
Add autowah effect using biquad peaking filter and envelope follower
2018-07-25 12:51:09 -07:00
Chris Robinson
ed1f1d2bf3 Start an extension to allow source filter gains greater than 1 2018-07-15 21:01:26 -07:00
Jan Niklas Hasse
a80ab01227 Correctly check byte order for newer Android compiler, fix #203 2018-06-20 21:36:33 +02:00
Chris Robinson
8219bb374d Fix a couple property variable names 2018-05-22 06:19:59 -07:00
kcat
da63b4a596
Merge pull request #193 from Raulshc/Frequency-shifter
EFX: Frequency shifter
2018-05-22 04:44:50 -07:00
Chris Robinson
4e315353c8 Add a method to queue multiple buffer layers onto a source 2018-05-21 23:25:56 -07:00
Chris Robinson
720ec2beea Use the __BYTE_ORDER__ macro when available 2018-05-21 17:51:57 -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
Chris Robinson
0cd375f03c Add a function to calculate coefficients from X, Y, Z components 2018-05-17 03:52:40 -07:00
Chris Robinson
197e88cdcc Avoid using unsigned values for signed 2018-05-15 01:20:39 -07:00
Chris Robinson
4ac4889912 Avoid unnecessary function-like macros 2018-05-15 00:53:12 -07:00
Chris Robinson
1e04c4c689 Make a faster float2int method for x87 targets 2018-05-12 22:34:15 -07:00
Chris Robinson
5c0673049c Fix MSVC 2018-05-12 03:31:58 -07:00
Chris Robinson
f240952bcc Fix non-SEE (32-bit) GCC builds 2018-05-12 00:58:27 -07:00
Chris Robinson
e787a241c0 Add and use a method for fast float rounding
Unlike fastf2i, this keeps the result as a float instead of converting to
integer.
2018-05-12 00:52:09 -07:00
Chris Robinson
1fb6428ffa Another fix attempt for 32-bit MSVC 2018-05-04 04:02:57 -07:00
Chris Robinson
b31a54e972 Try to fix 32-bit MSVC builds 2018-05-04 02:56:01 -07:00
Chris Robinson
75e2cb97f7 Don't assume round-to-zero for fastf2i 2018-05-04 02:09:32 -07:00
Chris Robinson
ac8dbd7a56 Add a specific function for truncating float-to-int conversions 2018-05-03 22:02:32 -07:00
Chris Robinson
ace8e64850 Only use fast float-to-int workarounds for x87
At least SSE and ARM have opcodes that handle float-to-int conversions well
enough. Also, Clang doesn't inline lrintf, incurring function call overhead for
what should be a single opcode.
2018-04-21 21:07:20 -07:00
Chris Robinson
a55c93e1f5 Improve ASSUME for Clang
For some reason, the { if(!x)__builtin_unreachable(); } construct does not
provide the same optimization opportunity for Clang (even though the condition
being false would trigger undefined behavior by reaching unreachable code, it
still performs checks and such for the condition potentially being false).
Using __builtin_assume seems to work better.
2018-04-21 01:54:43 -07:00
Chris Robinson
150586d7fe Add an ASSUME macro that requires a true condition 2018-04-17 22:50:50 -07:00
Chris Robinson
9c5307a48a Rename BiquadState to BiquadFilter 2018-04-04 18:07:46 -07:00
Chris Robinson
5aecce5a0d Store the ALbufferlistitem's composited/max sample length 2018-03-27 18:09:28 -07:00
Chris Robinson
6990478369 Rename ALfilterState/Type to BiquadState/Type 2018-03-23 14:52:59 -07:00
Chris Robinson
8e976a92f7 Move NFC filters to the filter directory 2018-03-22 07:17:48 -07:00
Chris Robinson
7a23330ffe Move the filter implementation to a separate directory 2018-03-22 07:05:40 -07: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
30821e978b Add extern "C" to some headers 2018-03-09 17:24:03 -08:00
Chris Robinson
2187316bce Use function-like macros to call filter and effect vtable methods 2018-03-08 17:48:22 -08:00
Chris Robinson
07c8857558 Fix struct forward declaration typo 2018-03-08 17:48:21 -08:00
Chris Robinson
9bd1678299 Fix adding to and removing from the active effect slots
It wasn't properly removing all duplicates on insertion, and didn't remove the
first effect slot when removing them.
2018-03-08 17:48:21 -08:00
Chris Robinson
19281868dc Properly limit the max number of effect slots to 2^31 - 1 2018-03-08 17:48:21 -08:00
Chris Robinson
179e1c4dbc Don't check for space in the ringbuffer before trying to write
The write method already checks and returns how much it managed to fit in.
2018-03-03 21:57:42 -08:00
Chris Robinson
945d74cbc9 Avoid some code duplication 2018-03-03 14:04:10 -08:00
Chris Robinson
b8636a3dbf Add some missing locks to protect reading state 2018-03-03 13:54:21 -08:00
Chris Robinson
4e6c758daf Use a plain mutex for the property lock 2018-03-03 13:42:37 -08:00
Chris Robinson
bd32a682f7 Use atomic variables instead of volatile 2018-03-02 19:16:55 -08:00
Chris Robinson
6f62fed65c Add an option to limit the write size of the ringbuffer 2018-03-01 21:23:13 -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
d25398d2c7 Avoid using static inline in headers 2018-02-25 13:14:14 -08:00
Chris Robinson
455763aa9a Count all buffers in a list item for processed and queued 2018-02-25 09:51:07 -08:00
Chris Robinson
c7456affd5 Don't make the source state atomic 2018-02-24 09:44:52 -08:00
Chris Robinson
a1ef5e38b6 Handle source state change events 2018-02-24 09:24:18 -08:00
Chris Robinson
14bdc6c2ef Use separate functions to add and remove active effect slots 2018-02-23 23:02:31 -08:00
Chris Robinson
b5aa0c0759 Remove the unnecessary ComputeAmbientGains 2018-02-18 23:56:51 -08:00
Chris Robinson
e63e0ee596 Combine multiple functions called sequentially 2018-02-11 22:23:03 -08:00
Chris Robinson
b11e31fbfd Clear stale 'post's on the event semphaphore 2018-02-11 06:14:18 -08:00