Chris Robinson
9f5a7a7a50
Fix wrapping for the upper HRIR index
2019-03-14 13:17:07 -07:00
Chris Robinson
3a19b94503
Mirror a couple HRIR elevations from the top for the bottom
...
Because the ears are offset from center, linear interpolation from the lowest
defined elevation to the -90 degree bottom misses this slight deviation.
Mirroring one or two more elevations from the top helps catch it, and bilinear
interpolation is used to transition back to the lowest known measurements.
2019-03-13 12:27:44 -07:00
Chris Robinson
3a39a2c790
Set the correct target gain after a fade-out HRTF mix
2019-03-12 16:45:34 -07:00
Chris Robinson
24ae12f58e
Check a value where its used
2019-03-12 09:56:02 -07:00
Chris Robinson
098c7ca6ea
Fix not looping when the source offset is beyond the loop end
2019-03-11 22:09:30 -07:00
Chris Robinson
24b43fe852
Remove a couple redundant local variables
2019-03-11 22:00:28 -07:00
Chris Robinson
30a7c6d86f
Pass the voice state as a parameter instead of reloading it
2019-03-11 20:00:14 -07:00
Chris Robinson
e0daad6a16
Update comment for SynthesizeOnsets
2019-03-11 14:28:13 -07:00
Chris Robinson
d2b4099024
Process minimum phase reconstruction in parallel
2019-03-11 13:41:26 -07:00
Chris Robinson
0689333da8
Mirror the +90 degree elevation delays for -90 degrees
2019-03-10 21:47:05 -07:00
Chris Robinson
2c67ab0d2c
Rename ALvoice fields for consistency
2019-03-10 16:29:06 -07:00
Chris Robinson
030b24a40d
Improve handling of voice's AmbiScales for upsampling
2019-03-10 15:46:46 -07:00
Chris Robinson
663a6ce4e7
Use the correct value for MAX_AMBI2D_CHANNELS
2019-03-10 15:39:31 -07:00
Chris Robinson
d99d2a400a
Don't copy old coeffs in MixHrtfBlendBase
2019-03-10 14:31:46 -07:00
Chris Robinson
80e55b87ed
Avoid an extra level of indentation
2019-03-10 12:50:38 -07:00
Chris Robinson
0d295cf811
Don't directly use a buffer for updating source parameters
2019-03-10 11:52:39 -07:00
Chris Robinson
e5651c15dd
Avoid excessive transformations of the source position
2019-03-10 11:33:08 -07:00
Chris Robinson
12721f94a7
Add a method to apply an HF scale without band-splitting
2019-03-10 10:30:33 -07:00
Chris Robinson
6a95189ef6
Fix for MSVC decaying arrays to pointers with ?:
2019-03-09 21:54:15 -08:00
Chris Robinson
106671d451
Fade out voices that end normally
...
Sometimes a sound may end with non-0 amplitude, particularly if a buffer queue
underruns. This helps avoid clicks and pops for sources that don't already end
in silence.
2019-03-09 21:32:14 -08:00
Chris Robinson
87479b4b32
Play dummy samples and force a fade out on stopping voices
2019-03-09 18:34:00 -08:00
Chris Robinson
ef0f335132
Add a Stopping state for voices
...
This currently doesn't do much, except have the mixer progress it to Stopped.
It's valid to have without a source or buffers, and in the future will allow
fading out when a source is paused or stopped.
2019-03-09 16:48:07 -08:00
Chris Robinson
cde4500e24
Increment the active voice count ahead of playing the sources
2019-03-09 15:04:51 -08:00
Chris Robinson
d39cfcc7bb
Clear the voice's buffer when detaching from source
2019-03-09 13:20:10 -08:00
Chris Robinson
972a5c0f1d
Exclude far-ear IRs for the synthesized -90 degree elevation
2019-03-09 13:00:08 -08:00
Chris Robinson
0e4402b2e1
Avoid some explicit loops
2019-03-05 06:21:09 -08:00
Chris Robinson
da9ec374d8
Normalize HRIRs using their maximum RMS
2019-03-04 08:00:04 -08:00
Chris Robinson
90d1e1212b
Pass a reference to function for a template parameter
2019-03-03 00:24:33 -08:00
Chris Robinson
2d14de3fb0
Use more specific names for temp buffer storage
2019-03-02 23:41:26 -08:00
Chris Robinson
0aa0f24dd7
Use a proper flag to indicate audio is prepared in alffplay
2019-03-01 22:46:56 -08:00
Chris Robinson
e4b76d2627
Reverse the HRTF field array
...
Most often a sound's distance will be beyond the farthest field measurement, so
It's more efficient to have the farthest field first and avoid looping through
the whole field array for them.
2019-02-27 23:13:40 -08:00
Chris Robinson
86926f0998
Combine the reverb output mixes into a single call
2019-02-25 05:52:37 -08:00
Chris Robinson
8a34bd59b0
Unlock the audio decoder mutex before disabling events in alffplay
...
The callback may be waiting on the mutex, but disabling the callback needs any
current invocation to finish first.
2019-02-25 02:03:43 -08:00
Chris Robinson
81aa5af3b9
Make sure the reverb fading completes
...
The processing loop doesn't depend on being aligned anymore, so it won't get
stuck when only less than 4 samples can be done in a non-final update.
2019-02-25 01:08:11 -08:00
Chris Robinson
4d6b66163c
Convert the device frequency to float just once
2019-02-24 19:07:21 -08:00
Chris Robinson
d6fb4d5f52
Make sure the voice's direct buffer is always set
2019-02-24 19:02:49 -08:00
Chris Robinson
d2664e2192
Remove a duplicate index array
2019-02-24 18:00:49 -08:00
Chris Robinson
cadff0f6c1
Reduce BUFFERSIZE to match the default period size
...
Also adds a bit more space to the temp source data buffer, to avoid needing to
loop on matching sample rates.
2019-02-24 16:13:51 -08:00
Chris Robinson
a2ba550ebf
Rework reverb A/B-Format conversion mixing
...
This should help improve performance using the optimized mixers, and fewer
passes on the transforms, though at the cost of more memory.
2019-02-24 15:43:56 -08:00
Chris Robinson
4ec0aed286
Change some functions to proper methods
2019-02-23 03:18:12 -08:00
Chris Robinson
42934b09e5
Avoid multiple int-to-float conversions
2019-02-23 01:43:55 -08:00
Chris Robinson
3683e31662
Constify some parameters and remove an explicit loop
2019-02-23 00:01:38 -08:00
Chris Robinson
317206e8f3
Remove the FOAOut mixing buffer and associated post-processes
2019-02-22 22:35:37 -08:00
Chris Robinson
45378fe687
Remove the unused FOAOut EffectTarget
2019-02-22 22:03:04 -08:00
Chris Robinson
5b35e60a98
Apply ambisonic upsampling on reverb output as needed
...
This isn't the greatest thing since it splits the A-to-B-Format transform from
the panning transform. The A-to-B and HF scale mixes are also not as optimal as
they could be, since they can't use the main mixer functions (wrong buffer line
length).
It does, however, get rid of the final use of the FOAOut buffer, so the
upsampling post-process is no longer needed.
2019-02-22 21:53:45 -08:00
Chris Robinson
6a3c10d850
Ensure reverb fading doesn't end with less than 4 samples
2019-02-22 02:15:22 -08:00
Chris Robinson
6a2cf96448
Avoid some unnecessary local variables
2019-02-22 01:00:57 -08:00
Chris Robinson
01ac6e2e56
Combine reverb transform matrices one column at a time
2019-02-21 19:05:20 -08:00
Chris Robinson
7a9d67934f
Mix B-Format sources directly to the dry buffer
...
Now the only thing that utilizes FOAOut is reverb output.
2019-02-21 17:48:08 -08:00
Chris Robinson
1eea3cb2d1
Remove RESTRICT from the bandsplitter process method
...
The compiler can see there's no aliasing with the local variables, and the
input/output buffers are handled sequentially one element at a time anyway.
2019-02-21 17:37:02 -08:00