Commit Graph

2511 Commits

Author SHA1 Message Date
Chris Robinson 48aa1e10d6 Use the high-shelf filter in place of low-pass
They effectively both work to lower (or raise) high frequencies. However, the
high-shelf performs better when gain=1.
2013-05-28 10:57:38 -07:00
Chris Robinson 6556626055 Simplify and fix some filter gain calculations 2013-05-27 21:57:22 -07:00
Chris Robinson 59a38442ac Use ALfilterState for the modulator high pass filter 2013-05-27 21:24:28 -07:00
Chris Robinson 0c7c5327c9 Use ALfilterState for the master echo and reverb filters 2013-05-27 19:55:00 -07:00
Chris Robinson 3e663d7307 Remove an unused method 2013-05-27 19:33:12 -07:00
Chris Robinson feeec34333 Use ALfilterState for the source direct and send filters 2013-05-27 19:14:02 -07:00
Chris Robinson bcf4842eb3 Fix filter coefficient pre-calc
a[0] was getting set to 1 before a[1] and a[2] were normalized. a[0] needs to
be done last.
2013-05-27 17:47:13 -07:00
Chris Robinson b1ae44206f Move ALEQFilter to alFilter.c/h and rename it to ALfilterState 2013-05-27 15:32:02 -07:00
Chris Robinson 0ad71a67d4 Store pointers to the getFactory funcs in the map 2013-05-27 13:41:16 -07:00
Chris Robinson 334a7c1d59 Cleanup the ALeffectStateFactory_create methods
Get rid of the ALeffectStateFactory_create macro, and use the VCALL_NOARGS
helper (requires adding the 'this' factory parameter).
2013-05-27 13:16:17 -07:00
Chris Robinson 8d874512b6 No-op if DELETE_OBJ is given a NULL pointer 2013-05-27 12:07:54 -07:00
Chris Robinson 9e84f38a46 Use generic VCALL[_NOARGS] macros instead of type-specific wrappers 2013-05-27 11:48:29 -07:00
Chris Robinson 06c8442af6 Rename a variable 2013-05-26 17:10:57 -07:00
Chris Robinson 0a4be3470e Pre-apply the a[0] EQ filter coefficient
Saves 20 fp divisions per sample
2013-05-26 17:04:45 -07:00
Chris Robinson 4bf5466f64 Use SET_ERROR_AND_RETURN in a few more places 2013-05-26 16:34:08 -07:00
Chris Robinson 82caba6bbe Use the helper macros in more places 2013-05-26 08:54:34 -07:00
Chris Robinson 8808159d55 Add helper macros to set an error and return, and use it in a few places 2013-05-26 00:01:07 -07:00
Chris Robinson 2759239754 Define the ALeffect typedef with the struct 2013-05-25 22:31:24 -07:00
Chris Robinson d1c5599c8e Use an ALeffectProps union to store the effect properties 2013-05-25 22:07:31 -07:00
Chris Robinson 6571d80540 Use a Delete method for deletable objects 2013-05-25 21:04:00 -07:00
Chris Robinson 2da6caeaa6 Update the Null effect so it can act as a guide to new effects 2013-05-25 17:42:34 -07:00
Chris Robinson e157238ce7 Use vtables for setting effect properties 2013-05-24 23:26:59 -07:00
Chris Robinson 49446c7b32 Set cmake policy CMP0005 and avoid unnecessary escape sequences 2013-05-24 23:25:35 -07:00
Chris Robinson f105a8bb4b Add quotes around an ADD_DEFINITIONS parameter 2013-05-24 10:36:55 -07:00
Chris Robinson 18807e06fe Check for __restrict in a way to make MSVC happy, hopefully 2013-05-24 00:45:25 -07:00
Chris Robinson 357cf72ab3 Move remaining effects to the effects subdir 2013-05-23 21:33:16 -07:00
Chris Robinson 2376683128 Move reverb to the effects subdir 2013-05-23 19:48:24 -07:00
Chris Robinson f667c028e6 Move the AL_EFFECT_NULL state into a separate file 2013-05-23 18:50:07 -07:00
Chris Robinson dbb6da8c47 Reword a couple cmake option names 2013-05-23 17:27:57 -07:00
Chris Robinson 4f068b51e5 Don't explicitly check for fesetround
It's C99 standard with fenv.h, which we already check for.
2013-05-22 23:23:45 -07:00
Chris Robinson be4a4d7468 Use fegetenv/fesetenv to backup and restore the FPU state 2013-05-22 23:05:26 -07:00
Chris Robinson eb15b13ca1 Merge the fesetround FPU handler with the assembly one
The assembly is only needed for SSE since we can't access the intrinsics
without the -msse switch, which itself would cause SSE code to be generated
elsewhere automtically.
2013-05-22 22:21:00 -07:00
Chris Robinson 38a9e642df Check for SSE2 and set the denormals-are-zero bit for mixing if available 2013-05-22 17:04:37 -07:00
Chris Robinson b80efeb87d Set the correct SSE bits for round-to-zero 2013-05-22 16:31:43 -07:00
Chris Robinson 52efb8d7f4 Use restrict instead of RESTRICT 2013-05-22 15:11:39 -07:00
Chris Robinson a6fa4a8bc2 Recognize DSSPEAKER_5POINT1_SURROUND (and 7POINT1) with DSound 2013-05-22 14:25:33 -07:00
Chris Robinson 1bed3cff21 Remove an unnecessary check for vsnprintf 2013-05-22 14:24:30 -07:00
Chris Robinson cdbb0722f6 Avoid using a temp buffer for al_print
It's now using two *printf calls, which unfortuantely means there could be a
race between the two and cause the message to break up if something else tries
to print to the same file. This shouldn't really be a big deal since al_print
isn't used that often, and it now allows for lines of practically unlimited
length.
2013-05-22 03:02:39 -07:00
Chris Robinson 2eb8a520d4 Add casts to silence MSVC 2013-05-22 00:07:23 -07:00
Chris Robinson 0a07ed14c2 Rename DELETE to DELETE_OBJ
Because Windows.
2013-05-21 23:42:40 -07:00
Chris Robinson 604726c639 Add a DELETE macro to help destroy objects 2013-05-21 13:27:27 -07:00
Chris Robinson eaccaa5028 Rename the effect state's Destroy method to Destruct 2013-05-21 13:02:56 -07:00
Chris Robinson a5d94f5d09 Use factories to create and destroy effect states 2013-05-21 12:47:18 -07:00
Chris Robinson af1936be5d Remove some unused code 2013-05-21 07:24:53 -07:00
Chris Robinson e4186f4903 Use a properly-defined history for the FILTER struct 2013-05-21 07:10:24 -07:00
Chris Robinson 3ee0f8feb9 Avoid storing the device frequency in the equalizer 2013-05-21 05:33:54 -07:00
Chris Robinson 5c8c40afef Auto-generate wrappers to upcast objects before calling user methods 2013-05-21 05:02:25 -07:00
Chris Robinson 5516d8df0b Use macros to help define vtables for effect states 2013-05-21 04:18:02 -07:00
Chris Robinson fba9ac6db1 Avoid storing the device frequency in the distortion state 2013-05-21 02:43:59 -07:00
Chris Robinson de387c853f The effect state being destroyed can't be NULL 2013-05-21 02:37:27 -07:00