Commit Graph

51 Commits

Author SHA1 Message Date
Chris Robinson
2a6dd2f243 Fix a type mismatch 2012-10-07 08:19:09 -07:00
Chris Robinson
eedbd1e81c Improve a couple error traces with the HRTF loader 2012-09-18 12:15:43 -07:00
Chris Robinson
41f52fdd6a Restore support for the previous mhr format 2012-09-12 07:25:05 -07:00
Chris Robinson
613ce3f976 Update fnamelist after handling % markers 2012-09-12 04:55:03 -07:00
Chris Robinson
ce8a0a9fd5 Use PATH_MAX for the fname length 2012-09-12 03:45:26 -07:00
Chris Robinson
f59e4ba7c2 Improve parsing hrtf_tables filenames 2012-09-12 03:41:41 -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
ea84fee952 Use a more efficient method to blend HRTF delays and coefficients 2012-08-11 02:16:34 -07:00
Chris Robinson
1323e11701 Interpolate between HRTF delay samples using the delay fraction 2012-07-20 15:08:11 -07:00
Chris Robinson
7ac9944bb3 Increase the directional change sensitivity for the HRTF delta 2012-07-20 14:38:49 -07:00
Chris Robinson
6bd535bed0 Use wrappers for float-typed math functions 2012-06-29 02:12:36 -07:00
Chris Robinson
703d72f20e Use the correct loop count for reading the elevation offsets from external HRTF files 2012-03-17 03:42:07 -07:00
Chris Robinson
f7a8e3db35 Don't assume the calculated HRTF delta for the gain difference is less than 1 2012-03-12 13:31:19 -07:00
Chris Robinson
842a698f2b Add a text file explaining OpenAL Soft's HRTF support and data file format 2012-03-11 19:27:40 -07:00
Chris Robinson
e1cbf06653 Don't use a double when calculating the HRTF coefficients 2011-10-02 22:05:03 -07:00
Chris Robinson
b6b3ca6e6f Use inline assembly for fast float-to-int conversions 2011-09-29 03:51:46 -07:00
Chris Robinson
cf56b0733b Look for and use atan2f, log10f, and floorf 2011-09-24 12:17:39 -07:00
Chris Robinson
6a2b2a0aed Silence MSVC warnings in the HRTF code 2011-09-23 23:16:42 -07:00
Chris Robinson
470b506952 Use macros for float-typed PI values, to avoid manual casts everywhere 2011-09-22 11:17:01 -07:00
Chris Robinson
edb386eb1e Add a ConfigValueStr function, to return the string through a parameter 2011-09-19 11:29:18 -07:00
Chris Robinson
a7b9ee6bcb Allow loading multiple HRTF tables through a comma-separated list 2011-09-18 11:10:32 -07:00
Chris Robinson
0e5c221a3c Dynamically allocate space for HRTF tables 2011-09-18 10:09:32 -07:00
Chris Robinson
25f7c27043 Store the HRTF tables used in the device 2011-09-18 09:52:40 -07:00
Chris Robinson
4e903c84cf Fix comment on external HRTF file format 2011-09-15 02:27:02 -07:00
Chris Robinson
ae3ec4e767 Trace compatible HRTF formats when loading instead of on error 2011-09-15 02:05:48 -07:00
Chris Robinson
3a2fa18744 Log the function name instead of the source file and line number 2011-09-02 02:00:37 -07:00
Chris Robinson
9f5bf5f930 Rename minF/maxF/clampF to minf/maxf/clampf for consistency 2011-08-16 18:40:21 -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
a96f817738 Avoid a float->int->float conversion 2011-08-16 06:13:55 -07:00
Chris Robinson
8a51a7ea2d Use inline minF/maxF/clampF functions instead of the __min/__max macros 2011-08-16 04:21:58 -07:00
Chris Robinson
45a245d7de Round the HRTF sample step count 2011-08-11 21:43:21 -07:00
Chris Robinson
244d60fb96 Slightly improve the gain change delta calculation 2011-07-19 00:43:31 -07:00
Chris Robinson
0ae9638aa5 Add a lost comment 2011-07-18 17:44:37 -07:00
Chris Robinson
87b3520d02 Fix GetMovingHrtfCoeffs return type 2011-07-17 07:16:10 -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
54b5f35125 Warn about HRTF being disabled in the compatibility check function 2011-07-16 00:39:13 -07:00
Chris Robinson
23bfb03d2a Improve the external HRTF data file format
Although more parameters are read from the file, some must currently conform to
specific values. In the future, these restrictions may be lifted.
2011-07-16 00:22:01 -07:00
Chris Robinson
7381b1a696 Make the sample rate part of the HRTF struct 2011-07-15 23:45:03 -07:00
Chris Robinson
17773c5644 Rename the ERROR macro to ERR 2011-07-13 01:43:00 -07:00
Chris Robinson
7bedd9ef7a Replace some AL_PRINT calls with proper logging 2011-07-10 22:32:44 -07:00
Chris Robinson
6020b964c7 Fix some formatting 2011-07-04 22:36:51 -07:00
Chris Robinson
d307ee8c2f Implement a lerped lookup of the HRTF coefficients/delays
Code supplied by Christopher Fitzgerald
2011-07-04 07:20:38 -07:00
Chris Robinson
212b187447 Add a function to check if a device is compatible with the Hrtf filter 2011-06-25 21:39:36 -07:00
Chris Robinson
913c70557d Fix formatter for size_t 2011-06-24 15:03:29 -07:00
Chris Robinson
edf78b077e Use separate lines for HRTF history and values 2011-06-17 16:22:39 -07:00
Chris Robinson
aab4f85383 Change HRTF table user input format 2011-06-03 03:15:13 -07:00
Chris Robinson
7402e3743d Readd the default HRTF filter (based on the diffuse set) 2011-06-03 01:47:33 -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
7396aaf2c2 Fix HRTF elevation calculation 2011-05-19 17:57:14 -07:00
Chris Robinson
48def2fecb Properly handle elevations that don't have angles up to 180 2011-05-03 03:15:28 -07:00