Chris Robinson
a8deaf12f4
Combine the direct and send mixers
2014-06-13 13:34:19 -07:00
Chris Robinson
c29eb63489
Combine some dry and wet path types
2014-06-13 11:42:04 -07:00
Chris Robinson
ecdfcdbfa5
The lower value of the gain vector contains the closest target value
2014-05-21 21:20:44 -07:00
Chris Robinson
9317ec59b9
Don't pass the SendParams to the wet-path mixer
2014-05-18 10:35:11 -07:00
Chris Robinson
c9083d04fa
Don't pass the DirectParams to the dry-path mixer
2014-05-18 10:24:07 -07:00
Chris Robinson
29b5dae6aa
Pass some DirectParams as function parameters
2014-05-18 08:59:10 -07:00
Chris Robinson
bd2721dc7a
Use _mm_setr_ps instead of _mm_set_ps
...
Apparently _mm_set_ps loads in reverse order compared to _mm_load_ps, so
_mm_setr_ps should give what we really want.
2014-05-18 06:35:33 -07:00
Chris Robinson
db90985f6a
Remove unnecessary ifdefs
...
mixer_sse.c and mixer_neon.c are only compiled when the relavent headers are
found anyway.
2014-05-04 00:19:55 -07:00
Chris Robinson
a2bb4c3f13
Always use the current gains when mixing
...
The current gain gets explicitly set to the target when the stepping is
finished to ensure the target is still used. This way, however, will allow for
asynchronously 'canceling' a fade by setting the counter to 0.
2014-05-04 00:13:19 -07:00
Chris Robinson
34e96aef60
Make sure all gain steps are applied with the SSE and Neon mixers
2014-05-03 17:24:46 -07:00
Chris Robinson
f9d70aa9ef
Use _mm_set_ps() to set an __m128 instead of {}
2014-04-26 06:31:31 -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
b0d511a860
Store the HrtfState directly in the DirectParams
2014-03-23 02:45:50 -07:00
Chris Robinson
0c5cbafcd8
Use a union to combine HRTF and non-HRTF mixer params
2014-03-19 17:55:09 -07:00
Chris Robinson
9a4ded2491
Revert "Apply HRTF coefficient stepping separately"
...
This reverts commit 25b9c3d0c1
.
Conflicts:
Alc/mixer_neon.c
Unfortunately this also undoes the Neon-enhanced ApplyCoeffsStep method.
2014-02-23 21:17:09 -08:00
Chris Robinson
25b9c3d0c1
Apply HRTF coefficient stepping separately
2013-11-10 05:52:22 -08:00
Chris Robinson
79edd2cf3b
Use a macro for the silence threshold
2013-10-06 17:25:47 -07:00
Chris Robinson
6425480d40
Don't store the effect slot in SendParams
...
This makes it much more like DirectParams.
2013-10-06 10:11:01 -07:00
Chris Robinson
94884ed04b
Use a separate value for the maximum buffer channels
...
Unlike the device, input buffers are accessed based on channel numbers
instead of enums. This means the maximum number of channels they hold
depends on the number of channels any one format can have, rather than
the total number of recognized channels. Currently, this is 8 for 7.1.
2013-07-23 00:13:15 -07:00
Chris Robinson
a9fac12969
Work around some problems with KDevelop's parser
2013-06-18 14:33:39 -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
564a182259
Avoid an underflow in the SSE mixers if BufferSize is less than 4
2012-12-24 05:49:44 -08: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
a852669dce
Store the output buffers in the DirectParams struct
2012-10-14 11:21:52 -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
d4e82d441e
Combine multiple loops into one
2012-09-24 19:07:07 -07:00
Chris Robinson
2ceea21f76
Avoid mixing silence to output
...
"Silence" being less than -100dB.
2012-09-24 15:33:44 -07:00
Chris Robinson
12327da4fe
Remove SSE resamplers. They aren't gaining us much this way.
2012-09-24 14:47:06 -07:00
Chris Robinson
d1c93525ed
Fix matrix multiply used by the SSE cubic resampler
...
Also remove the 4-sample loop. It's not terribly effective.
2012-09-18 18:09:43 -07:00
Chris Robinson
79b6d89b3f
Explicitly give the wet buffer 1 channel
2012-09-16 08:27:50 -07:00
Chris Robinson
535e8fd0f7
Check the proper value for setting WetPendingClicks
2012-09-16 08:15:03 -07:00
Chris Robinson
a240abb6c8
Avoid building redundant mixers
2012-09-16 08:14:26 -07:00
Chris Robinson
dd9d30e248
Implement an SSE MixSend method
2012-09-16 06:19:39 -07:00
Chris Robinson
28086f6cb7
Implement an SSE cubic resampler
2012-09-14 07:01:58 -07:00
Chris Robinson
90e0c74721
Implement an SSE linear resampler
2012-09-14 04:48:53 -07:00
Chris Robinson
01183ad93b
Minor cleanups for variable declarations
2012-09-11 09:40:08 -07:00
Chris Robinson
4c5cb2189b
Use a non-interleaved DryBuffer
2012-09-11 06:32:42 -07:00
Chris Robinson
98ff6f990a
Do the filtering separately from the mixing
2012-09-11 05:56:19 -07:00
Chris Robinson
7e81918f7b
Update HRTF code
...
This update allows for much more flexibility in the HRTF data. It also allows
for HRTF table file names to include "%r" to represent the device's playback
rate (e.g. if you set hrtf-%r.mhr, then it will try to use hrtf-44100.mhr or
hrtf-48000.mhr depending if the device's output rate is 44100 or 48000,
respectively).
The makehrtf utility has also been updated to support more options and input
file formats, as well as the new mhr format.
2012-09-11 02:11:51 -07:00
Chris Robinson
9f208417df
Use the right method to clear a __m128 to 0
2012-09-09 04:09:31 -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
f56dddfa73
Implement MixDirect_SSE separately from the C and Neon versions
2012-09-09 00:53:54 -07:00
Chris Robinson
1c03025090
Separate the resampling and mixing steps
2012-09-08 21:34:36 -07:00
Chris Robinson
795909c39e
Minor cleanups for mixer_inc
2012-08-29 02:43:19 -07:00
Chris Robinson
3c042a054d
Add an SSE-enhanced path for applying the mixer matrix
2012-08-29 01:56:04 -07:00