openal-soft/openal-hmr.git
11 years agoFix matrix multiply used by the SSE cubic resamplermaster
Chris Robinson [Wed, 19 Sep 2012 01:08:57 +0000 (18 18:08 -0700)]
Fix matrix multiply used by the SSE cubic resampler

Also remove the 4-sample loop. It's not terribly effective.

11 years agoPrecision control bits don't exist with SSE
Chris Robinson [Tue, 18 Sep 2012 22:08:36 +0000 (18 15:08 -0700)]
Precision control bits don't exist with SSE

11 years agoImprove a couple error traces with the HRTF loader
Chris Robinson [Tue, 18 Sep 2012 19:15:43 +0000 (18 12:15 -0700)]
Improve a couple error traces with the HRTF loader

11 years agofpu_control.h is no longer used
Chris Robinson [Tue, 18 Sep 2012 18:28:47 +0000 (18 11:28 -0700)]
fpu_control.h is no longer used

11 years agoWin64 doesn't allow _controlfp or __control87_2 to set the precision control bits
Chris Robinson [Tue, 18 Sep 2012 18:20:48 +0000 (18 11:20 -0700)]
Win64 doesn't allow _controlfp or __control87_2 to set the precision control bits

11 years agoFix a typo in a comment
Chris Robinson [Mon, 17 Sep 2012 14:48:57 +0000 (17 07:48 -0700)]
Fix a typo in a comment

11 years agoAvoid correcting for more non-existing clicks
Chris Robinson [Sun, 16 Sep 2012 16:04:37 +0000 (16 09:04 -0700)]
Avoid correcting for more non-existing clicks

11 years agoDon't try to correct for non-existing clicks.
Chris Robinson [Sun, 16 Sep 2012 15:42:36 +0000 (16 08:42 -0700)]
Don't try to correct for non-existing clicks.

11 years agoExplicitly give the wet buffer 1 channel
Chris Robinson [Sun, 16 Sep 2012 15:27:50 +0000 (16 08:27 -0700)]
Explicitly give the wet buffer 1 channel

11 years agoCheck the proper value for setting WetPendingClicks
Chris Robinson [Sun, 16 Sep 2012 15:15:03 +0000 (16 08:15 -0700)]
Check the proper value for setting WetPendingClicks

11 years agoAvoid building redundant mixers
Chris Robinson [Sun, 16 Sep 2012 15:14:26 +0000 (16 08:14 -0700)]
Avoid building redundant mixers

11 years agoImplement an SSE MixSend method
Chris Robinson [Sun, 16 Sep 2012 13:19:39 +0000 (16 06:19 -0700)]
Implement an SSE MixSend method

11 years agoProperly restore the SSE control word with __control87_2
Chris Robinson [Sun, 16 Sep 2012 13:01:48 +0000 (16 06:01 -0700)]
Properly restore the SSE control word with __control87_2

11 years agoProperly handle the SSE control word
Chris Robinson [Sun, 16 Sep 2012 10:19:53 +0000 (16 03:19 -0700)]
Properly handle the SSE control word

11 years agoUse __control87_2 when available
Chris Robinson [Sun, 16 Sep 2012 08:44:45 +0000 (16 01:44 -0700)]
Use __control87_2 when available

11 years agoUse a struct to store the FPU mode
Chris Robinson [Sun, 16 Sep 2012 08:35:16 +0000 (16 01:35 -0700)]
Use a struct to store the FPU mode

11 years agoAdd missing source property retrievals
Chris Robinson [Fri, 14 Sep 2012 16:02:36 +0000 (14 09:02 -0700)]
Add missing source property retrievals

11 years agoImplement an SSE cubic resampler
Chris Robinson [Fri, 14 Sep 2012 14:01:58 +0000 (14 07:01 -0700)]
Implement an SSE cubic resampler

11 years agoShorten a warning
Chris Robinson [Fri, 14 Sep 2012 12:05:20 +0000 (14 05:05 -0700)]
Shorten a warning

11 years agoImplement an SSE linear resampler
Chris Robinson [Fri, 14 Sep 2012 11:48:23 +0000 (14 04:48 -0700)]
Implement an SSE linear resampler

11 years agoEnsure the ResampledBuffer is aligned
Chris Robinson [Fri, 14 Sep 2012 11:16:49 +0000 (14 04:16 -0700)]
Ensure the ResampledBuffer is aligned

