Commit Graph

2178 Commits

Author SHA1 Message Date
Chris Robinson f42f655ea9 Don't unlock the pulseaudio mainloop when mixing
Lock contention could cause a lengthy delay between mixing and writing the
audio. There shouldn't be any risk of dead-locking as the device lock should
never be held when the mainloop gets locked.
2012-08-12 03:52:38 -07:00
Chris Robinson 8304fc1bef Handle the scalar values a bit better 2012-08-11 06:20:24 -07:00
Chris Robinson ea84fee952 Use a more efficient method to blend HRTF delays and coefficients 2012-08-11 02:16:34 -07:00
Chris Robinson d6fd52a0e5 Add an option for wide stereo sources
Replaces the old stereodup option
2012-08-09 05:38:07 -07:00
Chris Robinson 0dde7dd88a Use a more efficient method to offset the speaker angles when computing gains 2012-08-09 02:31:19 -07:00
Chris Robinson 1323e11701 Interpolate between HRTF delay samples using the delay fraction 2012-07-20 15:08:11 -07:00
Chris Robinson 7ac9944bb3 Increase the directional change sensitivity for the HRTF delta 2012-07-20 14:38:49 -07:00
Chris Robinson e32e2fd6b8 Fix an inadvertent change in the HRTF coefficient stepping value array size 2012-07-19 11:49:43 -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 1c096b101d Minor typo fixes 2012-06-28 19:57:23 -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 bc6751237c Clamp the Y position before trying to get the elevation 2012-06-28 17:26:00 -07:00
Chris Robinson 6f3be31b60 Add some includes 2012-06-20 03:01:19 -07:00
Chris Robinson 8001d86751 Add missing include 2012-06-19 22:15:19 -07:00
Chris Robinson acca3e5a21 Use a proper method to wait for a PulseAudio operation 2012-06-19 10:37:09 -07:00
Chris Robinson d17f835e74 Remove an unused include 2012-06-19 04:02:55 -07:00
Chris Robinson ef1f8aa9a0 Don't needlessly verify a device 2012-06-19 00:25:45 -07:00
Chris Robinson a5ac6eb524 Remove an outdated comment about _REENTRANT 2012-06-18 02:04:10 -07:00
Chris Robinson ac84d95c6e Silence some GCC warnings 2012-06-17 22:17:03 -07:00
Chris Robinson 785f52aa29 Only try float32 with DSound when specifically requested
Some hardware drivers seem to have a bug where a buffer descriptor with a
32-bit float sample type ends up creating a non-float32 buffer.
2012-06-17 04:13:01 -07:00
Chris Robinson 051195a991 Avoid failing if ALSA can't set a buffer or period time near to our request
These functions should not fail, but there seem to be bugs that cause them to
sometimes. We're flexible enough to handle almost anything it throws back at us
though, so anything is better than nothing here.
2012-06-16 23:02:59 -07:00
Chris Robinson 90ca6675c2 Allow PulseAudio to spawn a server by default
Since only one backend is used at a time now, the issues with device ownership
aren't really prevelant anymore. An application that tries to open all
enumerated devices won't run into the problem of spawning a server and end up
preventing other backend devices from working.
2012-06-16 22:37:45 -07:00
Chris Robinson 0db9730a50 Add an option to allow PulseAudio to move streams
This could be made the default, if there's a safe way to update the AL device
specifier.
2012-06-16 22:32:19 -07:00
Chris Robinson ad2643d8af Clarify some comments, fix some definition ordering, and add some includes 2012-06-15 23:46:09 -07:00
Chris Robinson 46840ee787 Add DEVPKEY_Device_FriendlyName declaration for mingw-w64 compatibility 2012-06-14 18:10:10 -07:00
Chris Robinson 1e0282a238 Add some more entries to .gitignore 2012-05-09 16:30:22 -07:00
Chris Robinson 259e4f5b38 Rename AllDevice -> AllDevices 2012-05-09 16:28:16 -07:00
Chris Robinson e44229c74e Clamp the ALSA period time between min and max if setting near fails 2012-05-08 01:23:53 -07:00
Chris Robinson 92827cc467 Clamp the ALSA buffer time between min and max if setting near fails
It seems there's some bugs with snd_pcm_hw_params_set_buffer_time_near that
cause it to return "invalid argument" despite a valid nearby buffer time being
available. Clamping the buffer time seems to mitigate the issue a bit.
2012-05-07 11:42:59 -07:00
Chris Robinson dd3d5bc2d4 Look for libsndio.so.2 instead of libsndio.so 2012-05-05 16:19:51 -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 010a66487d Use 2 chained one-pole filters for the wet path 2012-04-30 09:33:00 -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 8d9838012d Remove the stereodup option
There's better ways to do it now with "wide" sound sources.
2012-04-29 04:44:53 -07:00
Chris Robinson 57d36ec582 Fix a couple comment typos, and a minor cleanup 2012-04-29 03:39:08 -07:00
Chris Robinson febc2a50cb Use ComputeAngleGains for 3D sounds 2012-04-28 13:06:16 -07:00
Chris Robinson 74e128bd0f Fix ComputeAngleGains
The old code would improperly handle speakers just inside or outside the
coverage area if it had to be inverted. It also didn't properly handle when
only one speaker was outside of the covered area.
2012-04-28 12:12:02 -07:00
Chris Robinson c34d78f417 Use ComputeAngleGains for the echo and dedicated effects 2012-04-28 08:24:09 -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 2484c44db0 Apply the listener gain with the filter 2012-04-28 03:13:37 -07:00
Chris Robinson a8a13fcbd8 Move the HrtfParams into the DirectParams 2012-04-28 02:23:53 -07:00
Chris Robinson 0a193c5645 Move the direct and send params into separate different types 2012-04-28 01:32:52 -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 67f1cdfcbe Store the speaker angles in the device 2012-04-27 07:38:17 -07:00
Chris Robinson 549d542a31 Reorganize some ALsource fields 2012-04-27 01:36:13 -07:00
Chris Robinson 2cdb58fb85 The mixer always uses floats 2012-04-26 07:50:17 -07:00