openal-soft.git
7 weeks agoUse span's iterators for FlexArray
Chris Robinson [Sat, 9 Mar 2024 07:41:04 +0000 (8 23:41 -0800)]
Use span's iterators for FlexArray

7 weeks agoUse a span for the distance compensation buffer
Chris Robinson [Sat, 9 Mar 2024 03:18:54 +0000 (8 19:18 -0800)]
Use a span for the distance compensation buffer

7 weeks agoAvoid some more raw pointers
Chris Robinson [Fri, 8 Mar 2024 09:20:42 +0000 (8 01:20 -0800)]
Avoid some more raw pointers

8 weeks agoRemove const from a return type
Chris Robinson [Fri, 8 Mar 2024 07:41:22 +0000 (7 23:41 -0800)]
Remove const from a return type

8 weeks agoUse spans instead of raw pointers for the filters' output
Chris Robinson [Wed, 6 Mar 2024 08:26:55 +0000 (6 00:26 -0800)]
Use spans instead of raw pointers for the filters' output

8 weeks agoUse spans more for voice processing
Chris Robinson [Wed, 6 Mar 2024 07:30:46 +0000 (5 23:30 -0800)]
Use spans more for voice processing

8 weeks agoFix buffer load size for negative buffer offsets
Chris Robinson [Mon, 4 Mar 2024 18:23:00 +0000 (4 10:23 -0800)]
Fix buffer load size for negative buffer offsets

8 weeks agoRename some 'pan's to 'gain's for clarity
Chris Robinson [Mon, 4 Mar 2024 18:22:11 +0000 (4 10:22 -0800)]
Rename some 'pan's to 'gain's for clarity

8 weeks agoUse an iterator to iterate over the channel orders
Chris Robinson [Mon, 4 Mar 2024 05:21:09 +0000 (3 21:21 -0800)]
Use an iterator to iterate over the channel orders

8 weeks agoIterate over the async events directly
Chris Robinson [Mon, 4 Mar 2024 02:32:17 +0000 (3 18:32 -0800)]
Iterate over the async events directly

8 weeks agoGive names to unnamed structs
Chris Robinson [Mon, 4 Mar 2024 00:03:10 +0000 (3 16:03 -0800)]
Give names to unnamed structs

2 months agoAdd an in-progress extension for panning sources
Chris Robinson [Sun, 3 Mar 2024 17:17:40 +0000 (3 09:17 -0800)]
Add an in-progress extension for panning sources

2 months agoAdd the _SOFT suffix to the I32 UHJ formats
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.

2 months agoFix up some includes
Chris Robinson [Sat, 2 Mar 2024 22:05:43 +0000 (2 14:05 -0800)]
Fix up some includes

2 months agoMove storage format definitions to a separate file
Chris Robinson [Sat, 2 Mar 2024 21:49:21 +0000 (2 13:49 -0800)]
Move storage format definitions to a separate file