11 years agoUse a source param for the resampler and move them to the mixer source
Chris Robinson [Fri, 14 Sep 2012 11:13:18 +0000 (14 04:13 -0700)]
Use a source param for the resampler and move them to the mixer source

11 years agoRemove an unused header
Chris Robinson [Fri, 14 Sep 2012 10:10:12 +0000 (14 03:10 -0700)]
Remove an unused header

11 years agoMove a couple macros to more appropriate headers
Chris Robinson [Fri, 14 Sep 2012 09:52:37 +0000 (14 02:52 -0700)]
Move a couple macros to more appropriate headers

11 years agoFix up some more header includes
Chris Robinson [Fri, 14 Sep 2012 09:42:36 +0000 (14 02:42 -0700)]
Fix up some more header includes

11 years agoDon't include alu.h in alMain.h
Chris Robinson [Fri, 14 Sep 2012 09:14:29 +0000 (14 02:14 -0700)]
Don't include alu.h in alMain.h

11 years agoEnable flush-to-zero mode when possible
Chris Robinson [Fri, 14 Sep 2012 08:10:19 +0000 (14 01:10 -0700)]
Enable flush-to-zero mode when possible

11 years agoMove a couple methods to where they're used
Chris Robinson [Wed, 12 Sep 2012 14:57:50 +0000 (12 07:57 -0700)]
Move a couple methods to where they're used

11 years agoRestore support for the previous mhr format
Chris Robinson [Wed, 12 Sep 2012 14:25:05 +0000 (12 07:25 -0700)]
Restore support for the previous mhr format

11 years agoAdd a note about the hrtf_tables filename markers
Chris Robinson [Wed, 12 Sep 2012 12:34:42 +0000 (12 05:34 -0700)]
Add a note about the hrtf_tables filename markers

11 years agoProperly scale the HRTF delays when writing them
Chris Robinson [Wed, 12 Sep 2012 12:11:53 +0000 (12 05:11 -0700)]
Properly scale the HRTF delays when writing them

11 years agoUpdate fnamelist after handling % markers
Chris Robinson [Wed, 12 Sep 2012 11:55:03 +0000 (12 04:55 -0700)]
Update fnamelist after handling % markers

11 years agoUse PATH_MAX for the fname length
Chris Robinson [Wed, 12 Sep 2012 10:45:26 +0000 (12 03:45 -0700)]
Use PATH_MAX for the fname length

11 years agoImprove parsing hrtf_tables filenames
Chris Robinson [Wed, 12 Sep 2012 10:41:41 +0000 (12 03:41 -0700)]
Improve parsing hrtf_tables filenames

11 years agoFix HRTF data format description
Chris Robinson [Wed, 12 Sep 2012 02:55:45 +0000 (11 19:55 -0700)]
Fix HRTF data format description

11 years agoWarn about SSE performance with non-multiple-of-4 update sizes
Chris Robinson [Tue, 11 Sep 2012 18:17:41 +0000 (11 11:17 -0700)]
Warn about SSE performance with non-multiple-of-4 update sizes

11 years agoUse the correct size for defaultCoeffs
Chris Robinson [Tue, 11 Sep 2012 17:43:53 +0000 (11 10:43 -0700)]
Use the correct size for defaultCoeffs

11 years agoMinor cleanups for variable declarations
Chris Robinson [Tue, 11 Sep 2012 16:38:06 +0000 (11 09:38 -0700)]
Minor cleanups for variable declarations

11 years agoDon't use count-specific functions to write to the output buffer
Chris Robinson [Tue, 11 Sep 2012 13:41:24 +0000 (11 06:41 -0700)]
Don't use count-specific functions to write to the output buffer

11 years agoUse a non-interleaved DryBuffer
Chris Robinson [Tue, 11 Sep 2012 13:32:42 +0000 (11 06:32 -0700)]
Use a non-interleaved DryBuffer

11 years agoDo the filtering separately from the mixing
Chris Robinson [Tue, 11 Sep 2012 12:24:19 +0000 (11 05:24 -0700)]
Do the filtering separately from the mixing

11 years agoUse HUGE_VAL instead of dividing by 0 for infinity, where possible
Chris Robinson [Tue, 11 Sep 2012 11:45:43 +0000 (11 04:45 -0700)]
Use HUGE_VAL instead of dividing by 0 for infinity, where possible

11 years agoSilence a couple MSVC warnings
Chris Robinson [Tue, 11 Sep 2012 10:29:00 +0000 (11 03:29 -0700)]
Silence a couple MSVC warnings

