95 Commits

Author SHA1 Message Date
Chris Robinson
466c6faeb5 Correctly scale spatialized B-Format sources 2019-12-17 22:20:38 -08:00
Chris Robinson
0a65ed2190 Use normal panning for B-Format output
It can never work since it only uses auxiliary channel labels.
2019-12-17 22:12:47 -08:00
Chris Robinson
2215a4072c Don't apply stereo panning with direct channels enabled 2019-12-17 21:49:58 -08:00
Chris Robinson
38037e29ba Handle the buffer's ambisonic properties 2019-12-02 12:50:18 -08:00
Chris Robinson
58e4d643d3 Make B-Format rotation more robust
This should now handle higher orders, and can be easily extended to non-FuMa
layouts and scalings.
2019-12-01 22:33:41 -08:00
Chris Robinson
0cba99ed1b Avoid static constexpr for arrays iterated over at run-time 2019-10-25 01:43:23 -07:00
Chris Robinson
33fd1f9efd Use better types for some specific sizes 2019-10-13 09:37:07 -07:00
Chris Robinson
acb6baad90 Use std::array instead of plain arrays in a couple places 2019-10-05 21:23:31 -07:00
Chris Robinson
64e2c377d8 Move ALvoice from alu.h to a separate header 2019-10-02 16:53:23 -07:00
Chris Robinson
00250042c8 Check MAX_RESAMPLER_PADDING properly to ensure it's large enough 2019-09-28 19:14:27 -07:00
Chris Robinson
cbc00bcffe Combine two function calls into one 2019-09-28 03:42:17 -07:00
Chris Robinson
882b4acae8 Add "fast" variants for the bsinc resamplers
This simply omits the scale factor from the filter, similar to how up-sampling
does. The consequence of this is less smooth transitions when ramping the
pitch while down-sampling, but otherwise behaves fine.
2019-09-28 01:58:29 -07:00
Chris Robinson
9b64e5e0db Implement a "fast" bsinc path
This takes advantage of the fact than when increment <= 1 (when not down-
sampling), the scale factor is always 0. As a result, the scale and scale-phase
deltas never contribute to the filtered output. Removing those multiply+add
operations cuts half of the work done by the inner loop.

Sounds that do need to down-sample (when played with a high pitch, or is 48khz
on 44.1khz output, for example), still go through the normal bsinc process.
2019-09-26 19:24:29 -07:00
Chris Robinson
24db8a3f4b Make the resampler type an enum class 2019-09-22 21:19:19 -07:00
Chris Robinson
1da7512628 Avoid an unnecessary multiply 2019-09-16 21:49:06 -07:00
Chris Robinson
899a414591 Remove the last uses of the system's str[n]casecmp 2019-09-16 15:10:36 -07:00
Chris Robinson
10a841cd7e Avoid an unused variable 2019-09-16 14:10:48 -07:00
Chris Robinson
bf2c865d39 Clean up some more shadowing warnings 2019-09-16 07:16:31 -07:00
Chris Robinson
2c348cecb6 Fix some more implicit conversions noted by GCC 2019-09-14 18:35:23 -07:00
Chris Robinson
df306b5524 Make NumAuxSends unsigned 2019-09-13 04:15:05 -07:00
Chris Robinson
5b763e1437 Clean up implicit conversions in alu.cpp 2019-09-13 03:47:23 -07:00
Chris Robinson
5f862a5b49 Clean up sample converter implicit conversions 2019-09-12 17:45:06 -07:00
Chris Robinson
6699f3cf1c Use unsigned channel indices 2019-09-12 04:17:21 -07:00
Chris Robinson
ef2769af03 Use a normal vector for the voices array 2019-09-04 23:04:55 -07:00
Chris Robinson
c47a6d2279 Increment the mix count during disconnect
So attempts to get the current playback offset behave correctly while
disconnecting.
2019-09-04 20:31:55 -07:00
Chris Robinson
d15950f383 Avoid accumulating a temporary 2019-09-01 15:03:22 -07:00
Chris Robinson
a546343148 Make MixVoice a member function 2019-08-31 14:53:28 -07:00
Chris Robinson
7dbf69afa2 Use a span for effect state input 2019-08-26 09:16:20 -07:00
Chris Robinson
164626a7be Pass unsigned sample count to aluMixData 2019-08-25 17:54:36 -07:00
Chris Robinson
88a8bf903b Use size_t for the post-process sample length 2019-08-25 15:36:40 -07:00
Chris Robinson
3fa83547e9 Use size_t for HrtfMixer functions' buffer size 2019-08-20 11:39:39 -07:00
Chris Robinson
ecab99bce9 Move update pointers to the containers they update 2019-08-13 22:06:14 -07:00
Chris Robinson
1aaf65abfe Add methods to get env vars as an optional 2019-08-12 03:59:52 -07:00
Chris Robinson
5b33b4aa97 Make the post-process methods member functions 2019-08-07 11:43:53 -07:00
Chris Robinson
80a85febcf Update some includes 2019-08-05 18:36:39 -07:00
Chris Robinson
d24401c3f3 Move the meters per unit property to the listener 2019-08-05 12:15:14 -07:00
Chris Robinson
3154a915b1 Remove the ReverbSpeedOfSound hack
No other effect depends on context or listener properties, so reverb being the
only exception for speed of sound and meters per unit was putting extra work on
the effect engine for no real reason. Especially since the reverb decay time
should be the time actual time to decay irrespective of other settings.
2019-08-05 11:37:05 -07:00
Chris Robinson
2fa2c35bdc Modify LIKELY and UNLIKELY to not need extra parenthesis 2019-08-04 11:59:14 -07:00
Chris Robinson
ce7c86b217 Avoid reloading the voices array when processing 2019-08-02 11:07:48 -07:00
Chris Robinson
33bcced82a Use a smart pointer for holding the context's device 2019-08-01 19:44:09 -07:00
Chris Robinson
65f7fc610e Add a common base for auto-deleting ref-counted objects
Which will also work as the basis for a future intrusive_ptr
2019-08-01 13:43:32 -07:00
Chris Robinson
ea76e003e7 Properly prefix ALCcontext members 2019-07-30 09:05:54 -07:00
Chris Robinson
4c9e18c5a0 Rename al/* sources to avoid camel-case 2019-07-29 17:54:07 -07:00
Chris Robinson
76d87330ec Move the event declarations to a separate header 2019-07-29 15:58:26 -07:00
Chris Robinson
cb3e96e756 Rename Alc to alc 2019-07-28 18:56:04 -07:00