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
Chris Robinson
5e3fcb3a93
Avoid initializing the NFC filter for every voice channel
...
It can be initialized once with the device's speaker distance since it won't
change in between resets, then copied into the voice where it can be adjusted
as needed.
2021-12-11 21:42:34 -08:00
Chris Robinson
01dd34f305
Add an internal Super Stereo format
...
It's not available as an AL buffer format (yet) since I'm not sure how to
expose it. Internally it seems fine as a separate channel configuration, but
because OpenAL combines the channel configuration and sample type, a flag may
work better there.
2021-12-11 17:50:24 -08:00
Chris Robinson
a75d35bbb0
Use a vector in BFormatDec instead of FlexArray
...
FlexArray would be better since it's not likely to use much memory for the
array, but the std::unique_ptr makes BFormatDec a non-standard layout, causing
GCC and Clang to complain.
2021-12-10 22:07:20 -08:00
Chris Robinson
c005d2c300
Remove unnecessary lines
2021-12-10 00:23:03 -08:00
Chris Robinson
a97dba6f41
Improve the 2-channel UHJ response
...
This attempts to correct for the differences needed for 2-channel UHJ's shelf
filters given the output shelf filters. It's far from ideal, but better than
nothing.
2021-12-09 22:00:35 -08:00
Chris Robinson
b72402d3e7
Add a function for Super Stereo conversions
...
a.k.a. Stereo Enhance. A common feature of UHJ decoders to take a plain
stereo signal and generate a B-Format signal with variable width control,
widening (or narrowing) the soundfield while maintaining a sharp central
image.
2021-12-09 21:19:36 -08:00
Chris Robinson
a73b64ce3c
Slight update to the UHJ coefficients
...
The extended precision of the encoder's 0.6512*X term was guesswork, with no
real basis for it. Switch back to the original value until something better
actually comes up. Also updates the decoder to account for the change in the
encoder.
2021-11-28 05:39:35 -08:00
Chris Robinson
f1380d830a
Avoid passing spans unnecessarily
2021-11-25 20:29:50 -08:00
Chris Robinson
c5831c92f3
Don't assume the UhjDecoder::decode offset is 16-byte aligned
...
It's not, it's MaxResamplerEdge which is currently 24.
2021-11-25 20:22:12 -08:00
Chris Robinson
d5707b3184
Use a base for the UhjEncoder/Decoder common properties
2021-11-25 19:53:52 -08:00
Chris Robinson
3ef4bffaf9
Slightly improve logging on Windows
...
The characters won't display properly if the system codepage isn't UTF-8, but
at least it shouldn't cut the line off prematurely.
2021-11-21 21:21:46 -08:00
Chris Robinson
834800c817
Downgrade some ERRs to WARNs
2021-11-21 20:29:20 -08:00
Chris Robinson
0c99a6b316
Make the backend pointer part of ALCdevice instead of DeviceBase
2021-11-19 20:04:10 -08:00
Chris Robinson
49a36334bd
Use a tri-state optional for the stereo output mode
2021-10-24 11:51:39 -07:00
Chris Robinson
d0e5e138e2
Use a flag to indicate headphone-like output
2021-10-23 07:51:06 -07:00
Chris Robinson
92b65fa15f
Avoid manually prefixing EventType_ enums
...
And use a better fitting type that matches how it's used
2021-10-10 05:07:31 -07:00
Chris Robinson
e3b8f8fe27
Make a construct_at method amd use it
2021-10-08 11:05:36 -07:00
Chris Robinson
90cfd090d6
Fix inverted macro check
2021-10-04 00:08:39 -07:00
Chris Robinson
1a0287e2a0
Don't call OutputDebugStringW in Release builds
2021-10-03 23:49:06 -07:00
Chris Robinson
f92cc479d8
Silence some static analysis warnings
2021-10-03 08:02:57 -07:00
Chris Robinson
29fba79cd5
Avoid 5.1Rear as its own channel configuration
...
It messes with 5.1 sources using direct channels, and the surround channels are
supposed to map to the side labels. Individual backends can deal with the
channel order/label differences, as they already do to a degree.
2021-07-30 07:38:26 -07:00
Chris Robinson
604bf609d0
Use the 2D channel orders for 2- and 3-channel UHJ
2021-07-13 13:56:22 -07:00
Chris Robinson
d998c03a27
Add a UHJ-specific coefficient scaling array
2021-07-13 06:31:13 -07:00
Chris Robinson
2186c890a3
Handle spaces in the ambdec description
2021-06-24 09:37:01 -07:00
Chris Robinson
5b2489c3e8
Convert AmbDecConf to DecoderConfig for loading
...
This keeps AmbDecConf uses confined to multi-channel panning initialization,
and avoids spreading conversions and maps all over.
2021-06-23 09:44:58 -07:00
Chris Robinson
8f3148ba53
Don't allocate full buffer lines in each voice
...
There's now effectively a 16-channel limit for buffers (as determined by the
number of elements in DeviceBase::mSampleData). Any more than that are
ignored when mixing.
2021-06-21 09:04:33 -07:00
Chris Robinson
7584458ecd
Avoid mixing extraneous channels
2021-06-21 07:36:47 -07:00
Chris Robinson
302b6f3ced
Avoid altering SrcBufferSize in each channel
2021-06-14 16:56:46 -07:00
Chris Robinson
2f16fc190f
Combine some checks
2021-06-14 01:51:04 -07:00
Chris Robinson
9c58ed73d3
Reorder some channel label indices
2021-06-13 21:45:42 -07:00
Chris Robinson
debb932573
Add an option to mix directly in the JACK callback
2021-06-08 10:52:37 -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
kcat
8324471b8a
Merge pull request #559 from tatokis/split-sse-sse2
...
Allow enabling SSE without SSE2
2021-05-13 15:13:00 -07:00
Chris Robinson
bab6e92980
Avoid shadowing a variable name
2021-05-13 01:44:06 -07:00