11 years agoAdd example HRTF definition files for makehrtf
Chris Robinson [Tue, 11 Sep 2012 10:19:03 +0000 (11 03:19 -0700)]
Add example HRTF definition files for makehrtf

11 years agoUpdate HRTF code
Chris Robinson [Tue, 11 Sep 2012 08:59:42 +0000 (11 01:59 -0700)]
Update HRTF code

This update allows for much more flexibility in the HRTF data. It also allows
for HRTF table file names to include "%r" to represent the device's playback
rate (e.g. if you set hrtf-%r.mhr, then it will try to use hrtf-44100.mhr or
hrtf-48000.mhr depending if the device's output rate is 44100 or 48000,
respectively).

The makehrtf utility has also been updated to support more options and input
file formats, as well as the new mhr format.

11 years agoAgain try to get _WIN32_IE to behave right with MinGW
Chris Robinson [Tue, 11 Sep 2012 08:39:05 +0000 (11 01:39 -0700)]
Again try to get _WIN32_IE to behave right with MinGW

11 years agoRemove a hack for MinGW
Chris Robinson [Mon, 10 Sep 2012 07:19:13 +0000 (10 00:19 -0700)]
Remove a hack for MinGW

11 years agoAdd missing returns
Chris Robinson [Mon, 10 Sep 2012 04:27:54 +0000 (9 21:27 -0700)]
Add missing returns

11 years agoTry to ensure mixing samples in multiples of 4
Chris Robinson [Sun, 9 Sep 2012 11:27:47 +0000 (9 04:27 -0700)]
Try to ensure mixing samples in multiples of 4

11 years agoUse the right method to clear a __m128 to 0
Chris Robinson [Sun, 9 Sep 2012 11:09:31 +0000 (9 04:09 -0700)]
Use the right method to clear a __m128 to 0

11 years agoUse SSE to do 4 samples at once (non-HRTF direct mix), instead of to apply a matrix row
Chris Robinson [Sun, 9 Sep 2012 11:02:54 +0000 (9 04:02 -0700)]
Use SSE to do 4 samples at once (non-HRTF direct mix), instead of to apply a matrix row

MaxCHannels no longer needs to be a multiple of 4 now, either.

11 years agoImplement MixDirect_SSE separately from the C and Neon versions
Chris Robinson [Sun, 9 Sep 2012 07:53:54 +0000 (9 00:53 -0700)]
Implement MixDirect_SSE separately from the C and Neon versions

11 years agoMove the target effect slot to the SendParams struct
Chris Robinson [Sun, 9 Sep 2012 05:32:30 +0000 (8 22:32 -0700)]
Move the target effect slot to the SendParams struct

11 years agoRemove STACK_DATA_SIZE in favor of BUFFERSIZE
Chris Robinson [Sun, 9 Sep 2012 05:09:34 +0000 (8 22:09 -0700)]
Remove STACK_DATA_SIZE in favor of BUFFERSIZE

11 years agoRemove some unused code
Chris Robinson [Sun, 9 Sep 2012 04:53:04 +0000 (8 21:53 -0700)]
Remove some unused code

11 years agoSeparate the resampling and mixing steps
Chris Robinson [Sun, 9 Sep 2012 04:34:36 +0000 (8 21:34 -0700)]
Separate the resampling and mixing steps

11 years agoWorkaround MinGW __declspec(align(x)) bug
Chris Robinson [Sun, 9 Sep 2012 02:24:07 +0000 (8 19:24 -0700)]
Workaround MinGW __declspec(align(x)) bug

11 years agoFree the global ALSA config after opening capture devices too
Chris Robinson [Sun, 2 Sep 2012 21:26:46 +0000 (2 14:26 -0700)]
Free the global ALSA config after opening capture devices too

11 years agoalsa: Free the global config cache to remove a lot of reported leaks
Lauri Kasanen [Sun, 2 Sep 2012 14:04:56 +0000 (2 17:04 +0300)]
alsa: Free the global config cache to remove a lot of reported leaks

Signed-off-by: Lauri Kasanen <curaga@operamail.com>
11 years agoSet the error if setting a new integer source offset fails
Chris Robinson [Sun, 2 Sep 2012 02:31:43 +0000 (1 19:31 -0700)]
Set the error if setting a new integer source offset fails

11 years agoMinor cleanups for mixer_inc
Chris Robinson [Wed, 29 Aug 2012 09:43:19 +0000 (29 02:43 -0700)]
Minor cleanups for mixer_inc

