1838 Commits

Author SHA1 Message Date
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
Chris Robinson
d237410d1d Add a QSA backend for QNX 2013-03-14 01:29:20 -07:00
Chris Robinson
2486f13dae Remove unnecessary NULL checks 2013-03-13 23:36:45 -07:00
Chris Robinson
3fd0f23e48 Add Chorus and Flanger effects
Code provided by Mike Gorchak
2013-03-13 23:31:12 -07:00
Chris Robinson
991aba286f Move the effect-specific get/set methods to where the effect is implemented 2013-03-13 21:53:42 -07:00
Chris Robinson
f1b0f67553 Build an appropriate channel map for PulseAudio 2013-02-08 18:59:48 -08:00
Chris Robinson
e358882f14 Destroy the ring buffer when closing down a portaudio device 2013-02-01 18:38:44 -08:00
Chris Robinson
564a182259 Avoid an underflow in the SSE mixers if BufferSize is less than 4 2012-12-24 05:49:44 -08:00
Chris Robinson
9cd086a707 Filter unneeded thread messages with MMDevApi 2012-12-24 05:37:53 -08:00
Chris Robinson
be25e6802d Add support for OpenSL ES 1.0.1 on Android 2012-12-12 14:36:58 -08:00
Chris Robinson
e51574c764 Trace the list of supported backends 2012-12-04 13:46:51 -08:00
Chris Robinson
893a1bedbc Use +/-90 degrees for stereo sources with non-HRTF stereo output. 2012-12-04 05:30:06 -08:00
Chris Robinson
4621a7b426 Add support for float32 output to CoreAudio 2012-12-03 11:50:02 -08:00
Chris Robinson
4808313e70 Use the correct multiplier for int32 output with CoreAudio 2012-12-03 10:44:02 -08:00
Chris Robinson
1fb9311d82 Lock the device before calling aluHandleDisconnect
PulseAudio causes an assert if being relocked inside a callback on the worker
thread, where aluHandleDisconnect is called. We can assume it's already locked
there, so just make sure the device is locked before being calling it.
2012-12-02 11:30:23 -08:00
Chris Robinson
dd34daed42 Trace the opened device name in alcCaptureOpenDevice 2012-12-02 06:37:34 -08:00
Chris Robinson
830428fb06 Use WARN when implicitly deleting resources with the context 2012-12-02 01:17:26 -08:00
Chris Robinson
0ca7ab2cf8 Explicitly check for malloc.h 2012-11-25 19:20:35 -08:00
Chris Robinson
a0c39989f5 malloc.h isn't standard, and is only needed for _aligned_malloc 2012-11-25 02:33:20 -08:00
Chris Robinson
209d09ae13 Avoid locking PulseAudio's mainloop when starting and stopping capture
The mainloop is already locked by the caller, and double-locking interferes
with the subsequent wait.
2012-11-19 16:50:03 -08:00
Chris Robinson
2d800e99e2 Fix off-by-one error in the makehrtf dither and add a resample option
Also fixes some size_t type warnings
2012-11-18 09:29:58 -08:00
Chris Robinson
0518ecca14 Avoid storing the SSE state if it's not supported 2012-11-13 15:20:36 -08:00
Chris Robinson
2f07c46e20 Include standard headers before conditional ones 2012-11-04 22:36:34 -08:00
Chris Robinson
3da1b540fd Use the stored buffer metrics for the mmdevapi buffer size 2012-11-04 22:35:35 -08:00
Chris Robinson
92dde81296 Add rudimentary latency tracking for mmdevapi
This won't be as granular as it could be, since it only updates when the wakeup
event trips (which may or may not happen more often than OpenAL's mix updates).
A more correct method would be to query GetCurrentPadding directly, but that
would require sending a message to the processing thread and waiting for a
reply, since we can't guarantee COM on the calling thread.
2012-11-04 08:35:39 -08:00
Chris Robinson
e2368eb960 Use an array to specify the offset for each channel of the device buffer
This effectively inverts the DevChannels array
2012-11-04 04:41:11 -08:00
Chris Robinson
3e71a7cb94 Rename some struct fields for DirectSound 2012-11-04 01:18:39 -08:00
Chris Robinson
b92ad830ef Avoid recreating the DSound primary buffer 2012-11-04 00:37:31 -07:00
Chris Robinson
e868dad61c Make a decimal value a float type 2012-10-31 06:58:16 -07:00
Chris Robinson
4a3d36a176 Finalize AL_SOFT_source_latency 2012-10-31 05:09:42 -07:00
Chris Robinson
3c3e3b123b Add a couple comments to the code 2012-10-26 20:11:59 -07:00
Chris Robinson
f02a9935c6 Avoid branching when clamping and converting float samples to integer 2012-10-26 15:31:14 -07:00
Chris Robinson
e2e502970c Move some math functions to where they're used 2012-10-25 17:24:22 -07:00
Chris Robinson
8a67e5cfa2 Use an asterisk to denote a requested format option in the trace 2012-10-16 07:46:04 -07:00
Chris Robinson
4f5aafe59f Put the HRTF DirectParams into an anonymous struct 2012-10-15 01:37:37 -07:00
Chris Robinson
a14383d6cc Constify the direct and send parameters given to the mixer 2012-10-15 01:31:58 -07:00
Chris Robinson
fe1903fb56 Use a separate step to deinterlace reverb samples 2012-10-14 11:55:03 -07:00
Chris Robinson
f0d27e5f91 Remove the unused Device parameter 2012-10-14 11:29:28 -07:00
Chris Robinson
a852669dce Store the output buffers in the DirectParams struct 2012-10-14 11:21:52 -07:00
Chris Robinson
3240894cd5 Remove the now-unused Source parameter from the DryMix methods 2012-10-14 11:04:36 -07:00
Chris Robinson
0b679167c9 Store some more HRTF info in the DirectParams struct 2012-10-14 10:57:11 -07:00
Chris Robinson
5ac0a93fba Mark some parameters as const and/or RESTRICT 2012-10-14 10:27:15 -07:00
Chris Robinson
5c70e6b9ab Don't add the dry gain to the mixing matrix 2012-10-13 11:10:58 -07:00