Chris Robinson
5a1abf6918
Use different parameters for HRTF mixers
2014-05-18 09:31:08 -07:00
Chris Robinson
29b5dae6aa
Pass some DirectParams as function parameters
2014-05-18 08:59:10 -07:00
Chris Robinson
82dd2d875e
Apply high-pass source filters as needed
2014-05-17 07:54:25 -07:00
Chris Robinson
0b5b39d5e6
Add a flag to specify when the low-pass filter needs to apply
2014-05-17 07:17:48 -07:00
Chris Robinson
d066c7b124
Better pack HRTF mixing properties
2014-05-03 18:59:26 -07:00
Chris Robinson
b2e533fbfc
Clamp the current and target gain lower bound to epsilon
...
Should give a bit more wiggle room for the gain stepping to get lower than the
silence threshold.
2014-05-03 17:51:06 -07:00
Chris Robinson
59fc9aac0e
Use C11 alignas when available
2014-04-19 02:11:04 -07:00
Chris Robinson
5e0fc84f49
Make HRTF stepping values per-channel
2014-04-05 10:24:13 -07:00
Chris Robinson
72986882f5
Remove the click removal buffers for auxiliary effect slots
2014-03-23 16:28:55 -07:00
Chris Robinson
52deb557d5
Add gain stepping to the send mixers
2014-03-23 16:11:21 -07:00
Chris Robinson
55f851093f
Remove the now-unneeded click removal buffers for the device
...
They are still there for auxiliary sends. However, they should go away soon
enough too, and then we won't have to mess around with calculating extra
"predictive" samples in the mixer.
2014-03-23 07:31:33 -07:00
Chris Robinson
81e049bd47
Step mixing gains per-sample for non-HRTF mixing
...
This fades the dry mixing gains using a logarithmic curve, which should produce
a smoother transition than a linear one. It functions similarly to a linear
fade except that
step = (target - current) / numsteps;
...
gain += step;
becomes
step = powf(target / current, 1.0f / numsteps);
...
gain *= step;
where 'target' and 'current' are clamped to a lower bound that is greater than
0 (which makes no sense on a logarithmic scale).
Consequently, the non-HRTF direct mixers do not do not feed into the click
removal and pending click buffers, as this per-sample fading would do an
adequate job of stopping clicks and pops caused by extreme gain changes. These
buffers should be removed shortly.
2014-03-23 06:57:00 -07:00
Chris Robinson
0ce0a88fd6
Move the step counter and moving flag to DirectParams
2014-03-23 03:03:03 -07:00
Chris Robinson
b0d511a860
Store the HrtfState directly in the DirectParams
2014-03-23 02:45:50 -07:00
Chris Robinson
842aeb888b
Move some HRTF and mixer structs to alu.h
2014-03-22 02:39:57 -07:00
Chris Robinson
6ee54fb1f3
Store some source mixing parameters in the active source struct
2014-03-19 13:14:11 -07:00
Chris Robinson
08dfbcfd5c
Add min/max/clamp methods for doubles
2013-11-27 00:30:13 -08:00
Chris Robinson
d3c70e63b4
Use C99 inline in more places
2013-11-04 13:44:46 -08:00
Chris Robinson
a421e515be
Use a helper macro for pi*2
2013-10-08 16:31:23 -07:00
Chris Robinson
11365b42c7
Use helper macros to convert between degrees and radians
2013-10-08 12:39:22 -07:00
Chris Robinson
79edd2cf3b
Use a macro for the silence threshold
2013-10-06 17:25:47 -07:00
Chris Robinson
764ea95781
Use helpers to set channel gain arrays
...
Also avoid unnecessary clearing.
2013-10-03 05:02:16 -07:00
Chris Robinson
e96cc656e9
Use C99's inline instead of __inline
2013-05-28 22:27:07 -07:00
Chris Robinson
52efb8d7f4
Use restrict instead of RESTRICT
2013-05-22 15:11:39 -07:00
Chris Robinson
1fb9311d82
Lock the device before calling aluHandleDisconnect
...
PulseAudio causes an assert if being relocked inside a callback on the worker
thread, where aluHandleDisconnect is called. We can assume it's already locked
there, so just make sure the device is locked before being calling it.
2012-12-02 11:30:23 -08:00
Chris Robinson
e2e502970c
Move some math functions to where they're used
2012-10-25 17:24:22 -07:00
Chris Robinson
c802bfccef
Remove the float math wrapper functions
2012-10-25 14:16:35 -07:00
Chris Robinson
a14383d6cc
Constify the direct and send parameters given to the mixer
2012-10-15 01:31:58 -07:00
Chris Robinson
f0d27e5f91
Remove the unused Device parameter
2012-10-14 11:29:28 -07:00
Chris Robinson
3240894cd5
Remove the now-unused Source parameter from the DryMix methods
2012-10-14 11:04:36 -07:00
Chris Robinson
25b8a95987
Check the distance against epsilon to determine if it matches
2012-10-12 07:10:51 -07:00
Chris Robinson
41b2c2f3bb
Remove an unneeded parameter from the resampler
2012-09-27 02:46:15 -07:00
Chris Robinson
7635afcb52
Use a source param for the resampler and move them to the mixer source
2012-09-14 04:13:18 -07:00
Chris Robinson
4f70766b95
Move a couple macros to more appropriate headers
2012-09-14 02:52:37 -07:00
Chris Robinson
9f58edd7a8
Fix up some more header includes
2012-09-14 02:42:36 -07:00
Chris Robinson
0f3a575a09
Don't include alu.h in alMain.h
2012-09-14 02:14:29 -07:00
Chris Robinson
ec74fb9ba2
Enable flush-to-zero mode when possible
2012-09-14 01:10:19 -07:00
Chris Robinson
ff809f2271
Move a couple methods to where they're used
2012-09-12 07:57:50 -07:00
Chris Robinson
98ff6f990a
Do the filtering separately from the mixing
2012-09-11 05:56:19 -07:00
Chris Robinson
4e440fff62
Remove a hack for MinGW
2012-09-10 00:19:13 -07:00
Chris Robinson
81208acd6e
Add missing returns
2012-09-09 21:27:54 -07:00
Chris Robinson
f1ce139997
Use SSE to do 4 samples at once (non-HRTF direct mix), instead of to apply a matrix row
...
MaxCHannels no longer needs to be a multiple of 4 now, either.
2012-09-09 04:02:54 -07:00
Chris Robinson
2bf1979d4a
Move the target effect slot to the SendParams struct
2012-09-08 22:32:30 -07:00
Chris Robinson
89cab3cd39
Remove STACK_DATA_SIZE in favor of BUFFERSIZE
2012-09-08 22:09:34 -07:00
Chris Robinson
1c03025090
Separate the resampling and mixing steps
2012-09-08 21:34:36 -07:00
Chris Robinson
de006947ac
Increase MaxChannels to be a multiple of 4
2012-08-29 01:11:55 -07:00
Chris Robinson
ac4fc4026c
Add a device method to retrieve the active latency
...
This is effectively the time until the next update will be heard by the user,
or the closest approximation thereof, in nanoseconds.
2012-08-17 13:38:52 -07:00
Chris Robinson
6bd535bed0
Use wrappers for float-typed math functions
2012-06-29 02:12:36 -07:00
Chris Robinson
524c88c402
Test the squared length of a vector before normalizing
2012-06-28 20:54:10 -07:00
Chris Robinson
583dc8dbca
Don't use all caps for enum value names
2012-06-28 18:49:49 -07:00