11 years agoAdd an SSE-enhanced path for applying the mixer matrix
Chris Robinson [Wed, 29 Aug 2012 08:56:04 +0000 (29 01:56 -0700)]
Add an SSE-enhanced path for applying the mixer matrix

11 years agoMake sure device buffers are 16-byte aligned
Chris Robinson [Wed, 29 Aug 2012 08:40:42 +0000 (29 01:40 -0700)]
Make sure device buffers are 16-byte aligned

11 years agoIncrease MaxChannels to be a multiple of 4
Chris Robinson [Wed, 29 Aug 2012 08:09:04 +0000 (29 01:09 -0700)]
Increase MaxChannels to be a multiple of 4

11 years agoSet an error closer to where it occurs for setting source properties
Chris Robinson [Wed, 29 Aug 2012 07:25:01 +0000 (29 00:25 -0700)]
Set an error closer to where it occurs for setting source properties

11 years agoAdd helpers to set source properties
Chris Robinson [Wed, 29 Aug 2012 05:16:55 +0000 (28 22:16 -0700)]
Add helpers to set source properties

11 years agoPrint the error when reporting snd_pcm_delay failure
Chris Robinson [Tue, 28 Aug 2012 01:12:03 +0000 (27 18:12 -0700)]
Print the error when reporting snd_pcm_delay failure

11 years agoUse _aligned_free for pointers returned by _aligned_malloc
Chris Robinson [Sat, 25 Aug 2012 00:45:16 +0000 (24 17:45 -0700)]
Use _aligned_free for pointers returned by _aligned_malloc

11 years agoConstify some parameters
Chris Robinson [Tue, 21 Aug 2012 23:01:11 +0000 (21 16:01 -0700)]
Constify some parameters

11 years agoAdd the option to retrieve the source offset and latency in seconds
Chris Robinson [Mon, 20 Aug 2012 22:57:27 +0000 (20 15:57 -0700)]
Add the option to retrieve the source offset and latency in seconds

11 years agoFix getting the RW offsets with alGetSourcei64vSOFT
Chris Robinson [Mon, 20 Aug 2012 22:33:28 +0000 (20 15:33 -0700)]
Fix getting the RW offsets with alGetSourcei64vSOFT

11 years agoAdd methods to get source properties as doubles
Chris Robinson [Mon, 20 Aug 2012 22:26:35 +0000 (20 15:26 -0700)]
Add methods to get source properties as doubles

11 years agoFix a parameter name
Chris Robinson [Mon, 20 Aug 2012 21:50:43 +0000 (20 14:50 -0700)]
Fix a parameter name

11 years agoProperly export alGetSource3i64SOFT
Chris Robinson [Mon, 20 Aug 2012 21:48:08 +0000 (20 14:48 -0700)]
Properly export alGetSource3i64SOFT

11 years agoUse helper functions to read source properties
Chris Robinson [Mon, 20 Aug 2012 21:16:58 +0000 (20 14:16 -0700)]
Use helper functions to read source properties

And make sure the 64-bit int getters to get 32-bit int values

11 years agoUse the correct 64-bit int type for the extension functions
Chris Robinson [Mon, 20 Aug 2012 19:22:00 +0000 (20 12:22 -0700)]
Use the correct 64-bit int type for the extension functions

11 years agoAdd a macro to help make a 64-bit value
Chris Robinson [Mon, 20 Aug 2012 05:31:55 +0000 (19 22:31 -0700)]
Add a macro to help make a 64-bit value

11 years agoUse a default method to provide a dummy latency
Chris Robinson [Sun, 19 Aug 2012 19:31:59 +0000 (19 12:31 -0700)]
Use a default method to provide a dummy latency

11 years agoHold the device lock with PulseAudio between mixing and writing
Chris Robinson [Sun, 19 Aug 2012 00:20:20 +0000 (18 17:20 -0700)]
Hold the device lock with PulseAudio between mixing and writing

11 years agoHold the device lock with ALSA between mixing and writing
Chris Robinson [Sun, 19 Aug 2012 00:18:53 +0000 (18 17:18 -0700)]
Hold the device lock with ALSA between mixing and writing

11 years agoUse non-blocking access for ALSA playback
Chris Robinson [Sat, 18 Aug 2012 23:44:52 +0000 (18 16:44 -0700)]
Use non-blocking access for ALSA playback

11 years agoMove the device lock into the backend function table
Chris Robinson [Sat, 18 Aug 2012 22:58:04 +0000 (18 15:58 -0700)]
Move the device lock into the backend function table

