Chris Robinson
b1ae44206f
Move ALEQFilter to alFilter.c/h and rename it to ALfilterState
2013-05-27 15:32:02 -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
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
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
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
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
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
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
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
Chris Robinson
44da54ec7f
Rename some inheritance macros
2013-05-21 02:30:11 -07:00
Chris Robinson
b6da74b6e2
Pre-scale the chorus and flanger delays to be in samples
2013-05-21 01:59:44 -07:00
Chris Robinson
7e9960f7f1
Avoid storing some chorus and flanger properties in the effect state
2013-05-21 01:38:43 -07:00
Chris Robinson
c6872d4d86
Process 64 samples at a time for chorus and flanger effects
2013-05-20 04:41:03 -07:00
Chris Robinson
5b706f3bdc
Process 64 samples at a time for some effects
...
This should help with the non-interleaved samples of the output, and
allow skipping channels that don't contribute to the output.
2013-05-20 04:16:48 -07:00
Chris Robinson
80459b13e4
Split flanger delay calculation into separate methods
2013-05-20 03:41:32 -07:00
Chris Robinson
012fbc36b9
Split chorus delay calculation into separate methods
2013-05-20 02:38:06 -07:00
Chris Robinson
4c436b106d
Use some macros to help with deriving types
2013-05-20 01:32:02 -07:00
Chris Robinson
6aa722808e
Clear all the old channel gains to 0 before setting them
2013-05-20 00:02:47 -07:00
Chris Robinson
c693e649e6
Fix a potential leak when mmdevapi fails to open
2013-05-19 03:19:19 -07:00
Chris Robinson
1976d64814
Avoid recalculating the same coefficient
2013-05-19 03:18:21 -07:00
Chris Robinson
78e7c1c27b
Implement distortion and equalizer effects
...
Code provided by Mike Gorchak
2013-05-18 01:33:01 -07:00
Chris Robinson
a7ad6080f0
Modulator fixes
...
Modulator functions return 0..1 instead of -1..+1
Apply high-pass filter before modulation
Increase fractional precision to 24 bits from 16
Thanks to Mike Gorchak
2013-05-18 00:43:09 -07:00
Chris Robinson
563f16dc2a
Fix overflow issues when converting float to int
...
32-bit floats can only reach between -16777215...+16777215 (25 bits) before it
starts losing whole-number accuracy. Some compiler optimizations may break
trying to multiply a float by 2147483647.0 when the result is given right to a
float parameter, causing it instead to multiply by the nearest representable
float value, 2147483648.0.
2013-04-22 00:52:50 -07:00
Chris Robinson
b313c881c0
Add a missing cast to silence MSVC
2013-03-22 11:21:21 -07:00
Chris Robinson
6bf8f01af5
Report the actual ALSA error if setting the buffer metrics fails
2013-03-18 05:21:41 -07:00
Chris Robinson
bf54de4984
Use less math to clamp floats to -1...+1
...
The previous code could have issues as precision lowers. This should hopefully
work better while only using one if check instead of two.
2013-03-17 09:07:55 -07:00
Chris Robinson
eb1080910e
Use force_align_arg_pointer for QSA
2013-03-15 04:32:46 -07:00