138 Commits

Author SHA1 Message Date
Chris Robinson
3324bab81e Mark a couple more arrays with restrict 2011-10-08 03:08:13 -07:00
Chris Robinson
75fee8c11f Add min/max/clamp methods for 64-bit int 2011-10-04 22:39:35 -07:00
Chris Robinson
9e11b0a8c6 Fix maximum BufferSize calculation 2011-10-04 22:35:01 -07:00
Chris Robinson
5861920453 Rename a variable to avoid confusion 2011-10-04 22:16:54 -07:00
Chris Robinson
eb277cc578 Remove some unneeded templates and parameters 2011-10-04 09:55:36 -07:00
Chris Robinson
20fd648729 Convert samples to float when copying to the stack 2011-10-04 09:47:08 -07:00
Chris Robinson
11caba9807 Use sample frames when handling the buffer length 2011-10-04 02:08:45 -07:00
Chris Robinson
35b4b31d57 Track the temp stack buffer using sample frames instead of bytes 2011-10-03 10:06:09 -07:00
Chris Robinson
0ada7b2da5 Copy only the gains needed for the channel being mixed 2011-09-24 22:24:26 -07:00
Chris Robinson
1dee1245ff A static source only has one buffer in the queue 2011-09-24 21:21:59 -07:00
Chris Robinson
2b0a63003f Cast a 64-bit variable to a 32-bit int 2011-09-24 00:52:58 -07:00
Chris Robinson
b4f9f89480 Use float types for the resamplers instead of double 2011-09-23 23:03:59 -07:00
Chris Robinson
f5195ee4f2 Remove the Buffer field from the source 2011-08-23 09:55:22 -07:00
Chris Robinson
38a4d9a6c5 Get rid of the remaining min/max usage 2011-08-16 18:53:04 -07:00
Chris Robinson
04dad28228 Use mini/maxi/clampi and minu/maxu/clampu to replace min/max calls 2011-08-16 18:33:10 -07:00
Chris Robinson
1e60481040 Use ARM Neon vector ops to apply HRTFs when available 2011-08-11 19:02:45 -07:00
Chris Robinson
887de0523f Scale the delay down once for the post-stepping mix loop 2011-07-17 02:34:35 -07:00
Chris Robinson
5f566ebf05 Fade between HRTF coefficients, to reduce noise from sudden changes 2011-07-16 16:24:01 -07:00
Chris Robinson
2a7bf1234b Use the correct send slot when mixing 2011-07-11 22:32:27 -07:00
Chris Robinson
75fa891e0a Store and use the send slot in the source params 2011-07-05 14:14:20 -07:00
Chris Robinson
21574f7e16 Scale the WetGain parameter directly instead of on each application 2011-07-05 14:00:11 -07:00
Chris Robinson
eefda551de Properly handle input samples for changes with the FIR coefficients
This makes sure previously processed samples are not changed due to changes in
the FIR filter. It also applies the coefficients in ascending order with the
values, to improve caching.
2011-07-03 02:14:33 -07:00
Chris Robinson
ac7ca07221 Get rid of a couple typedefs 2011-07-02 21:33:53 -07:00
Chris Robinson
1fc44d5788 Select the mixer during a source update 2011-06-25 00:13:56 -07:00
Chris Robinson
edf78b077e Use separate lines for HRTF history and values 2011-06-17 16:22:39 -07:00
Chris Robinson
7ddfacb58f Use a minimum phase HRTF data set
This reduces the coefficient size from 128 down to 32, with a set of delays
2011-06-03 01:06:00 -07:00
Chris Robinson
b838d123f8 Multiply the history offset in the filtering funcitons 2011-05-18 18:52:47 -07:00
Chris Robinson
c00b2f9254 Avoid looking in the buffer queue to find the frame size 2011-05-18 17:02:18 -07:00
Chris Robinson
06f5f0b7c8 Make mixers channel-count agnostic
As a result, this combines/removes a bunch of mixers
2011-05-17 13:25:15 -07:00
Chris Robinson
9f91ff4734 Move the channel loop to the outside of the sample mixing loop 2011-05-17 12:49:26 -07:00
Chris Robinson
2972de1047 Use function pointers to call the source mixer 2011-05-06 00:20:40 -07:00
Chris Robinson
0e824914b2 Use signed samples for 8-bit storage 2011-05-05 18:54:10 -07:00
Chris Robinson
db7ca2c7ca Combine the mono and multi-channel mixer templates 2011-05-03 16:34:28 -07:00
Chris Robinson
e2850df07e Use the same filters for mono sources and multi-channel 2011-05-03 16:18:46 -07:00
Chris Robinson
8c705cc4ea Mark some mixer pointers as restricted 2011-05-02 17:14:57 -07:00
Chris Robinson
fd795a7eeb Add casts to silence some warnings 2011-05-02 15:04:35 -07:00
Chris Robinson
abdc254e55 Use a pointer-to-arrays for the local HRTF coefficients 2011-05-02 13:35:13 -07:00
Chris Robinson
f843b7e2e3 Implement HRTF mixers for multi-channel sources 2011-05-02 02:22:30 -07:00
Chris Robinson
eea86ab891 Use flags instead of separate bools 2011-05-01 18:18:37 -07:00
Chris Robinson
56d9418119 Add an HRTF filter for mono sources
The data is based on the KEMAR HRTF data provided by MIT, which can be found at
<http://sound.media.mit.edu/resources/KEMAR.html>. The compact measurements
were used. See hrtf_tables.inc for more information.

The filter is only available for stereo output, using a 44100hz playback rate.
Note also that it currently only applies to mono sounds, and the cf_level and
head_dampen config options are ignored while it is active.
2011-05-01 13:59:44 -07:00
Chris Robinson
6713a47d38 Fix looping on loop points 2011-02-06 01:07:37 -08:00
Chris Robinson
2b7324c06e Avoid using a variable for array sizes and const variable initialization 2011-01-23 22:30:18 -08:00
Chris Robinson
c95bd6cadf Fix loop handling when traversing the buffer queue backwards 2011-01-23 15:04:42 -08:00
Chris Robinson
031111014b Be consistent with variable name use 2010-12-09 18:09:47 -08:00
Chris Robinson
3deaa2fad3 Combine stereo and multi-channel templates 2010-12-09 17:14:12 -08:00
Chris Robinson
c3cd4c80b2 Use a matrix when rendering to the dry buffer 2010-12-09 16:37:23 -08:00
Chris Robinson
d1ca8b4470 Use simple loops instead of several explicit lines for the mono mixer 2010-12-09 05:05:42 -08:00
Chris Robinson
72e3386c6a Be a bit more generic with the multi-channel mixer loops 2010-12-09 04:41:52 -08:00
Chris Robinson
9e8fb89a52 Rename OUTPUTCHANNELS to something more descriptive 2010-12-01 18:33:17 -08:00
Chris Robinson
0cf32e2946 Reorder some parameters for consistency 2010-11-29 19:48:18 -08:00