293 Commits

Author SHA1 Message Date
Chris Robinson
4e17ad3ec0 Avoid a few more explicit loops 2018-12-02 13:35:07 -08:00
Chris Robinson
cc161fe7c1 Add a missing include 2018-12-01 01:12:05 -08:00
Chris Robinson
1e6e84374b Use std::array for the voice's PrevSamples 2018-11-30 21:23:43 -08:00
Chris Robinson
c7569c31ad Improve construction and destruction of ALvoices 2018-11-30 19:04:38 -08:00
Chris Robinson
4b7ac4a6ed Don't bother making ALvoiceProps dynamically sized 2018-11-30 16:56:23 -08:00
Chris Robinson
8ca8da30bd Store the source ID with the voice instead of the source pointer 2018-11-29 22:49:01 -08:00
Chris Robinson
ec2927cd32 Small cleanup for ~ALCcontext_struct 2018-11-27 21:19:30 -08:00
Chris Robinson
053599b243 Avoid using the ATOMIC() macro 2018-11-26 14:48:26 -08:00
Chris Robinson
976e49711b Add noexcept to a bunch of inline functions 2018-11-22 19:47:41 -08:00
Chris Robinson
7433cb5f4c Avoid naming a struct member the same as an enum type 2018-11-18 03:39:32 -08:00
Chris Robinson
e79d9bdd1a Move the vector and matrix declarations to a separate header 2018-11-17 23:21:37 -08:00
Chris Robinson
fa3c34268d Move the ALCcontext definition to its own header 2018-11-17 23:02:27 -08:00
Chris Robinson
d10301c209 Remove unused headers and checks 2018-11-17 19:52:54 -08:00
Chris Robinson
53373a43b8 Convert ALu.c to C++
Required changes to bsincgen to generate C++-friendly structures.
2018-11-16 20:32:19 -08:00
Chris Robinson
fd1361c198 Add a RESTRICT macro to help with C++ compatibility 2018-10-29 10:10:37 -07:00
Chris Robinson
5c6b8eda4f Remove another duplicate function 2018-09-19 22:18:46 -07:00
Chris Robinson
ea95a8adef Combine nearly-duplicate structures 2018-09-19 21:31:46 -07:00
Chris Robinson
6eb980d1b2 Remove a couple duplicate functions 2018-09-19 21:09:19 -07:00
Chris Robinson
7f4441ffbe Handle the bsinc C resampler like the others 2018-09-17 04:07:56 -07:00
Chris Robinson
21dc2c761d Check for and use copysignf 2018-08-29 03:53:09 -07:00
Chris Robinson
529f387695 Use a separate method to warp the azimuth for plain stereo output 2018-08-29 01:45:27 -07: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
9c5307a48a Rename BiquadState to BiquadFilter 2018-04-04 18:07:46 -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
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
5b11129eaa Use a function pointer for applying the dry mix post-process 2018-02-10 15:50:05 -08:00
Chris Robinson
b99e64a0e3 Provide more descriptive messages to disconnection events 2018-02-03 13:54:42 -08:00
Chris Robinson
40bda4d93f Add a disconnected event type 2018-02-03 01:07:06 -08:00
Chris Robinson
bcdc399029 Send buffer completed events when enabled 2018-02-01 01:36:03 -08:00
Chris Robinson
248832b266 Use a voice flag to indicate it being static 2018-01-16 18:07:59 -08:00
Chris Robinson
e80b016cbe Use a global RowMixerFunc 2018-01-16 12:18:59 -08:00
Chris Robinson
5deb1df8db Add min/max/clamp functions for size_t 2018-01-16 09:39:28 -08:00
Chris Robinson
15f9d15ba0 Avoid using macros to access anonymous structures 2018-01-11 03:45:23 -08:00
Chris Robinson
279799ad70 Don't return whether the bsinc filter cuts or not 2018-01-10 19:20:58 -08:00
Chris Robinson
ef63ec3fe9 Use one macro to handle both resample padding sizes 2018-01-09 23:55:59 -08:00
Chris Robinson
70973035de Use a separate function to get the cubic value 2018-01-07 17:24:29 -08:00
Chris Robinson
c423b6c8b7 Remove the sinc4 table 2018-01-07 05:58:52 -08:00
Chris Robinson
4cc1c64646 Replace the sinc4 resampler with cubic
Turns out the C version of the cubic resampler is just slightly faster than
even the SSE3 version of the FIR4 resampler. This is likely due to not using a
64KB random-access lookup table along with unaligned loads, both offseting the
gains from SSE.
2018-01-07 05:32:07 -08:00
Chris Robinson
2346426b6e Make MixSamples non-static global 2017-12-17 21:48:07 -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
101d284a18 Update the context state properties separately
The context state properties are less likely to change compared to the listener
state, and future changes may prefer more infrequent updates to the context
state.

Note that this puts the MetersPerUnit in as a context state, even though it's
handled through the listener functions. Considering the infrequency that it's
updated at (generally set just once for the context's lifetime), it makes more
sense to put it there than with the more frequently updated listener
properties. The aforementioned future changes would also prefer MetersPerUnit
to not be updated unnecessarily.
2017-09-27 08:55:42 -07:00
Chris Robinson
369f52a0d7 Add an option to ignore the app's speed of sound for reverb decay 2017-09-22 05:42:04 -07:00
Chris Robinson
a4d357de06 Add a higher quality bsinc resampler using 24 sample points
This improves the transition width, allowing more of the higher frequencies
remain audible. It would be preferrable to have an upper limit of 32 points
instead of 48, to reduce the overall table size and the CPU cost for down-
sampling.
2017-08-27 10:16:36 -07:00
Chris Robinson
561e95528f Rename the bsinc resampler to bsinc12 2017-08-25 05:52:19 -07:00
Chris Robinson
5f50d085ad Pass the filter entry to apply to resample_fir4 2017-08-18 19:20:30 -07:00
Chris Robinson
5008024e73 Store the sinc4 table in the filter state
Also rename the resampler functions to remove the unnecessary '32' token.
2017-08-16 18:09:53 -07:00
Chris Robinson
f9c09cc845 Simplify bsinc filter storage in the filter state
Rather than storing individual pointers to filter, scale delta, phase delta,
and scale  phase delta entries, per phase index, the new table layout makes it
trivial to access the per-phase filter and delta entries given the base offset
and coefficient count.
2017-08-16 02:45:25 -07:00