Chris Robinson [Sat, 9 Mar 2024 07:41:04 +0000 (8 23:41 -0800)]
Use span's iterators for FlexArray
Chris Robinson [Sat, 9 Mar 2024 03:18:54 +0000 (8 19:18 -0800)]
Use a span for the distance compensation buffer
Chris Robinson [Fri, 8 Mar 2024 09:20:42 +0000 (8 01:20 -0800)]
Avoid some more raw pointers
Chris Robinson [Fri, 8 Mar 2024 07:41:22 +0000 (7 23:41 -0800)]
Remove const from a return type
Chris Robinson [Wed, 6 Mar 2024 08:26:55 +0000 (6 00:26 -0800)]
Use spans instead of raw pointers for the filters' output
Chris Robinson [Wed, 6 Mar 2024 07:30:46 +0000 (5 23:30 -0800)]
Use spans more for voice processing
Chris Robinson [Mon, 4 Mar 2024 18:23:00 +0000 (4 10:23 -0800)]
Fix buffer load size for negative buffer offsets
Chris Robinson [Mon, 4 Mar 2024 18:22:11 +0000 (4 10:22 -0800)]
Rename some 'pan's to 'gain's for clarity
Chris Robinson [Mon, 4 Mar 2024 05:21:09 +0000 (3 21:21 -0800)]
Use an iterator to iterate over the channel orders
Chris Robinson [Mon, 4 Mar 2024 02:32:17 +0000 (3 18:32 -0800)]
Iterate over the async events directly
Chris Robinson [Mon, 4 Mar 2024 00:03:10 +0000 (3 16:03 -0800)]
Give names to unnamed structs
Chris Robinson [Sun, 3 Mar 2024 17:17:40 +0000 (3 09:17 -0800)]
Add an in-progress extension for panning sources
Chris Robinson [Sun, 3 Mar 2024 04:25:10 +0000 (2 20:25 -0800)]
Add the _SOFT suffix to the I32 UHJ formats
The existing UHJ formats are provided by AL_SOFT_UHJ[_ex] which already have
the _SOFT suffix, so this just makes it consistent.
Chris Robinson [Sat, 2 Mar 2024 22:05:43 +0000 (2 14:05 -0800)]
Fix up some includes
Chris Robinson [Sat, 2 Mar 2024 21:49:21 +0000 (2 13:49 -0800)]
Move storage format definitions to a separate file
Darryl Pogue [Sat, 2 Mar 2024 22:33:41 +0000 (2 14:33 -0800)]
Fix PFFFT compilation for PowerPC (#955)
Fixes taken from 2 upstream commits:
- https://bitbucket.org/jpommier/pffft/commits/
ccd5628652f86d193cad887447e2546ffb7c1b28
- https://bitbucket.org/jpommier/pffft/commits/
233c26659185ff55958e96e4c25f3fcafe249a65
Chris Robinson [Thu, 29 Feb 2024 21:04:37 +0000 (29 13:04 -0800)]
Use spans for PPhaseResampler::process
Chris Robinson [Thu, 29 Feb 2024 19:19:38 +0000 (29 11:19 -0800)]
Fix some clang-tidy complaints
Chris Robinson [Thu, 29 Feb 2024 17:41:30 +0000 (29 09:41 -0800)]
Use spans for preparing samples from buffers
Chris Robinson [Thu, 29 Feb 2024 16:56:20 +0000 (29 08:56 -0800)]
Use the correct return type for subspan
Chris Robinson [Thu, 29 Feb 2024 13:25:15 +0000 (29 05:25 -0800)]
Reduce the depth of some branches
Chris Robinson [Wed, 28 Feb 2024 14:02:30 +0000 (28 06:02 -0800)]
Make mSampleData an array of floats instead of an array of arrays
This helps reduce the amount of unused memory in between the mixing channels'
storage, for better cache utilization.
Chris Robinson [Wed, 28 Feb 2024 12:37:04 +0000 (28 04:37 -0800)]
Add voice properties to do left-right panning
Chris Robinson [Mon, 26 Feb 2024 15:56:02 +0000 (26 07:56 -0800)]
Use a proper type for the resampler padding length
Chris Robinson [Mon, 26 Feb 2024 15:24:58 +0000 (26 07:24 -0800)]
Check when resampling to do a simple copy
Chris Robinson [Mon, 26 Feb 2024 14:41:56 +0000 (26 06:41 -0800)]
Collapse some nested ifs
Chris Robinson [Mon, 26 Feb 2024 09:02:01 +0000 (26 01:02 -0800)]
Fix cubic_tables.h includes
Chris Robinson [Mon, 26 Feb 2024 08:44:30 +0000 (26 00:44 -0800)]
Explicitly use load and store for atomics
Chris Robinson [Sun, 25 Feb 2024 08:44:59 +0000 (25 00:44 -0800)]
Check if a file exists instead of relying on an exception
Chris Robinson [Sat, 24 Feb 2024 15:55:02 +0000 (24 07:55 -0800)]
Pass a span to ApplyDistanceComp
Chris Robinson [Sat, 24 Feb 2024 15:44:54 +0000 (24 07:44 -0800)]
Calculate the ending mix counter value earlier
Chris Robinson [Sat, 24 Feb 2024 07:52:58 +0000 (23 23:52 -0800)]
Check that writeAdvance and readAdvance don't over/underflow
Chris Robinson [Sat, 24 Feb 2024 07:24:30 +0000 (23 23:24 -0800)]
Rename some variables for clarity
tyan0 [Fri, 23 Feb 2024 16:23:20 +0000 (24 01:23 +0900)]
Fix a bug that playback via portaudio does not work at all (#975)
Chris Robinson [Fri, 23 Feb 2024 16:08:24 +0000 (23 08:08 -0800)]
Properly use std::hardware_destructive_interference_size
Chris Robinson [Fri, 23 Feb 2024 15:49:09 +0000 (23 07:49 -0800)]
Allow using the total capacity of the RingBuffer
Chris Robinson [Fri, 23 Feb 2024 14:57:08 +0000 (23 06:57 -0800)]
Make better use of cache lines for the ringbuffer indices
Chris Robinson [Fri, 23 Feb 2024 11:36:45 +0000 (23 03:36 -0800)]
Store the filter table directly in the cubic filter object
Chris Robinson [Wed, 21 Feb 2024 12:34:40 +0000 (21 04:34 -0800)]
Replace an array with a switch
Chris Robinson [Wed, 21 Feb 2024 12:18:34 +0000 (21 04:18 -0800)]
Make AL[C]_EXT_direct_context public
Chris Robinson [Wed, 21 Feb 2024 05:44:36 +0000 (20 21:44 -0800)]
Give better names to the wrapper function parameters
Chris Robinson [Mon, 19 Feb 2024 05:36:16 +0000 (18 21:36 -0800)]
Initialize a variable when declaring it
Chris Robinson [Mon, 19 Feb 2024 04:20:51 +0000 (18 20:20 -0800)]
Add a couple missing includes
Chris Robinson [Sun, 18 Feb 2024 09:14:47 +0000 (18 01:14 -0800)]
Promote a variable to size_t for the multiply, not after
Chris Robinson [Sun, 18 Feb 2024 06:19:50 +0000 (17 22:19 -0800)]
Replace a few more for/while loops with std::generator
Chris Robinson [Sun, 18 Feb 2024 06:19:13 +0000 (17 22:19 -0800)]
Don't assume a span is static sized
Chris Robinson [Sat, 17 Feb 2024 10:51:24 +0000 (17 02:51 -0800)]
Add a slightly more efficient cubic resampler
Not as beneficial as I'd have hoped, but there does seem to be a slight
improvement.
Chris Robinson [Fri, 16 Feb 2024 04:42:31 +0000 (15 20:42 -0800)]
Avoid calculating an extra bsinc phase index
It's just the first index offset by 1, which is easy enough to calculate the
deltas from.
Chris Robinson [Fri, 16 Feb 2024 01:04:36 +0000 (15 17:04 -0800)]
Use a variant to control the modulator effect generator
Chris Robinson [Fri, 16 Feb 2024 00:45:49 +0000 (15 16:45 -0800)]
Clean up some includes
Chris Robinson [Thu, 15 Feb 2024 23:50:56 +0000 (15 15:50 -0800)]
Use the cubic filter bit-depth for the chorus depth/delay scale
Chris Robinson [Thu, 15 Feb 2024 23:19:39 +0000 (15 15:19 -0800)]
Use std::generate instead of for loops for resampling
Chris Robinson [Wed, 14 Feb 2024 22:10:31 +0000 (14 14:10 -0800)]
Use the gaussian filter table for the chorus effect
Chris Robinson [Wed, 14 Feb 2024 21:56:15 +0000 (14 13:56 -0800)]
Move the reverb's cubic filter to a shared header
Chris Robinson [Wed, 14 Feb 2024 08:03:08 +0000 (14 00:03 -0800)]
Use a 4-point Gaussian filter for cubic resampling
Chris Robinson [Tue, 13 Feb 2024 22:08:41 +0000 (13 14:08 -0800)]
Avoid a few uses of &array[idx]
Chris Robinson [Tue, 13 Feb 2024 18:45:15 +0000 (13 10:45 -0800)]
Update some includes
Chris Robinson [Tue, 13 Feb 2024 06:17:14 +0000 (12 22:17 -0800)]
Call the correct delete function
Chris Robinson [Tue, 13 Feb 2024 06:09:26 +0000 (12 22:09 -0800)]
Fix macOS support for tss
Chris Robinson [Tue, 13 Feb 2024 05:16:56 +0000 (12 21:16 -0800)]
Make the context error state thread-local
This is very much not specified by the standard, but it is necessary to allow
thread-safe usage and error checking. Otherwise, if two threads are making AL
calls (say, one thread handling a streaming buffer queue and another to play
and update sound sources) and checking for errors, it's possible for one thread
to generate an error that the other thread reads, causing the one thread to not
see the error and think its calls were okay despite the failure, and the other
thread to think its calls caused an error when it was actually successful. This
is a possible, if not likely, scenario in existing apps.
This probably violates the current standard, however I can't think of a useful
scenario where this would be a significant problem. It would essentially rely
on the app knowingly reading errors from a separate thread than the one that
generated them, which would be a problem for actually reacting to the failed
call or having useful information to log the error with. That's if the app is
even generating errors to begin with.
If this does prove to be a problem, a compat option can be added to restore the
original behavior. Or in the worst case, revert to the original behavior by
default and have an opt-in flag for apps that want thread-local error state.
But for now, let's assume existing apps will be fine, if not fix potention race
conditions.
Chris Robinson [Sun, 11 Feb 2024 02:53:54 +0000 (10 18:53 -0800)]
Clear the sorted array for the default reverb auxslot
Chris Robinson [Sat, 10 Feb 2024 19:36:47 +0000 (10 11:36 -0800)]
Don't do geometric reflections for the late reverb
At this point, the vector all-pass is already applying a diffusion-based
scattering matrix, which the geometric reflections would compound with.
Chris Robinson [Fri, 9 Feb 2024 23:56:46 +0000 (9 15:56 -0800)]
Clean up some includes
Chris Robinson [Thu, 8 Feb 2024 19:02:48 +0000 (8 11:02 -0800)]
Make some parameter names consistent
Chris Robinson [Thu, 8 Feb 2024 18:15:37 +0000 (8 10:15 -0800)]
Invert the phase of reflected signals in reverb
Chris Robinson [Thu, 8 Feb 2024 09:48:57 +0000 (8 01:48 -0800)]
Pass a span to the data stream databuf
Chris Robinson [Thu, 8 Feb 2024 07:37:52 +0000 (7 23:37 -0800)]
Constify a span's type that's only read
Chris Robinson [Wed, 7 Feb 2024 17:42:22 +0000 (7 09:42 -0800)]
Silence unused parameter warnings
Chris Robinson [Wed, 7 Feb 2024 13:42:20 +0000 (7 05:42 -0800)]
Remove al::ifstream wrapper
Unnecessary since std::filesystem can handle UTF-8 path names
Chris Robinson [Wed, 7 Feb 2024 13:07:34 +0000 (7 05:07 -0800)]
Fix up some includes
Chris Robinson [Wed, 7 Feb 2024 07:39:00 +0000 (6 23:39 -0800)]
Remove a couple unnecessary macros
Chris Robinson [Tue, 6 Feb 2024 11:39:09 +0000 (6 03:39 -0800)]
Clean up some variable initialization
Chris Robinson [Tue, 6 Feb 2024 10:31:28 +0000 (6 02:31 -0800)]
Replace an assertion macro with an inline function
Chris Robinson [Tue, 6 Feb 2024 09:35:18 +0000 (6 01:35 -0800)]
Use a unique_ptr to manager PFFFT_Setup objects
Chris Robinson [Mon, 5 Feb 2024 12:43:16 +0000 (5 04:43 -0800)]
Make al::span a bit more conformant
And check the size for fixed-size span initialization
Chris Robinson [Mon, 5 Feb 2024 07:33:07 +0000 (4 23:33 -0800)]
Use wstrings for retriving the exe path on Windows
Chris Robinson [Sun, 4 Feb 2024 13:19:14 +0000 (4 05:19 -0800)]
Clarify ambiguity between size_t and DWORD
Chris Robinson [Sun, 4 Feb 2024 12:32:12 +0000 (4 04:32 -0800)]
Avoid hardcoding some sublist counts
Chris Robinson [Sun, 4 Feb 2024 12:30:38 +0000 (4 04:30 -0800)]
Remove custom minz/maxz functions
Chris Robinson [Sun, 4 Feb 2024 10:10:04 +0000 (4 02:10 -0800)]
Separate integer division from floating point conversion
Chris Robinson [Sun, 4 Feb 2024 07:44:08 +0000 (3 23:44 -0800)]
Avoid extraneous angular conversions
Chris Robinson [Sun, 4 Feb 2024 07:35:26 +0000 (3 23:35 -0800)]
Remove some custom mix/max/clamp functions
Chris Robinson [Sat, 3 Feb 2024 08:01:22 +0000 (3 00:01 -0800)]
Use the correct length for the reveb mixing matrix multiply
Chris Robinson [Sat, 3 Feb 2024 01:40:52 +0000 (2 17:40 -0800)]
Use a single buffer for the reverb delay input
The room gain/lf/hf is applied when tapping for the early reflections, which
makes the initial input delay buffer the same for both pipelines, allowing it
to be shared. Each pipeline fades its early reflection input taps to create a
smoother transition.
Chris Robinson [Fri, 2 Feb 2024 12:59:06 +0000 (2 04:59 -0800)]
Check the sample rate limit for loading HRTF
Chris Robinson [Fri, 2 Feb 2024 12:42:42 +0000 (2 04:42 -0800)]
Properly sort the loaded HRTFs
Chris Robinson [Fri, 2 Feb 2024 09:51:01 +0000 (2 01:51 -0800)]
Use string_view a bit more
Chris Robinson [Fri, 2 Feb 2024 08:52:46 +0000 (2 00:52 -0800)]
Better handle exceptions when loading mhr files
Chris Robinson [Thu, 1 Feb 2024 22:51:53 +0000 (1 14:51 -0800)]
Recognize the IEC61937 enum in newer Oboe versions
Chris Robinson [Thu, 1 Feb 2024 07:48:33 +0000 (31 23:48 -0800)]
Separate a lambda definition from calling it
Chris Robinson [Thu, 1 Feb 2024 07:31:30 +0000 (31 23:31 -0800)]
Replace another loop with any_of
Chris Robinson [Thu, 1 Feb 2024 00:11:04 +0000 (31 16:11 -0800)]
Silence some clang-tidy warnings
Chris Robinson [Wed, 31 Jan 2024 23:31:58 +0000 (31 15:31 -0800)]
Reset the offset for each line in Allpass4::process
Chris Robinson [Wed, 31 Jan 2024 01:09:29 +0000 (30 17:09 -0800)]
Check the string_view length before reading it
Chris Robinson [Tue, 30 Jan 2024 11:49:50 +0000 (30 03:49 -0800)]
One more fix for Apple
Chris Robinson [Tue, 30 Jan 2024 11:44:01 +0000 (30 03:44 -0800)]
Add a missing include for macOS
Chris Robinson [Tue, 30 Jan 2024 11:42:02 +0000 (30 03:42 -0800)]
Make sure the winrt::hstring gets used as a wstring
Chris Robinson [Tue, 30 Jan 2024 10:57:37 +0000 (30 02:57 -0800)]
Use std::filesystem to construct config file paths
Chris Robinson [Tue, 30 Jan 2024 06:23:47 +0000 (29 22:23 -0800)]
Use string_view instead of temporary strings
Chris Robinson [Tue, 30 Jan 2024 06:17:42 +0000 (29 22:17 -0800)]
Remove some unneeded elses