Commit Graph

67 Commits

Author SHA1 Message Date
Chris Robinson
61be01efc1 Rename SpeakerGain to ChannelGain 2012-02-10 00:29:47 -08:00
Chris Robinson
c56b2734fd Use loops to write reverb output 2011-11-02 08:15:10 -07:00
Chris Robinson
5a1959f0cf Make a floating-point constant a float type 2011-10-02 22:01:51 -07:00
Chris Robinson
a486045f7c Improve index calculation for reverb modulation updates 2011-10-01 02:38:28 -07:00
Chris Robinson
0e7dc93681 Add some formatting spaces to the reverb state struct 2011-10-01 02:09:17 -07:00
Chris Robinson
a7bbf7a741 Rename LOWPASSFREQCUTOFF to LOWPASSFREQREF 2011-09-30 23:07:15 -07:00
Chris Robinson
9e2600cac4 Use fast float-to-int conversions for some mixer-related code 2011-09-29 06:55:00 -07:00
Chris Robinson
cf56b0733b Look for and use atan2f, log10f, and floorf 2011-09-24 12:17:39 -07:00
Chris Robinson
d9544d006b Use aluAtan instead of atan 2011-09-24 00:04:34 -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
0ceea27b44 Remove the effect slot parameter from the effect process method 2011-09-12 00:44:52 -07:00
Chris Robinson
8028770901 Avoid accessing EAX-only reverb properties for non-EAX updates 2011-09-11 08:50:48 -07:00
Chris Robinson
d51b93f869 Remove the union from the effect parameter types 2011-09-11 07:42:23 -07:00
Chris Robinson
370c9f553d Trace the reverb buffer size 2011-09-02 01:13:22 -07:00
Chris Robinson
e80aa008b2 Combine the reverb effects
Updating and processing still differs depending on whether standard or EAX
reverb is used or not. The only functional difference should be that the
allocated buffer (and subsequent offsets) take into account the modulation
and echo times.
2011-09-01 20:06:51 -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
8a51a7ea2d Use inline minF/maxF/clampF functions instead of the __min/__max macros 2011-08-16 04:21:58 -07:00
Chris Robinson
77128d298e Add an option to emulate EAX reverb using standard reverb 2011-07-20 22:53:46 -07:00
Chris Robinson
1e8a379a03 Add a config option to boost reverb output 2011-07-20 22:26:16 -07:00
Chris Robinson
9723c553b6 Scale reverb output based on the number of channels
A scale of sqrt(2/numchannels) is used so the perceived volume matches as if it
was stereo output, which seems to match other implementations.
2011-07-20 19:57:24 -07:00
Chris Robinson
c9b6bc848f Simplify some reverb update calculations 2011-07-17 17:51:13 -07:00
Chris Robinson
ce6db53e5f Apply the slot gain during the effect update method 2011-07-16 03:35:51 -07:00
Chris Robinson
3bd7256dc8 Pass the effect slot to the effect update method 2011-07-16 03:02:16 -07:00
Chris Robinson
ac7ca07221 Get rid of a couple typedefs 2011-07-02 21:33:53 -07:00
Chris Robinson
a9d9553fff Use a multi-dimensional array for the panning LUT 2011-05-21 17:45:54 -07:00
Chris Robinson
35a0430c81 Store the separate effect parameters in a union 2011-05-20 09:36:36 -07:00
Chris Robinson
c316766144 Use lerp() in a couple more places 2011-05-18 18:09:04 -07:00
Chris Robinson
13397feccf Don't inline CalcLimitedHfRatio 2011-02-07 23:58:40 -08:00
Chris Robinson
9e8fb89a52 Rename OUTPUTCHANNELS to something more descriptive 2010-12-01 18:33:17 -08:00
Chris Robinson
de8b7fbc5f Share the interpolation functions and use them in the reverb effect 2010-11-26 01:07:54 -08:00
Chris Robinson
98d78f7ff9 Slightly improve channel gain calculations 2010-11-26 00:24:54 -08:00
Chris Robinson
e007dc3614 Fix early/late reverb panning, and only output reverb on available channels 2010-08-09 05:11:58 -07:00
Chris Robinson
e3a70e5021 Scale output of effects to compensate for device down-mixing 2010-05-12 04:56:03 -07:00
Chris Robinson
aace50ebf4 Store the panning LUT in the device 2010-04-08 15:58:11 -07:00
Alam Arias
e3637b8452 use ALintptrEXT in alcReverb.c 2010-03-18 16:32:49 -07:00
Chris Robinson
f37cfc486d Pass the context to alSetError 2010-03-16 17:35:51 -07:00
Chris Robinson
1f10195c47 Use powf when available 2010-03-07 22:12:33 -08:00
Chris Robinson
656a406377 Use an inline function to calculate the low-pass filter coefficient 2009-12-09 07:21:59 -08:00
Chris Robinson
e09b6020a6 Fix typo for reverb creation 2009-12-09 06:46:06 -08:00
Chris Robinson
d1f3dbb9a1 Make modulation index 0 map to offset 0 2009-11-23 04:14:12 -08:00
Chris Robinson
c5ee010640 The echo should not take energy-attenuated input 2009-11-22 15:37:32 -08:00
Chris Robinson
6a667b36d1 Reorganize and improve the reverb effect
Code supplied by Christopher Fitzgerald. This update also implements the echo
and modulation parameters.
2009-11-19 14:05:04 -08:00
Chris Robinson
8d1da6a8ca Move NextPowerOf2 to alMain.h 2009-11-19 09:50:15 -08:00
Chris Robinson
ff8e09495d Move aluCart2LUTpos to alu.h 2009-11-19 09:24:35 -08:00
Chris Robinson
d3ecbd75af Clear the echo and delay lines even if the buffer doesn't change size 2009-10-21 02:03:33 -07:00
Chris Robinson
75b65ab2a2 Remove the Frequency field from the context 2009-10-20 13:47:55 -07:00
Chris Robinson
f14cf8289e Add a method to update device-dependant effect parameters.
The effect state's update method will be called afterwards
2009-10-20 08:31:44 -07:00
Chris Robinson
6d1d61026d Be context-agnostic in the effect Create functions
This allows the effect Update functions to handle the playback frequency being
changed. By default the effects assume a maximum frequency of 192khz, however,
it can go higher at the cost of the sample buffers being cleared and the risk
of an abort() if reallocation fails
2009-10-19 07:46:53 -07:00
Chris Robinson
3c122b0bef Set an error if effect creation fails 2009-05-31 11:54:49 -07:00