1028 Commits

Author SHA1 Message Date
Chris Robinson
f2f83aaabb Finalize AL_SOFT_callback_buffer 2022-04-01 19:31:22 -07:00
Chris Robinson
33109e86c9 Fix ALC_SOFT_reopen_device for the null device extension list 2022-04-01 19:26:41 -07:00
Chris Robinson
a731e042cc Remove the unused flags parameter from alBufferCallbackSOFT 2022-04-01 19:15:16 -07:00
Chris Robinson
872c206deb Finalize ALC_SOFT_reopen_device 2022-04-01 16:37:26 -07:00
Chris Robinson
d91b68ef8e Avoid some explicit extern "C"s on function definitions 2022-03-31 05:20:16 -07:00
Chris Robinson
9537c77105 Avoid some redundant variable assignments 2022-03-30 04:32:40 -07:00
Chris Robinson
f15106e77f Remove the reversed all-pass trick in MixDirectHrtfBase
Given the minimum phase HRTF, it's not going to stay linear phase anyway.
2022-03-30 04:06:00 -07:00
Chris Robinson
325c992bea Avoid a shadow declaration warning 2022-03-30 01:25:36 -07:00
Chris Robinson
6bc1787a3b Make and use a Default enum for StereoEncoding 2022-03-29 11:48:57 -07:00
Chris Robinson
4ca8992fbd Rename ALC_STEREO_PLAIN_SOFT and don't duplicate ALC_HRTF_SOFT 2022-03-29 11:48:57 -07:00
Chris Robinson
3b09b7761f Handle more modes with the ALC_OUTPUT_MODE_SOFT attribute 2022-03-23 19:13:21 -07:00
Chris Robinson
8239e4c845 Better ensure attributes are properly traced 2022-03-17 13:26:49 -07:00
Chris Robinson
3d0500f823 Fix tracing the ALC_OUTPUT_MODE_SOFT attribute 2022-03-17 12:21:31 -07:00
Chris Robinson
8ca3186bac Ensure the EAX functions are suitably aligned on 32-bit 2022-03-16 20:32:09 -07:00
Chris Robinson
e28937d1f6 Add options to reverse local X and Y coordinates
To go along with reverse-z on the other axii. This is only for games that have
position/orientation errors causing top-bottom (or left-right) inversion.
2022-03-10 22:37:02 -08:00
Chris Robinson
609ee74211 Add a config option for reverse-z
The same as the __ALSOFT_REVERSE_Z env var, but in the config file. Should only
be used for per-game config files (either along side the executable, or setting
the ALSOFT_CONF env var when launching the app).
2022-03-10 17:47:42 -08:00
Chris Robinson
1369a081a0 Fix X-RAM tracking 2022-03-06 01:19:41 -08:00
Chris Robinson
2dc9cf170c Simplify committing EAX properties
Based on DirectSound's EAX behavior, committing any EAX property commits *all*
deferred property changes, not just the object being changed. So applying EAX
changes can be handled in one place.
2022-03-05 01:14:26 -08:00
Chris Robinson
2492d76896 Ensure deferred EAX effect properties are committed 2022-03-04 13:19:00 -08:00
Chris Robinson
63ac9c0b5d Fix applying the EAX context AirAbsorptionHF property 2022-03-02 21:18:13 -08:00
Chris Robinson
a98d6b2417 Fix applying air absorption 2022-03-02 16:58:26 -08:00
Chris Robinson
eea679eada Move some temp variables closer to where they're used 2022-03-02 15:34:09 -08:00
Chris Robinson
43682a8c3e Rework source send distance attenuation handling
Specifically, AL_[EAX]REVERB_ROOM_ROLLOFF_FACTOR always applies to an inverse
distance rolloff model, where the source's AL_ROOM_ROLLOFF_FACTOR applies to
the selected distance model. Consequently, the normal distance and cone
attenuation only needs to be calculated once for all sends, with the effect's
room rolloff calculated and applied separately.
2022-03-02 11:14:59 -08:00
Chris Robinson
fbac67a6a0 Rework the initial reverb decay
The idea here is that the initial reverb decay can't become less than the dry
path distance attenuation, as the dry attenuation represents the audio that has
not yet had a chance to start reflecting in the environment. As well, the
reference distance indicates where there is no distance attenuation, with any
initial attenuation set by the environment itself.

