Commit Graph

380 Commits (master)

Author SHA1 Message Date
Chris Robinson 524f254c3a Use a bind statement instead of a lambda 2022-08-29 01:12:09 -07:00
Chris Robinson 7dcd2a86b8 Avoid __try on ARMv7 targets with MSVC 2022-07-24 17:09:50 -07:00
Chris Robinson 6dd7edd2e0 Make some Vector and Matrix methods constexpr 2022-07-05 09:27:44 -07:00
Hongtae Kim 0474a3678e
Added missing header file for std::assume_aligned. (C++20) (#724) 2022-07-05 09:08:37 -07:00
Chris Robinson a5729d1ff6 Check the container type given to DEF_NEWDEL and DEF_FAM_NEWDEL
There's apparently no way to get the containing class/struct type from a static
member function, and operator new/delete are implicitly static member functions
so the macros to define them need to be told the type to allocate for. This
ensures the type specified matches the containing type.
2022-05-16 23:56:07 -07:00
Chris Robinson f2858ac865 Resample before frequency analysis
We want to resample before minimum phase reconstruction since that changes the
phase relationship of the sampled signal, introducing a slight bit of noise
from truncated sampling. It's not clear that the frequency domain resampling
method is accurate, so resampling prior to frequency analysis is an alternative
to ensure the resulting frequencies are given the proper phase for sampling.

This also cleans up some micro allocations in loops.
2022-05-13 15:40:15 -07:00
Chris Robinson 4b557f15d0 Workaround a MinGW issue with str(n)casecmp macros 2022-04-26 02:31:06 -07:00
Chris Robinson 7c33c1b2e6 Use bool() instead of bool{} to cast
To work around a MinGW GCC 5 issue.
2022-04-25 21:11:10 -07:00
Chris Robinson 6a9fe1e2c1 Rename lerp to avoid conflicts with C++20's std::lerp 2022-04-06 17:41:24 -07:00
Chris Robinson abfb584f14 Simplify al::byte
It's just an alias for unsigned char now, and no longer strongly-typed like
std::byte.
2022-03-30 15:52:15 -07:00
Chris Robinson a033f8c274 Add missing include 2022-03-30 01:44:09 -07:00
Chris Robinson 51796ccbed Move assume_aligned to opthelpers.h and define force_inline 2022-03-30 01:33:32 -07:00
Chris Robinson 1410a8e03a Slightly improve code flow for ASSUME 2022-03-29 22:13:34 -07:00
Glyn Leine a752d920d1
constexpr functions are not allowed to have static variables, and if they are constexpr anyways then them being static has no benifit (#677) 2022-03-29 08:46:49 -07:00
Chris Robinson b9ff9fa6d9 Avoid a variable to subscript an array in offsetof 2022-03-26 17:25:57 -07:00
Chris Robinson 6d0bd1a532 Simplify some move assignments 2022-03-25 16:36:46 -07:00
Chris Robinson b80dc50495 Protect intrusive_ptr and ComPtr from moving to itself 2022-03-25 03:47:43 -07:00
Chris Robinson 1ee34556a6 Try to improve assume_aligned for other compilers 2022-03-25 00:13:06 -07:00
Chris Robinson 88d5c47e37 Simplify a couple offsetof statements 2022-03-24 16:12:23 -07:00
Chris Robinson 843a5aac6b Forward the (un)likely expression being cast to bool 2022-02-24 06:43:14 -08:00
Chris Robinson b1559227b0 Make some structs nested 2022-02-23 10:37:09 -08:00
Chris Robinson 2564a3750f Remove unused atomic_invflag 2022-02-23 06:42:09 -08:00
Chris Robinson 625b0d380a Use function overloading to handle pthread_setname_np differences 2022-02-23 05:56:29 -08:00
Chris Robinson 598c1aa224 Default initialize a union
To silence an errant GCC warning
2022-02-23 03:03:20 -08:00
Chris Robinson cadf0d1de5 Make some local constexpr variables static 2022-02-23 01:29:28 -08:00
Chris Robinson 7176247529 Avoid an implicit char-to-bool conversion 2022-02-23 00:04:29 -08:00
Chris Robinson d06ed618d3 Avoid using an if_constexpr macro
It doesn't actually use if constexpr, and compilers are smart enough to
optimize. Some functions can use templates instead.
2022-02-22 03:03:44 -08:00
Chris Robinson 72ddb6351e Rename some variables to show the relevant bit pattern 2022-02-22 00:53:58 -08:00
Chris Robinson 6c643e59e9 Make a couple more operator bools explicit 2022-02-20 22:04:19 -08:00
Chris Robinson 0e26e0809d Fix gain_to_level_mb 2022-02-20 00:02:56 -08:00
Chris Robinson f9ed6f85c8 Don't implicitly convert optionals to bools 2022-02-14 03:05:35 -08:00
Chris Robinson 278792eae7 Remove an unnecessary template parameter hack 2022-02-14 01:01:19 -08:00
Chris Robinson 784929f36d Inherit the atomic_flag constructors in atomic_invflag 2022-02-06 11:08:34 -08:00
Chris Robinson 816bd8ab30 Move ALSOFT_EAX definition to config.h
And disable it by default for non-Windows targets
2022-01-30 05:42:44 -08:00
Chris Robinson c9d59ebc4a Simplify FFT complex arg handling a bit 2022-01-30 04:55:13 -08:00
Boris I. Bendovsky 19ed994dc3
Add EAX extensions (EAX 2.0-5.0, X-RAM) (#632)
* Add EAX extensions (EAX 2.0-5.0, X-RAM)

* Comment out C++17 leftovers

* Remove everything related to patching

* Update alsoftrc.sample

* Rewrite integration

* Fix GCC compilation under Linux

* Always reset EAX effect properties when loading it into FX slot
2022-01-30 04:47:32 -08:00
Chris Robinson 619249371a Remove math_defs.h 2022-01-27 04:04:41 -08:00
Chris Robinson f8ac1ffe80 Get rid of MathDefs 2022-01-27 02:59:07 -08:00
Chris Robinson 1bbea9cd30 Start and use a standard-like numbers header 2022-01-27 01:38:39 -08:00
Chris Robinson 423888b816 Use precalculated lookup tables to swap FFT elements
Rather than going through the whole array, calculating the bit-reversed index
of each element, and not doing anything for more than half of them.
2022-01-27 00:39:36 -08:00
Chris Robinson 7ac336b078 Remove a couple unnecessary overloads 2022-01-04 19:27:29 -08:00
Chris Robinson ad3095a03d Avoid duplicate definitions of the same wrapper functions 2022-01-04 19:27:29 -08:00
Chris Robinson ad9c2d77c8 Add a couple more methods to al::optional 2021-12-31 15:28:47 -08:00
Chris Robinson a88803f21e Simplify and combine a couple macros 2021-12-18 05:19:22 -08:00
Chris Robinson bdc9d6955f Workaround a GCC bug with noexcept(this->...) 2021-11-14 05:59:06 -08:00
Chris Robinson ad3d82c3f4 Fix up some al::optional ops 2021-11-08 16:48:33 -08:00
Chris Robinson c06abe2dfe Make al::optional constexpr 2021-11-07 01:24:57 -08:00
Chris Robinson 837652624b Remove an unnecessary noexcept 2021-10-23 08:14:30 -07:00
Chris Robinson ed3e40c22d Add more noexcept 2021-10-14 12:44:05 -07:00
Chris Robinson 8305973e7a Properly noexcept the destroy methods 2021-10-14 12:44:05 -07:00