2 months agoFix PFFFT compilation for PowerPC (#955)
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

2 months agoUse spans for PPhaseResampler::process
Chris Robinson [Thu, 29 Feb 2024 21:04:37 +0000 (29 13:04 -0800)]
Use spans for PPhaseResampler::process

2 months agoFix some clang-tidy complaints
Chris Robinson [Thu, 29 Feb 2024 19:19:38 +0000 (29 11:19 -0800)]
Fix some clang-tidy complaints

2 months agoUse spans for preparing samples from buffers
Chris Robinson [Thu, 29 Feb 2024 17:41:30 +0000 (29 09:41 -0800)]
Use spans for preparing samples from buffers

2 months agoUse the correct return type for subspan
Chris Robinson [Thu, 29 Feb 2024 16:56:20 +0000 (29 08:56 -0800)]
Use the correct return type for subspan

2 months agoReduce the depth of some branches
Chris Robinson [Thu, 29 Feb 2024 13:25:15 +0000 (29 05:25 -0800)]
Reduce the depth of some branches

2 months agoMake mSampleData an array of floats instead of an array of arrays
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.

2 months agoAdd voice properties to do left-right panning
Chris Robinson [Wed, 28 Feb 2024 12:37:04 +0000 (28 04:37 -0800)]
Add voice properties to do left-right panning

2 months agoUse a proper type for the resampler padding length
Chris Robinson [Mon, 26 Feb 2024 15:56:02 +0000 (26 07:56 -0800)]
Use a proper type for the resampler padding length

2 months agoCheck when resampling to do a simple copy
Chris Robinson [Mon, 26 Feb 2024 15:24:58 +0000 (26 07:24 -0800)]
Check when resampling to do a simple copy

2 months agoCollapse some nested ifs
Chris Robinson [Mon, 26 Feb 2024 14:41:56 +0000 (26 06:41 -0800)]
Collapse some nested ifs

2 months agoFix cubic_tables.h includes
Chris Robinson [Mon, 26 Feb 2024 09:02:01 +0000 (26 01:02 -0800)]
Fix cubic_tables.h includes

2 months agoExplicitly use load and store for atomics
Chris Robinson [Mon, 26 Feb 2024 08:44:30 +0000 (26 00:44 -0800)]
Explicitly use load and store for atomics

2 months agoCheck if a file exists instead of relying on an exception
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

2 months agoPass a span to ApplyDistanceComp
Chris Robinson [Sat, 24 Feb 2024 15:55:02 +0000 (24 07:55 -0800)]
Pass a span to ApplyDistanceComp

2 months agoCalculate the ending mix counter value earlier
Chris Robinson [Sat, 24 Feb 2024 15:44:54 +0000 (24 07:44 -0800)]
Calculate the ending mix counter value earlier

2 months agoCheck that writeAdvance and readAdvance don't over/underflow
Chris Robinson [Sat, 24 Feb 2024 07:52:58 +0000 (23 23:52 -0800)]
Check that writeAdvance and readAdvance don't over/underflow

2 months agoRename some variables for clarity
Chris Robinson [Sat, 24 Feb 2024 07:24:30 +0000 (23 23:24 -0800)]
Rename some variables for clarity

2 months agoFix a bug that playback via portaudio does not work at all (#975)
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)

2 months agoProperly use std::hardware_destructive_interference_size
Chris Robinson [Fri, 23 Feb 2024 16:08:24 +0000 (23 08:08 -0800)]
Properly use std::hardware_destructive_interference_size

2 months agoAllow using the total capacity of the RingBuffer
Chris Robinson [Fri, 23 Feb 2024 15:49:09 +0000 (23 07:49 -0800)]
Allow using the total capacity of the RingBuffer

2 months agoMake better use of cache lines for the ringbuffer indices
Chris Robinson [Fri, 23 Feb 2024 14:57:08 +0000 (23 06:57 -0800)]
Make better use of cache lines for the ringbuffer indices

2 months agoStore the filter table directly in the cubic filter object
Chris Robinson [Fri, 23 Feb 2024 11:36:45 +0000 (23 03:36 -0800)]
Store the filter table directly in the cubic filter object

2 months agoReplace an array with a switch
Chris Robinson [Wed, 21 Feb 2024 12:34:40 +0000 (21 04:34 -0800)]
Replace an array with a switch

2 months agoMake AL[C]_EXT_direct_context public
Chris Robinson [Wed, 21 Feb 2024 12:18:34 +0000 (21 04:18 -0800)]
Make AL[C]_EXT_direct_context public

2 months agoGive better names to the wrapper function parameters
Chris Robinson [Wed, 21 Feb 2024 05:44:36 +0000 (20 21:44 -0800)]
Give better names to the wrapper function parameters

2 months agoInitialize a variable when declaring it
Chris Robinson [Mon, 19 Feb 2024 05:36:16 +0000 (18 21:36 -0800)]
Initialize a variable when declaring it

2 months agoAdd a couple missing includes
Chris Robinson [Mon, 19 Feb 2024 04:20:51 +0000 (18 20:20 -0800)]
Add a couple missing includes

2 months agoPromote a variable to size_t for the multiply, not after
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

2 months agoReplace a few more for/while loops with std::generator
Chris Robinson [Sun, 18 Feb 2024 06:19:50 +0000 (17 22:19 -0800)]
Replace a few more for/while loops with std::generator

2 months agoDon't assume a span is static sized
Chris Robinson [Sun, 18 Feb 2024 06:19:13 +0000 (17 22:19 -0800)]
Don't assume a span is static sized

2 months agoAdd a slightly more efficient cubic resampler
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.

2 months agoAvoid calculating an extra bsinc phase index
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.

2 months agoUse a variant to control the modulator effect generator
Chris Robinson [Fri, 16 Feb 2024 01:04:36 +0000 (15 17:04 -0800)]
Use a variant to control the modulator effect generator

2 months agoClean up some includes
Chris Robinson [Fri, 16 Feb 2024 00:45:49 +0000 (15 16:45 -0800)]
Clean up some includes

2 months agoUse the cubic filter bit-depth for the chorus depth/delay scale
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

2 months agoUse std::generate instead of for loops for resampling
Chris Robinson [Thu, 15 Feb 2024 23:19:39 +0000 (15 15:19 -0800)]
Use std::generate instead of for loops for resampling

2 months agoUse the gaussian filter table for the chorus effect
Chris Robinson [Wed, 14 Feb 2024 22:10:31 +0000 (14 14:10 -0800)]
Use the gaussian filter table for the chorus effect

2 months agoMove the reverb's cubic filter to a shared header
Chris Robinson [Wed, 14 Feb 2024 21:56:15 +0000 (14 13:56 -0800)]
Move the reverb's cubic filter to a shared header

2 months agoUse a 4-point Gaussian filter for cubic resampling
Chris Robinson [Wed, 14 Feb 2024 08:03:08 +0000 (14 00:03 -0800)]
Use a 4-point Gaussian filter for cubic resampling

2 months agoAvoid a few uses of &array[idx]
Chris Robinson [Tue, 13 Feb 2024 22:08:41 +0000 (13 14:08 -0800)]
Avoid a few uses of &array[idx]

2 months agoUpdate some includes
Chris Robinson [Tue, 13 Feb 2024 18:45:15 +0000 (13 10:45 -0800)]
Update some includes

2 months agoCall the correct delete function
Chris Robinson [Tue, 13 Feb 2024 06:17:14 +0000 (12 22:17 -0800)]
Call the correct delete function

2 months agoFix macOS support for tss
Chris Robinson [Tue, 13 Feb 2024 06:09:26 +0000 (12 22:09 -0800)]
Fix macOS support for tss

2 months agoMake the context error state thread-local
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.

2 months agoClear the sorted array for the default reverb auxslot
Chris Robinson [Sun, 11 Feb 2024 02:53:54 +0000 (10 18:53 -0800)]
Clear the sorted array for the default reverb auxslot

2 months agoDon't do geometric reflections for the late reverb
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.

2 months agoClean up some includes
Chris Robinson [Fri, 9 Feb 2024 23:56:46 +0000 (9 15:56 -0800)]
Clean up some includes

2 months agoMake some parameter names consistent
Chris Robinson [Thu, 8 Feb 2024 19:02:48 +0000 (8 11:02 -0800)]
Make some parameter names consistent

2 months agoInvert the phase of reflected signals in reverb
Chris Robinson [Thu, 8 Feb 2024 18:15:37 +0000 (8 10:15 -0800)]
Invert the phase of reflected signals in reverb

2 months agoPass a span to the data stream databuf
Chris Robinson [Thu, 8 Feb 2024 09:48:57 +0000 (8 01:48 -0800)]
Pass a span to the data stream databuf

2 months agoConstify a span's type that's only read
Chris Robinson [Thu, 8 Feb 2024 07:37:52 +0000 (7 23:37 -0800)]
Constify a span's type that's only read

2 months agoSilence unused parameter warnings
Chris Robinson [Wed, 7 Feb 2024 17:42:22 +0000 (7 09:42 -0800)]
Silence unused parameter warnings

2 months agoRemove al::ifstream wrapper
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

2 months agoFix up some includes
Chris Robinson [Wed, 7 Feb 2024 13:07:34 +0000 (7 05:07 -0800)]
Fix up some includes

2 months agoRemove a couple unnecessary macros
Chris Robinson [Wed, 7 Feb 2024 07:39:00 +0000 (6 23:39 -0800)]
Remove a couple unnecessary macros

2 months agoClean up some variable initialization
Chris Robinson [Tue, 6 Feb 2024 11:39:09 +0000 (6 03:39 -0800)]
Clean up some variable initialization

2 months agoReplace an assertion macro with an inline function
Chris Robinson [Tue, 6 Feb 2024 10:31:28 +0000 (6 02:31 -0800)]
Replace an assertion macro with an inline function

2 months agoUse a unique_ptr to manager PFFFT_Setup objects
Chris Robinson [Tue, 6 Feb 2024 09:35:18 +0000 (6 01:35 -0800)]
Use a unique_ptr to manager PFFFT_Setup objects

2 months agoMake al::span a bit more conformant
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

2 months agoUse wstrings for retriving the exe path on Windows
Chris Robinson [Mon, 5 Feb 2024 07:33:07 +0000 (4 23:33 -0800)]
Use wstrings for retriving the exe path on Windows

2 months agoClarify ambiguity between size_t and DWORD
Chris Robinson [Sun, 4 Feb 2024 13:19:14 +0000 (4 05:19 -0800)]
Clarify ambiguity between size_t and DWORD

2 months agoAvoid hardcoding some sublist counts
Chris Robinson [Sun, 4 Feb 2024 12:32:12 +0000 (4 04:32 -0800)]
Avoid hardcoding some sublist counts

2 months agoRemove custom minz/maxz functions
Chris Robinson [Sun, 4 Feb 2024 12:30:38 +0000 (4 04:30 -0800)]
Remove custom minz/maxz functions

2 months agoSeparate integer division from floating point conversion
Chris Robinson [Sun, 4 Feb 2024 10:10:04 +0000 (4 02:10 -0800)]
Separate integer division from floating point conversion

2 months agoAvoid extraneous angular conversions
Chris Robinson [Sun, 4 Feb 2024 07:44:08 +0000 (3 23:44 -0800)]
Avoid extraneous angular conversions

2 months agoRemove some custom mix/max/clamp functions
Chris Robinson [Sun, 4 Feb 2024 07:35:26 +0000 (3 23:35 -0800)]
Remove some custom mix/max/clamp functions

2 months agoUse the correct length for the reveb mixing matrix multiply
Chris Robinson [Sat, 3 Feb 2024 08:01:22 +0000 (3 00:01 -0800)]
Use the correct length for the reveb mixing matrix multiply

2 months agoUse a single buffer for the reverb delay input
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.

2 months agoCheck the sample rate limit for loading HRTF
Chris Robinson [Fri, 2 Feb 2024 12:59:06 +0000 (2 04:59 -0800)]
Check the sample rate limit for loading HRTF

2 months agoProperly sort the loaded HRTFs
Chris Robinson [Fri, 2 Feb 2024 12:42:42 +0000 (2 04:42 -0800)]
Properly sort the loaded HRTFs

3 months agoUse string_view a bit more
Chris Robinson [Fri, 2 Feb 2024 09:51:01 +0000 (2 01:51 -0800)]
Use string_view a bit more

3 months agoBetter handle exceptions when loading mhr files
Chris Robinson [Fri, 2 Feb 2024 08:52:46 +0000 (2 00:52 -0800)]
Better handle exceptions when loading mhr files

3 months agoRecognize the IEC61937 enum in newer Oboe versions
Chris Robinson [Thu, 1 Feb 2024 22:51:53 +0000 (1 14:51 -0800)]
Recognize the IEC61937 enum in newer Oboe versions

3 months agoSeparate a lambda definition from calling it
Chris Robinson [Thu, 1 Feb 2024 07:48:33 +0000 (31 23:48 -0800)]
Separate a lambda definition from calling it

3 months agoReplace another loop with any_of
Chris Robinson [Thu, 1 Feb 2024 07:31:30 +0000 (31 23:31 -0800)]
Replace another loop with any_of

3 months agoSilence some clang-tidy warnings
Chris Robinson [Thu, 1 Feb 2024 00:11:04 +0000 (31 16:11 -0800)]
Silence some clang-tidy warnings

3 months agoReset the offset for each line in Allpass4::process
Chris Robinson [Wed, 31 Jan 2024 23:31:58 +0000 (31 15:31 -0800)]
Reset the offset for each line in Allpass4::process

3 months agoCheck the string_view length before reading it
Chris Robinson [Wed, 31 Jan 2024 01:09:29 +0000 (30 17:09 -0800)]
Check the string_view length before reading it

3 months agoOne more fix for Apple
Chris Robinson [Tue, 30 Jan 2024 11:49:50 +0000 (30 03:49 -0800)]
One more fix for Apple

3 months agoAdd a missing include for macOS
Chris Robinson [Tue, 30 Jan 2024 11:44:01 +0000 (30 03:44 -0800)]
Add a missing include for macOS

3 months agoMake sure the winrt::hstring gets used as a wstring
Chris Robinson [Tue, 30 Jan 2024 11:42:02 +0000 (30 03:42 -0800)]
Make sure the winrt::hstring gets used as a wstring

3 months agoUse std::filesystem to construct config file paths
Chris Robinson [Tue, 30 Jan 2024 10:57:37 +0000 (30 02:57 -0800)]
Use std::filesystem to construct config file paths

3 months agoUse string_view instead of temporary strings
Chris Robinson [Tue, 30 Jan 2024 06:23:47 +0000 (29 22:23 -0800)]
Use string_view instead of temporary strings

3 months agoRemove some unneeded elses
Chris Robinson [Tue, 30 Jan 2024 06:17:42 +0000 (29 22:17 -0800)]
Remove some unneeded elses