Chris Robinson
9b65ca4556
More include cleanup
2021-04-24 15:52:53 -07:00
Chris Robinson
440ce71dce
Move GetHFOrderScales to a more appropriate place
2021-04-24 13:46:52 -07:00
Chris Robinson
e0e4a8c35d
Update some includes
2021-04-24 11:45:50 -07:00
Chris Robinson
b54bb388a3
Create a base the ALCdevice and ALCcontext structs
...
A base that contains the API-agnostic data, with ALCdevice and ALCcontext being
for AL-specific data.
2021-04-24 08:28:13 -07:00
Chris Robinson
65b85f7cb9
Move hrtf.cpp/h to core
2021-04-22 10:26:20 -07:00
Chris Robinson
e457018921
Avoid passing an array of pointers
2021-04-01 03:44:26 -07:00
Chris Robinson
f33edc3b30
Add support for 4-channel UHJ
...
Also add the SOFT moniker to the new macros
2021-03-31 21:02:30 -07:00
Chris Robinson
b5e36007f1
Handle 3-channel UHJ audio buffers
2021-03-31 10:03:31 -07:00
Chris Robinson
35a0f2665f
Decode UHJ buffers to B-Format for mixing
...
This should also have an adjustment for the shelf filter. Although it's not
clear what the appropriate adjustments should be.
2021-03-31 09:37:30 -07:00
Chris Robinson
051d6fb243
Combine some duplicate code
2021-03-30 07:04:06 -07:00
Chris Robinson
9a31dcf84f
Don't add the resampler prepadding to the source size to load
2021-03-23 19:55:44 -07:00
Chris Robinson
063da94bd8
Load/convert samples from all channels at once for mixing
...
This uses a bit more memory (each voice needs to hold buffers for the
deinterleaved samples of each channel, instead of just one buffer for the
current channel being mixed on the device), but it will allow for handling
formats that need or prefer their channels decoded together.
2021-03-19 23:15:27 -07:00
Chris Robinson
dfe627133c
Use spans instead of references to arrays
2021-02-06 14:39:30 -08:00
Chris Robinson
f0f7bc036f
Rework fading of stopped sounds
...
Voices that stop and have no more accessible samples now fade out over 64
samples max. The extra loaded samples are also prevented from moving away from
0 amplitude. Paused voices that still have samples will still fade out over the
whole mix.
2021-01-27 14:55:20 -08:00
Chris Robinson
71e6bcbd62
Use an AL-specific buffer queue item struct for sources
2021-01-25 09:08:49 -08:00
Chris Robinson
f7acc30c22
Store the callback in the buffer list item
2021-01-24 09:29:56 -08:00
Chris Robinson
13c1d7efb7
Store buffer info in the queue entry
2021-01-24 02:07:39 -08:00
Chris Robinson
db4de2b56a
Avoid declaring some variables multiple times
2021-01-21 06:25:50 -08:00
Chris Robinson
89906453ea
Quickly fade out samples of a stopping voice
...
Rather than linearly fading out the mix over the mixing update, logarithmically
fade out the post-resampled samples by approx -60dB per millisecond.
2021-01-08 18:54:46 -08:00
Chris Robinson
04cd0bc576
Return non-const from the resampler function
2021-01-02 17:37:09 -08:00
Chris Robinson
20ef8bf390
Move cpu_caps and fpu_ctrl to core
2020-12-31 16:47:12 -08:00
Chris Robinson
5f233a2c24
Use more constexpr variables instead of macros
2020-12-25 20:52:18 -08:00
Chris Robinson
d578bc6cb1
Move logging to core
2020-12-17 02:47:03 -08:00
Chris Robinson
efc9c146c3
Move AsyncEvent to a separate header
2020-12-16 13:58:51 -08:00
Chris Robinson
c96b50fb65
Use a separate enum for the VoiceChange state
2020-12-16 01:40:15 -08:00
Chris Robinson
9435641c0d
Remove unneeded includes
2020-12-15 01:31:09 -08:00
Chris Robinson
56af137ba0
Move fmt_traits to core
2020-12-13 21:12:03 -08:00
Chris Robinson
e179bf0a12
Move the mixer functions to core
2020-12-12 14:58:09 -08:00
Chris Robinson
1ad944555c
Move some HRTF definitions to a separate header
2020-12-12 14:15:17 -08:00
Chris Robinson
1bb7f575f0
Don't modify the IR size of loaded HRTFs
2020-12-11 15:08:50 -08:00
Chris Robinson
50e33ce8f4
Change some macros into constexpr variables
2020-12-04 13:53:56 -08:00
Chris Robinson
69d55d7e03
Move the filters to core
2020-12-04 11:15:50 -08:00
Chris Robinson
aa05feec4a
Avoid a global MAX_PITCH macro
2020-12-04 11:15:50 -08:00
Chris Robinson
8750810f5c
Change a couple macros into constexpr variables
2020-11-28 03:38:20 -08:00
Chris Robinson
b0919240ab
Move some sources to a separate directory
...
To begin separating the ALC interfaces from internal ones.
2020-11-27 19:18:17 -08:00
Chris Robinson
c3cb09aa0c
Avoid AL types in the mixer
2020-11-20 03:59:14 -08:00
Chris Robinson
f85e76285f
Disassociate internal voice enums from AL enums
2020-11-20 01:37:19 -08:00
Chris Robinson
03f9700071
Use BufferStorage for the buffer queue
2020-11-19 04:18:25 -08:00
Chris Robinson
537510afc8
Put the loop start/end in BufferStorage
2020-11-19 03:23:46 -08:00
Chris Robinson
7bb37deb51
Replace the mixer fraction macros with constexpr variables
2020-10-21 17:16:27 -07:00
Chris Robinson
b8f5e1f424
Change some more macros into constexpr variables
2020-10-21 10:39:00 -07:00
Chris Robinson
39f4ea61c5
Add missing linear resampler to the option setting list
2020-09-24 14:21:57 -07:00
Chris Robinson
1f486f820e
Use a separate structure for buffer storage
2020-08-28 00:09:46 -07:00
Chris Robinson
2a01940041
De-duplicate LoadSampleArray and FmtTypeTraits
2020-08-26 21:29:16 -07:00
Chris Robinson
91df03f7eb
Simplify mixer buffer size saturation handling
2020-07-23 09:03:47 -07:00
Chris Robinson
b0e72266b6
Don't round up the dst size when the src size was saturated
2020-06-29 19:41:08 -07:00
Chris Robinson
775187788a
Fix SrcBufferSize calculation when downsampling
2020-06-29 12:34:12 -07:00
Chris Robinson
8d77c59da4
Fade over more of the update with HRTF
2020-05-25 16:57:38 -07:00
Chris Robinson
200c164d78
Improve HRTF delay handling
...
Ensures source-level HRTF, the dry mix, and direct output all align properly,
and simplifies adding the delay in the direct mix output.
2020-05-20 11:13:06 -07:00
Chris Robinson
19baf646d2
Rename applyHfScale to processHfScale
2020-05-19 13:58:55 -07:00