3218 Commits

Author SHA1 Message Date
Chris Robinson
bca7c682f1 Use ALuint for the amount to skip 2014-05-04 01:00:21 -07:00
Chris Robinson
2a7f3c015e Don't use the next power of two when duplicating config values
Speed isn't terribly important here, and reallocs should be extremely rare.
2014-05-04 00:37:25 -07:00
Chris Robinson
db90985f6a Remove unnecessary ifdefs
mixer_sse.c and mixer_neon.c are only compiled when the relavent headers are
found anyway.
2014-05-04 00:19:55 -07:00
Chris Robinson
a2bb4c3f13 Always use the current gains when mixing
The current gain gets explicitly set to the target when the stepping is
finished to ensure the target is still used. This way, however, will allow for
asynchronously 'canceling' a fade by setting the counter to 0.
2014-05-04 00:13:19 -07:00
Chris Robinson
d066c7b124 Better pack HRTF mixing properties 2014-05-03 18:59:26 -07:00
Chris Robinson
b2e533fbfc Clamp the current and target gain lower bound to epsilon
Should give a bit more wiggle room for the gain stepping to get lower than the
silence threshold.
2014-05-03 17:51:06 -07:00
Chris Robinson
34e96aef60 Make sure all gain steps are applied with the SSE and Neon mixers 2014-05-03 17:24:46 -07:00
Chris Robinson
2660ecfd4a Revert e9aee578a797c694655538cd0a00ad6c0bf6d5dc
The vector iterator needs to be the start of the Data array even if the vector
itself is NULL, or else insertion can have a negative insert position.
2014-05-02 11:48:55 -07:00
Chris Robinson
3bdb3f9db7 Iniitialize some mmdevapi backend fields in the constructor 2014-05-02 10:47:31 -07:00
Chris Robinson
d90f684f16 Use a backup in case pthread_mutex_timedlock isn't available 2014-05-01 14:15:31 -07:00
Chris Robinson
804b08e0ca Use ALboolean for al_string_empty's return type 2014-04-30 12:53:52 -07:00
Chris Robinson
f150676873 Add a helper VECTOR_FOR_EACH macro 2014-04-30 12:30:02 -07:00
Chris Robinson
f9d70aa9ef Use _mm_set_ps() to set an __m128 instead of {} 2014-04-26 06:31:31 -07:00
Chris Robinson
149df6d4db Convert the mmdevapi backend to the new backend API 2014-04-25 09:26:53 -07:00
Chris Robinson
28e9f0db8c Use a vector for mmdevapi device lists 2014-04-24 04:02:05 -07:00
Chris Robinson
83970369e0 More device list cleanup cleanup 2014-04-24 02:33:54 -07:00
Chris Robinson
7dd4a2348f Use a helper function to clear PulseAudio device lists 2014-04-24 01:38:24 -07:00
Chris Robinson
a4cf378af8 Use a helper method to clear winmm device lists 2014-04-24 01:25:26 -07:00
Chris Robinson
9af8e10c20 Avoid using superfluous LP* types 2014-04-23 10:08:33 -07:00
Chris Robinson
0b527621a5 Use a RefCount for counting committed winmm buffers 2014-04-23 05:08:17 -07:00
Chris Robinson
8fd224f841 Avoid forward-declaring backend vtables 2014-04-23 03:52:05 -07:00
Chris Robinson
420599f8e3 Avoid using assert() in createBackend 2014-04-23 02:18:07 -07:00
Chris Robinson
7fed6383c0 Include FindALSA.cmake
Older versions of CMake don't seem to have it.
2014-04-23 02:12:34 -07:00
Chris Robinson
ada4868d86 Properly handle HAVE_DYNLOAD in the dsound backend 2014-04-22 08:55:17 -07:00
Chris Robinson
a4fbe158d4 Avoid some superfluous types 2014-04-22 08:44:06 -07:00
Chris Robinson
84afe4fb40 Simplify the cmake backend handling a bit 2014-04-22 07:58:25 -07:00
Chris Robinson
d5ac11c87f Fix adding backend include directories 2014-04-22 07:21:19 -07:00
Chris Robinson
f6ad3ef221 Use a helper to return mmdevapi message thread responses 2014-04-22 06:13:49 -07:00
Chris Robinson
e9aee578a7 Avoid dereferencing a NULL pointer 2014-04-21 23:10:09 -07:00
Chris Robinson
0d2521e30e Use a vector to store the ALSA device lists 2014-04-21 23:01:50 -07:00
Chris Robinson
df3c54a4bf Use al_string for ALSA's device map 2014-04-21 20:53:27 -07:00
Chris Robinson
ad71565e45 Trace the device name being opened in ALSA and PulseAudio 2014-04-21 20:26:29 -07:00
Chris Robinson
ca1008571e Use the althrd methods in winmm 2014-04-21 09:35:17 -07:00
Chris Robinson
d856183c4b Only declare backend options when the backend is available 2014-04-20 22:42:53 -07:00
Chris Robinson
dbe0897c7f Use the stored format block align instead of calculating it 2014-04-20 22:29:54 -07:00
Chris Robinson
5215b9cad2 Use a vector for the PulseAudio DevMaps 2014-04-20 06:29:36 -07:00
Chris Robinson
b435a8e01b Use an al_string in the PulseAudio backend instead of char* 2014-04-20 05:55:52 -07:00
Chris Robinson
32a2f95885 Convert the DSound backend to the new API 2014-04-19 22:54:21 -07:00
Chris Robinson
bb969c3ccc Add a SZFMT macro for a size_t string formatter 2014-04-19 09:42:03 -07:00
Chris Robinson
043e25b602 Don't link with libwinmm unless WinMM is enabled
We don't use timeGetTime for timing anymore, so winmm only needs to be linked
when the winmm backend is enabled.
2014-04-19 08:50:41 -07:00
Chris Robinson
96c559fbef Use a find module to look for DirectSound 2014-04-19 07:49:27 -07:00
Chris Robinson
887763e41c Use find cmake modules for more backends 2014-04-19 06:35:14 -07:00
Chris Robinson
1d266aa834 Add a GCC-specific STATIC_UPCAST macro that checks the object type
The check is compile time, and is functionally identical to the old/alternate
version.
2014-04-19 03:11:23 -07:00
Chris Robinson
59fc9aac0e Use C11 alignas when available 2014-04-19 02:11:04 -07:00
Chris Robinson
8badd3740e Dont bother trying _alloca
We prefer C99 variable-length arrays, and other systems (including MSVC9) don't
have an issue with alloca.
2014-04-19 01:10:12 -07:00
Chris Robinson
1d69ec9ce1 Set -D_GNU_SOURCE=1 -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700 earlier 2014-04-19 01:02:36 -07:00
Chris Robinson
9b685bace5 Use FindALSA.cmake to look for ALSA
Also, only provide the ALSA_BACKEND_ALSA option if it's available
2014-04-19 00:52:19 -07:00
Chris Robinson
2eda15fc77 Only define SSE, Neon, and FluidSynth options if they're available 2014-04-18 23:20:27 -07:00
Chris Robinson
c041a99f72 Simplify some error checking 2014-04-18 06:54:18 -07:00
Chris Robinson
b8d56190d1 Check pthread_mutex_unlock for errors 2014-04-18 06:39:46 -07:00