For backend-specific implementations: this should hold the audio mixer loop for
playback devices, and provide recursive mutex behavior.

11 years agoKeep the backend device open until the last reference is released
Chris Robinson [Sat, 18 Aug 2012 21:49:42 +0000 (18 14:49 -0700)]
Keep the backend device open until the last reference is released

This should generally happen with the next ALCdevice_DecRef call unless the
device is in the middle of being used in another thread, in which case it's
probably best to not remove the resources.

11 years agoAdd the start of AL_SOFT_source_latency
Chris Robinson [Sat, 18 Aug 2012 18:02:54 +0000 (18 11:02 -0700)]
Add the start of AL_SOFT_source_latency

This extension will provide a way for apps to get accurate latency and playback
position information

11 years agoAdd a device method to retrieve the active latency
Chris Robinson [Fri, 17 Aug 2012 20:38:52 +0000 (17 13:38 -0700)]
Add a device method to retrieve the active latency

This is effectively the time until the next update will be heard by the user,
or the closest approximation thereof, in nanoseconds.

11 years agoPlace the alignment attribute before the variable declaration
Chris Robinson [Thu, 16 Aug 2012 17:42:48 +0000 (16 10:42 -0700)]
Place the alignment attribute before the variable declaration

11 years agoRemove extra parenthesis used in the aligned attribute declaration
Chris Robinson [Thu, 16 Aug 2012 17:33:37 +0000 (16 10:33 -0700)]
Remove extra parenthesis used in the aligned attribute declaration

11 years agoFix aligned allocator fallback
Chris Robinson [Thu, 16 Aug 2012 17:30:13 +0000 (16 10:30 -0700)]
Fix aligned allocator fallback

11 years agoMSVC wants __declspec(align), not __declspec(aligned)
Chris Robinson [Thu, 16 Aug 2012 17:23:25 +0000 (16 10:23 -0700)]
MSVC wants __declspec(align), not __declspec(aligned)

11 years agoAvoid dynamic handling of libsndio
Chris Robinson [Thu, 16 Aug 2012 17:12:50 +0000 (16 10:12 -0700)]
Avoid dynamic handling of libsndio

This makes it safer and easier to handle as OpenBSD updates it

11 years agoApply HRTF mixer coefficients with stepping using SSE
Chris Robinson [Wed, 15 Aug 2012 15:19:04 +0000 (15 08:19 -0700)]
Apply HRTF mixer coefficients with stepping using SSE

11 years agoCheck the max CPUID functions before calling them
Chris Robinson [Wed, 15 Aug 2012 13:28:45 +0000 (15 06:28 -0700)]
Check the max CPUID functions before calling them

11 years agoMake sure sources are 16-byte aligned
Chris Robinson [Wed, 15 Aug 2012 12:54:13 +0000 (15 05:54 -0700)]
Make sure sources are 16-byte aligned

They contain fields that require 16-byte alignment for SSE (and Neon?)
acceleration.

11 years agoAdd wrapper methods to ensure aligned allocations
Chris Robinson [Wed, 15 Aug 2012 12:50:40 +0000 (15 05:50 -0700)]
Add wrapper methods to ensure aligned allocations

11 years agoEnsure some HRTF-related parameters are aligned
Chris Robinson [Wed, 15 Aug 2012 11:10:41 +0000 (15 04:10 -0700)]
Ensure some HRTF-related parameters are aligned

11 years agoMake sure the working coefficients are aligned for the SSE mixer
Chris Robinson [Wed, 15 Aug 2012 10:43:36 +0000 (15 03:43 -0700)]
Make sure the working coefficients are aligned for the SSE mixer

11 years agoRemove unused filter functions
Chris Robinson [Wed, 15 Aug 2012 08:48:47 +0000 (15 01:48 -0700)]
Remove unused filter functions

11 years agoCheck for and use the -msse switch when dealing with SSE intrinsics
Chris Robinson [Wed, 15 Aug 2012 08:46:42 +0000 (15 01:46 -0700)]
Check for and use the -msse switch when dealing with SSE intrinsics

11 years agoCheck the correct macro for ARM Neon support
Chris Robinson [Wed, 15 Aug 2012 08:32:17 +0000 (15 01:32 -0700)]
Check the correct macro for ARM Neon support

11 years agoDon't bother handling MMX since we don't use it
Chris Robinson [Wed, 15 Aug 2012 08:29:19 +0000 (15 01:29 -0700)]
Don't bother handling MMX since we don't use it