5885 Commits

Author SHA1 Message Date
Chris Robinson
673983dc5d Make Create methods for structs with flexible array members ...
... that are used with unique_ptr.
2019-01-08 23:44:08 -08:00
Chris Robinson
bc1eeb5df0 Avoid calling unique_ptr::reset with a raw pointer 2019-01-08 23:15:58 -08:00
Chris Robinson
173c97c2db Remove an unused macro 2019-01-08 21:51:56 -08:00
Chris Robinson
a46f1f810d Rename ALC_SOFT_loopback2 and renumber its enums 2019-01-08 20:02:36 -08:00
Chris Robinson
d7eee03272 Replace a couple more C-style casts 2019-01-08 19:08:03 -08:00
Chris Robinson
0763dfa954 Apply the all-pass separately from the upsampling mix 2019-01-08 18:34:45 -08:00
Chris Robinson
edba7da8ab Avoid macros for indexing HF and LF fequency bands 2019-01-08 17:21:22 -08:00
Chris Robinson
0c3662d8b2 Fix some comments and reduce indentation 2019-01-08 17:21:22 -08:00
kcat
009d738c1e
Merge pull request #261 from ShFil119/avoid_old_style_casts
Avoid using old style casts
2019-01-08 17:19:15 -08:00
Filip Gawin
0d3a0635d9 Avoid using old style casts
To think about:
examples/alffplay.cpp:600
OpenAL32/Include/alMain.h:295
2019-01-08 19:42:44 +01:00
kcat
2a7f27ca58
Merge pull request #260 from ShFil119/impr/nullptr
Use nullptr in cpp files
2019-01-07 04:36:50 -08:00
Chris Robinson
4d047e2bc1 Use user-defined literals for 64-bit literals 2019-01-07 04:06:40 -08:00
Filip Gawin
0537414baf Use nullptr in cpp files 2019-01-07 12:37:13 +01:00
Chris Robinson
67c9cf8174 Define logging calls to be unlikely 2019-01-07 01:13:06 -08:00
Chris Robinson
648b76ed65 Move some macros to a common header 2019-01-07 01:12:09 -08:00
Chris Robinson
20a5306bdf Clean up some initializers and use of C methods 2019-01-06 21:16:08 -08:00
Chris Robinson
fababe76c4 Don't use the dual-band upsampler for basic ambisonic decoding 2019-01-06 17:45:44 -08:00
Chris Robinson
f5b6d761ff Apply an all-pass on the existing output when upsampling ambisonics 2019-01-06 06:50:58 -08:00
Chris Robinson
13056b45b0 Revert back to using a band-splitter to increase the HF response
Unfortunately the shelf filter causes issues due to the shelf gain magnitude
creating a varying phase offset. The splitter also creates phase offsets, but
it's consistent regardless of gain.
2019-01-06 05:15:11 -08:00
Chris Robinson
d2e34e509b Make the band-splitter and splitter-allpass filters templated
With float and double explicit instantiations
2019-01-06 04:45:35 -08:00
Chris Robinson
da3a916042 Replace macros with constexpr inline functions 2019-01-06 04:16:51 -08:00
Chris Robinson
98f3e6a162 Remove an unnecessary undef 2019-01-06 02:49:24 -08:00
Chris Robinson
e645d25b62 Use double-precision biquads for the HRTF shelf filters 2019-01-06 00:54:39 -08:00
Chris Robinson
607e778344 Make BiquadFilter a templated class
With explicit instantiations for float and double
2019-01-06 00:53:02 -08:00
Chris Robinson
03aeb7edf6 Use a shelf filter for the HRTF B-Format decoder HF scale 2019-01-06 00:23:15 -08:00
Chris Robinson
3b91010e21 Pass the normalized crossover frequency to the reset method 2019-01-05 22:31:13 -08:00
Chris Robinson
aa29bf5933 Remove unnecessary structs and buffers 2019-01-05 22:24:38 -08:00
Chris Robinson
3f35fcc4b5 Simplify MixParams and AmbiUpsampler
Since the dry buffer is always an ambisonic target now
2019-01-05 21:59:04 -08:00
Chris Robinson
cff20c2fe8 Use BFormatDec for custom and built-in ambisonic decoding 2019-01-05 19:21:25 -08:00
Chris Robinson
641bbf075d Enable simplified upsampling for AmbiUpsampler 2019-01-05 00:23:06 -08:00
Chris Robinson
6d7e8cf8b0 Simplify the BFormatDec upsampler
Since the only difference applied is a scalar on the high-frequency response, a
B-Format-to-B-Format transcode can be accomplished with a high-shelf filter. A
similar thing can be done with AmbiUpsampler, but only when outputing to
periphonic B-Format.
2019-01-04 22:17:30 -08:00
Chris Robinson
0a6748156d Make sure the OpenSL capture buffer queue has the correct size
The ring buffer size may round up and have more queueable elements than OpenSL
was allocated with, leading to errors when queueing those extra elements. Now
OpenSL allocates the same number of elements that can be written to the ring
buffer.
2019-01-03 18:16:46 -08:00
Chris Robinson
21a17620e3 Fix the ringbuffer write limit
Previously it just limited the returned write space, irrespective of how much
had already been written. The buffer could still be filled up by doing multiple
writes. Now the size is limited by adjusting the read pointer by the real vs
limited difference when calculating the writable space.
2019-01-03 15:54:18 -08:00
Chris Robinson
88c2f11dcf Use DeviceRef and ContextRef when creating a new device and context 2019-01-01 22:44:46 -08:00
Chris Robinson
399dfca1e3 Rename ALCdevice_struct and ALCcontext_struct
A (possibly contentious?) change in the public headers. Those names were never
part of any specification, and I don't know why the struct names differed from
the actual type name. But with C++, which takes the original struct declaration
as the original name, it was affecting the type's internal symbols.

