91 Commits

Author SHA1 Message Date
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
Chris Robinson
befa4e7528 Don't try to set FE_TOWARDZERO when it's not available 2012-06-28 18:27:45 -07:00
Chris Robinson
b4c7b3309a Only use _FPU_GETCW and _FPU_SETCW for x86 targets 2012-05-03 12:15:51 -07:00
Chris Robinson
aed35fd811 Use ComputeAngleGains for multi-channel sources and remove the unused lookup table stuff 2012-04-29 05:04:46 -07:00
Chris Robinson
611bd0b2d3 Add a method to calculate gains given a sound point and its half-width, and use it for reverb
The half-width ranges from 0 to pi, and essentially specifies the coverage area
around the listener. At 0, it's an infinitely small point sound and behaves
like a usual panning sound. At pi/2 it covers half the area, and at pi it
covers the whole area.
2012-04-28 08:21:53 -07:00
Chris Robinson
267d38cf20 Flip the parameters to aluCart2LUTpos, so it behaves a bit more like atan2 2012-04-28 03:58:58 -07:00
Chris Robinson
26456f13e1 Pass the direct/send params to the mixer instead of accessing through the source 2012-04-28 03:31:13 -07:00
Chris Robinson
2450ee1723 Use separate methods for the dry and wet mixing loops 2012-04-27 23:46:51 -07:00
Chris Robinson
2cdb58fb85 The mixer always uses floats 2012-04-26 07:50:17 -07:00
Chris Robinson
68ab232364 Use a separate loop to actually update DataPosFrac and DataPosInt 2012-04-26 06:44:37 -07:00
Chris Robinson
e394d14cda Use more proper enum names for the resampler 2012-02-12 08:45:19 -08:00
Chris Robinson
9f073b6f1b Use a proper enum value for setting the default distance model 2012-02-12 08:18:20 -08:00
Chris Robinson
fcf9034c2b Calculate the listener matrix when a new orientation is specified
This is so the matrix isn't derived each time a source is updated, and it will
make supporting user-defined matrices easier.
2011-10-30 08:27:24 -07:00
Chris Robinson
a5c02556e6 Add a work-around for cross-compiling with MinGW 2011-10-27 21:22:00 -07:00
Chris Robinson
75fee8c11f Add min/max/clamp methods for 64-bit int 2011-10-04 22:39:35 -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
bfa782f329 Define the values for F_PI and F_PI_2 directly instead of using M_PI 2011-09-30 22:53:47 -07:00
Chris Robinson
d3a6de3f86 Set the FPU into single-precision mode for mixer updates 2011-09-29 05:10:15 -07:00
Chris Robinson
f4925a0e6a Use inline functions to set/restore the FPU mode for mixer updates 2011-09-29 04:03:18 -07:00
Chris Robinson
cf56b0733b Look for and use atan2f, log10f, and floorf 2011-09-24 12:17:39 -07:00
Chris Robinson
b4f9f89480 Use float types for the resamplers instead of double 2011-09-23 23:03:59 -07:00
Chris Robinson
da62f50528 Check for asinf and use it 2011-09-23 22:44:34 -07:00
Chris Robinson
9266a37276 Move ConeScale and ZScale to ALu.c and alu.h, and make them floats 2011-09-23 22:33:37 -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
a4b1239f45 Use cosf and sinf when available
Also clear away a few more MSVC precision warnings
2011-09-22 01:00:44 -07:00
Chris Robinson
38a4d9a6c5 Get rid of the remaining min/max usage 2011-08-16 18:53:04 -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
8a51a7ea2d Use inline minF/maxF/clampF functions instead of the __min/__max macros 2011-08-16 04:21:58 -07:00
Chris Robinson
2f3bd5b5d9 Move an include to where it makes more sense to be 2011-07-23 05:53:53 -07:00
Chris Robinson
fad80a4f92 Don't cast for the float versions of math functions 2011-07-23 05:52:10 -07:00
Chris Robinson
202f57552a Use a proper enum for the distance model 2011-07-03 19:39:19 -07:00