336 Commits

Author SHA1 Message Date
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
Chris Robinson
6a3c4c09f8 Explicitly declare optional_storage's default constructor
This should help MSVC
2021-10-10 05:12:24 -07:00
Chris Robinson
87e88e97e2 Try again to satisfy MSVC 2021-10-09 08:41:08 -07:00
Chris Robinson
85d98e32ed Explicitly initialize the first union member 2021-10-09 05:56:39 -07:00
Chris Robinson
2d3b501fd8 Add more noexcept when possible
And try to fix MSVC missing a constructor
2021-10-09 05:30:16 -07:00
Chris Robinson
c893ca0491 Always define optional::operator=.
MSVC doesn't seem to like using enable_if for special member functions.
2021-10-09 03:39:33 -07:00
Chris Robinson
720bedb455 Make optional more trivial when possible 2021-10-08 18:08:48 -07:00
Chris Robinson
e3b8f8fe27 Make a construct_at method amd use it 2021-10-08 11:05:36 -07:00
Chris Robinson
8da4eaff29 Add the gnu::malloc attribute to al_malloc and al_calloc
This helps the compiler know the returned pointer won't alias another pointer
or existing object, since it's a fresh allocation, and is unlikely to return
nullptr.
2021-10-07 13:37:47 -07:00
Chris Robinson
38d3ea3501 Make simpler likely/unlikely functions and use them in some places 2021-10-03 06:41:14 -07:00
Chris Robinson
365ff8302e Add PipeWire capture support 2021-08-21 13:27:14 -07:00
Chris Robinson
440b59704c Fix al::optional operator* 2021-07-31 14:21:46 -07:00
Chris Robinson
58a9549a58 Handle the listener position separate from the rotation matrix
It's too unstable with larger vectors. Even when the source and listener
positions are the same, floating point precision can cause noticeable rounding
errors.
2021-05-25 14:08:16 -07:00
Chris Robinson
fc7d55be4b Don't bother with al string types 2021-04-24 11:50:49 -07:00
Chris Robinson
29cf7ebb75 Make an inverted atomic flag type and use it
The inverted atomic flag replaces test_and_set+clear with test_and_clear+set,
essentially inverting the flag status. This makes more logical sense for
flagging dirty state, which is less confusing than flagging clean state. The
one caveat is ATOMIC_FLAG_INIT (or default construction in C++20) initializes
the state to true rather than false.
2021-04-15 15:17:04 -07:00
Chris Robinson
8ab5e5dba2 Move the UHJ phase shifter to a common header 2021-03-28 06:09:11 -07:00
Chris Robinson
1d57db6836 Move the ComPtr wrapper to a common header 2021-03-08 22:47:50 -08:00
Chris Robinson
0f7ed495e1 Use a fast native type for the backup popcount 2021-03-02 22:58:36 -08:00
Chris Robinson
20057b848c Calculate the square root after checking the limit 2021-01-29 09:56:38 -08:00
Chris Robinson
3702ee669b Add a panning "deadzone" for spatialized sources
It is now the greater of 'epsilon' (1 / 2**23) or ref_distance/1024.
2021-01-28 08:36:49 -08:00
Chris Robinson
ac5d40e40a Move al::deque to a common header 2021-01-25 09:24:10 -08:00
Chris Robinson
3142fb30ea Remove some unnecessary function attributes
The alloc_size was wrong anyway since the function parameter takes the number
of objects to be allocated and the attribute declares which is the number of
bytes. The assume_aligned is unnecessary since the function is inlined and
al_malloc/al_calloc already have appropriate attributes for the compiler to
see.
2021-01-23 03:27:18 -08:00
Chris Robinson
f576a35363 Don't bother checking for std::aligned_alloc 2021-01-22 08:53:44 -08:00
Chris Robinson
b3dc99a467 Fix __cplusplus value check 2021-01-22 06:00:36 -08:00
Chris Robinson
cff3693387 Use if constexpr when possible 2021-01-22 05:50:27 -08:00
Chris Robinson
da59ad5105 Make PopCount and CountTrailingZeros more standard-like 2021-01-22 04:58:42 -08:00
Chris Robinson
5ff5fd8ecc Use a standard bitset for bitfield flags 2021-01-22 00:00:10 -08:00
Chris Robinson
5729e1004d Make the endian test more C++-like 2021-01-21 23:21:18 -08:00
Chris Robinson
b99adb623d Remove the invalid noexcept specification 2021-01-08 19:23:17 -08:00
Chris Robinson
1f24f5caa1 Ensure the endian test is constexpr 2021-01-06 18:04:04 -08:00
Chris Robinson
1f51de9983 Make optional trivially destructible if the stored type is 2021-01-02 14:24:53 -08:00
Chris Robinson
d6495b35df Fix comment typo 2021-01-01 15:35:46 -08:00
Chris Robinson
1327aca9d7 Don't use templates unnecessarily 2021-01-01 15:35:14 -08:00
Chris Robinson
4c0f77c13e Remove some unnecessary constructors 2020-12-27 06:43:59 -08:00
Chris Robinson
7833cfa8de Make FlexArray trivially destructible when possible 2020-12-27 04:29:54 -08:00
Chris Robinson
eedc42890f Move alexcpt to core 2020-12-24 22:49:55 -08:00
David CARLIER
8c4c14ea73
fast_roundf implementations in asm for ARM64. (#511) 2020-12-24 22:48:57 -08:00
Chris Robinson
7d2e21334c Move the AL error enum out of base_exception 2020-12-17 16:46:21 -08:00
Chris Robinson
f38919eecc Avoid using a hidden unnamed template parameter 2020-12-15 23:47:47 -08:00
Chris Robinson
1679ab937e Reorder definitions to keep them near each other 2020-12-05 06:40:06 -08:00
Chris Robinson
16c7d1816d Remove some unnecessary inlines and includes 2020-12-05 06:30:13 -08:00
Chris Robinson
7485e402c1 Avoid a REQUIRES macro for SFINAE 2020-12-05 05:57:18 -08:00
Chris Robinson
8a352d25f9 Move the ringbuffer to common 2020-12-05 03:28:19 -08:00
Chris Robinson
630a3b8cbd Move lerp/cubic to alnumeric.h 2020-12-04 11:15:50 -08:00
Chris Robinson
645d354ffa Add a close method to the win32 ifstream 2020-11-16 14:51:50 -08:00