155 Commits

Author SHA1 Message Date
Chris Robinson
556c5d14d7 Avoid a virtual function call to set the decoder width 2022-05-17 02:32:10 -07:00
Chris Robinson
64cb0dc264 Use a member variable to specify the decoder padding 2022-05-17 02:28:57 -07:00
Chris Robinson
3e9597a768 Avoid magic numbers 2022-05-16 22:49:03 -07:00
Chris Robinson
83238973ed Use virtual functions for the decoder 2022-05-14 21:23:03 -07:00
ilya-fedin
e0d26ba25a
Search the installation data directory (#693)
That allows the logic to work on non-FHS distros like NixOS
2022-05-13 13:55:17 -07:00
Chris Robinson
c870e550fa Don't enable RTKit/D-Bus support on Windows 2022-05-09 12:38:12 -07:00
Chris Robinson
7e6ed2fa95 Use an array of pointers for the UHJ encoder input 2022-05-06 04:14:34 -07:00
Chris Robinson
593966c8db Handle 3D7.1 as a separate channel configuration
It's treated as 5.1 + 2 aux channels. This allows AL_DIRECT_CHANNELS_SOFT to
behave better, not forwarding rear left/right channel inputs to lower front and
upper rear, and allows reporting a more appropriate output mode to the app
instead of 7.1.
2022-04-26 23:32:15 -07:00
Chris Robinson
354c18a242 Remove a couple unused fields 2022-04-22 16:37:08 -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
1e8e63067c Remove an unnecessary subtraction 2022-04-01 09:47:32 -07:00
Chris Robinson
6f9311b1ba Don't manually reverse samples 2022-03-31 13:07:58 -07:00
Chris Robinson
7c60d0f163 Invert a check to put the first taken path first 2022-03-31 08:36:34 -07:00
Chris Robinson
9d240becad Make and use a processHfScale function with a separate output 2022-03-31 06:11:47 -07:00
Chris Robinson
6718a49486 Replace a few asserts with actual checks or ASSUME() 2022-03-30 05:01:06 -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
6bc1787a3b Make and use a Default enum for StereoEncoding 2022-03-29 11:48:57 -07:00
Chris Robinson
8e0164df96 Fix for some missing macros 2022-03-10 18:05:07 -08:00
Chris Robinson
cfae2cc254 Use proper macros instead of magic numbers 2022-03-09 16:11:47 -08:00
Chris Robinson
90db129d60 Avoid a divide-by-zero in UhjDecoder::decodeStereo 2022-03-07 17:32:13 -08:00
Chris Robinson
42bacc399b Fix an unused parameter warning
... when either pthread_setschedparam or RTKit aren't available.
2022-02-23 02:39:17 -08:00
Chris Robinson
234e55cc3c Explicitly define AmbDecConf's destructor
GCC complains it can't inline the destructor because it's "unlikely" to be
called and would bloat code size, despite being implicitly defined. Technically
accurate, but rather annoying since it's not explicitly called or defined.
2022-02-22 21:23:53 -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
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
Jan Niklas Hasse
7d2de711c8
Remove extra ';' after member function definition (#652)
Found using -Wextra-semi warning.
2022-01-31 16:02:10 -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
388f10319b Handle _gettid on FreeBSD
And simplify handling D-Bus/RTKit interfaces
2022-01-18 15:55:51 -08:00
Chris Robinson
5306c9d424 Set niceness as a fallback only on Linux
If pthread_setschedparam and rtkit_make_realtime both fail, lowering niceness
can also work to boost priority. However, this only works on Linux and other
OSs that implement a per-thread niceness (POSIX standard has it per-process,
which isn't desirable behavior here).
2022-01-18 14:32:15 -08:00
Chris Robinson
4920167fa0 Avoid passing a function pointer to std::call_once 2022-01-18 11:45:08 -08:00
Chris Robinson
6f60e7a452 Handle the rt-prio config options as the priority level 2022-01-18 10:04:40 -08:00
Chris Robinson
a6dc7afa0f Explicitly default the band splitter's copy assignment 2022-01-11 01:49:24 -08:00
Chris Robinson
a2c5ffd9bc Slightly improve handling of stopping voices 2022-01-08 23:21:35 -08:00
Jan Niklas Hasse
3bdbbe8aa8
Remove extra ';' after member function definition (#634)
Found using -Wextra-semi warning.
2022-01-04 12:39:34 -08:00
Chris Robinson
fff09a2e5c Don't mix higher orders of B-Format than the device is doing 2022-01-02 00:18:29 -08:00
Chris Robinson
72c99b52d8 Use an span of pointers instead of arrays for mixing 2022-01-01 21:19:53 -08:00
Chris Robinson
a271484e7c Pass a span of pointers to the UHJ/SuperStereo decoder 2022-01-01 00:10:21 -08:00
Chris Robinson
f1aa10ff0b Use a bitset instead of a plain uint for flags 2021-12-23 13:43:10 -08:00
Chris Robinson
0a87828b41 Don't swallow up buffer callback samples when pausing 2021-12-18 03:59:32 -08:00
Chris Robinson
5bfa7c22fd Don't update voice sample histories when stopping/pausing
Since a voice pausing is on a fade-out, and will replay the same samples again
when restarting and fading in.
2021-12-18 03:45:19 -08:00
Chris Robinson
cbbc4dc8fa Move some more context functions to the proper source 2021-12-17 17:34:03 -08:00
Chris Robinson
d16b61dffb Move the effects base and effectslot to core 2021-12-17 17:13:59 -08:00
Chris Robinson
fbc42aad7e Move some ContextBase function definitions to the right place 2021-12-17 04:25:46 -08:00
Chris Robinson
3ed913f6dd Remove an unnecessary parameter 2021-12-17 04:14:39 -08:00
Chris Robinson
c9537abfb1 Allocate voice properties in clusters 2021-12-17 04:07:00 -08:00
Chris Robinson
edea2b2a02 Rename Voice::mNumChannels for clarity 2021-12-15 14:28:26 -08:00
Chris Robinson
54c4bea487 Add source properties for Super Stereo
When playing a stereo format, enabling Super Stereo causes the source to behave
as a B-Format source, with a variable width control.
2021-12-15 02:01:22 -08:00
Chris Robinson
b489705b25 Minor UHJ coefficient scaling precision improvement 2021-12-13 01:09:53 -08:00
Chris Robinson
953745d386 Make an inline function to check for 2D ambisonic formats 2021-12-12 15:53:53 -08:00