So what we do is use the dry path attenuation as the baseline for what's mixed
to the reverb, with the decay rate indicating how much of the remaining room
(non-direct) energy attenuates with distance.

This may be over-complicating it. Other sources hint at a more typical XdB per
doubling of distance, with X varying depending on environment properties (room
size, absorbancy, etc). This could be handled by applying a normal inverse
distance attenuation model, with a rolloff factor generated from the reverb
properties (density, decay rate, etc). Will need more testing and research.
2022-03-01 15:38:04 -08:00
Chris Robinson
d86f1ab476 Remove AL_SOFTX_filter_gain_ex
It was only added to try to help DSOAL, and it's not clear if it's even
necessary. But with native EAX API support, it certainly isn't necessary
anymore.
2022-02-28 12:57:18 -08:00
Chris Robinson
357fb467fe Define the CoreAudio default name only when needed 2022-02-23 02:26:25 -08:00
Chris Robinson
cadf0d1de5 Make some local constexpr variables static 2022-02-23 01:29:28 -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
1f9390f6f6 Use a simpler loop to enumerate sources 2022-02-21 21:46:38 -08:00
Boris I. Bendovsky
4ffba10d51
Implement EAX v1.0 (#664) 2022-02-21 19:39:06 -08:00
Chris Robinson
6c643e59e9 Make a couple more operator bools explicit 2022-02-20 22:04:19 -08:00
Chris Robinson
39708f9831 Avoid a variable limit on EAX filters
I'll assume for now that the limits for the EAX properties will keep the filter
gain from getting out of hand. The filter's gainhf is relative to the gain and
is limited to 0dB max.
2022-02-18 07:02:38 -08:00
Chris Robinson
a9974d3aa8 Trace the actual device form factor in pipewire 2022-02-16 00:04:11 -08:00
Chris Robinson
fba14feab7 Don't trace ignored pipewire stream nodes 2022-02-15 18:30:42 -08:00
Chris Robinson
ff54ed0fce Reset mIs51Rear only when updating the channel config 2022-02-15 17:30:07 -08:00
Chris Robinson
0493085ea2 Log when a pipewire device is removed 2022-02-15 17:24:20 -08:00
Chris Robinson
30c5c43e56 Mark another operator bool as explicit 2022-02-15 06:27:27 -08:00
Chris Robinson
c6b301b72e Access the proper FX slot index 2022-02-14 03:04:46 -08:00
Chris Robinson
ee946f57c3 Commit EAX context properties when a context stops deferring 2022-02-13 22:24:23 -08:00
Chris Robinson
1e687ebc8b Force EAX calls to defer when the AL context is deferring 2022-02-13 21:13:13 -08:00
Chris Robinson
3e6d210767 Avoid more unnecessary atomics 2022-02-13 21:00:57 -08:00
Chris Robinson
ea7c6f3e4e Don't make mPropsDirty atomic
It's only ever used under the ALCcontext::mPropLock mutex.
2022-02-13 19:37:45 -08:00
Chris Robinson
66f6cf121e Commit source EAX properties when not deferring
And make sure they get committed when resuming processing.
2022-02-13 17:22:41 -08:00
Chris Robinson
ac42ac336e Don't hide EAX functions behind a context
The standard says a function being returned doesn't necessarily mean it's
usable, and calling them will return failure if called when not usable. The
config option still prevents it from being returned, to better hide it when
disabled globally.
2022-02-10 17:54:27 -08:00
Chris Robinson
7896f6bae9 Inline some more simple getters 2022-02-08 22:50:06 -08:00
Chris Robinson
3c9a705210 Handle AirAbsorptionGainHF as a native context property 2022-02-08 22:41:44 -08:00
Chris Robinson
256ea81dbe Combine listener and context updates 2022-02-08 20:43:05 -08:00
Chris Robinson
de87cc98d5 Apply updates for EAX context properties 2022-02-08 20:27:40 -08:00
Chris Robinson
46a836fa14 Actually defer EAXCONTEXT_ALLPARAMETERS properties 2022-02-08 16:49:37 -08:00
Chris Robinson
7864895ab6 Ensure sources update together from EAX commits
... when a listener property change forces a commit.
2022-02-08 16:36:40 -08:00