This shouldn't affect user code since ALCdevice_struct and ALCcontext_struct
were never part of the spec. If issues arise from this change, it should be
reported.
2019-01-01 18:13:33 -08:00
Chris Robinson
1630a33567 Use standard unique_lock and lock_guard for the backend lock 2019-01-01 16:42:54 -08:00
Chris Robinson
2f1566e0b4 Add and use a make_unique function 2019-01-01 14:33:01 -08:00
Chris Robinson
c36798fd07 Avoid unnecessary extra buffers for filter chains 2019-01-01 02:41:27 -08:00
Chris Robinson
e930c70eaa Don't make BiquadFilter's src and dst restrict
There's no technical reason they can't be the same since IIR filters can't be
auto-vectorized anyway.
2019-01-01 00:04:46 -08:00
Chris Robinson
a9e71c2668 Handle all input channels in MixDirectHrtf 2018-12-31 23:33:04 -08:00
Chris Robinson
0452c9201d Add a missing include 2018-12-31 20:51:51 -08:00
Chris Robinson
87143b6645 Remove some C-isms from makehrtf
Remove unnecessary typedefs, use C++11 stamndard types and values, avoid
explicit allocations.
2018-12-31 19:54:34 -08:00
Chris Robinson
4c4572ae8a Compile makehrtf as C++ 2018-12-31 18:23:30 -08:00
Chris Robinson
d8eecc89e0 Pass a reference to an array instead of a pointer 2018-12-31 18:07:00 -08:00
Chris Robinson
5a9a1c8d7d Further improve HRTF methods to avoid masking in the inner loops 2018-12-31 04:12:20 -08:00
Chris Robinson
5e03941701 Use an atomic bool on things that only take true or false 2018-12-30 21:58:14 -08:00
Chris Robinson
9f5c9a2260 Rename BackendLock to StateLock 2018-12-30 21:38:42 -08:00
Chris Robinson
3df1d185f8 Don't make the backend's lock/unlock methods noexcept 2018-12-29 17:29:52 -08:00
Chris Robinson
24e763f2a1 Get rid of ALCdevice_Lock/Unlock 2018-12-29 14:00:34 -08:00
Chris Robinson
bdf7c16cfb Clean up a member name 2018-12-29 13:21:47 -08:00