184 Commits

Author SHA1 Message Date
Chris Robinson
3b4f28d173 Avoid double-resizing when appending a char to a string 2018-09-02 21:15:21 -07:00
Chris Robinson
b854f4037f Read the whole Features string for neon support 2018-09-02 18:15:56 -07:00
Chris Robinson
73e08e51ba Properly get the full executable and pathname on FreeBSD 2018-06-08 19:49:13 -07:00
Chris Robinson
e787a241c0 Add and use a method for fast float rounding
Unlike fastf2i, this keeps the result as a float instead of converting to
integer.
2018-05-12 00:52:09 -07:00
Chris Robinson
75e2cb97f7 Don't assume round-to-zero for fastf2i 2018-05-04 02:09:32 -07:00
Chris Robinson
ac8dbd7a56 Add a specific function for truncating float-to-int conversions 2018-05-03 22:02:32 -07:00
Chris Robinson
a19296e3cf Avoid excessive if block depths 2018-05-02 21:06:57 -07:00
Chris Robinson
85c03925fb Avoid duplication for getting the cpuid 2018-05-02 20:59:53 -07:00
Chris Robinson
3f071a90a4 Use proc_pidpath to get the process path on macOS when available 2018-03-24 08:25:58 -07:00
Chris Robinson
a6ddeaf5f1 Rename the mmdevapi backend to wasapi 2018-03-09 18:56:24 -08:00
Chris Robinson
d25398d2c7 Avoid using static inline in headers 2018-02-25 13:14:14 -08:00
Alexey Elymanov
063ad490a2
freebsd fix: typo
Alc/helpers.c:738:30: error: use of undeclared identifier 'KERN_PROCARGS'
    int mib[4] = { CTL_KERN, KERN_PROCARGS, getpid() };

/usr/include/sys/sysctl.h:
`#define	KERN_PROC_ARGS		7	/* get/set arguments/proctitle */`
there's no KERN_PROCARGS
2018-02-18 20:55:31 +03:00
Chris Robinson
c031b3cc6a Avoid fixed-PATH_MAX-size buffers
Windows still needs to use MAX_PATH in a couple places, but that macro's
guaranteed there.
2018-01-13 04:40:20 -08:00
Chris Robinson
71ad3b1715 Use KERN_PROCARGS to get the process path+filename on FreeBSD 2018-01-13 03:38:10 -08:00
Chris Robinson
af8bbefcab Support procfs on *BSD to get the process binary 2018-01-13 03:22:41 -08:00
Chris Robinson
26043269e4 Allow GetProcPath to return the filename also 2018-01-13 02:59:21 -08:00
Chris Robinson
c9edf7cf78 Add a string function to copy a wide-char range 2018-01-13 02:03:13 -08:00
Chris Robinson
1f236d8f20 Define a function where it's used 2018-01-11 22:42:25 -08:00
Chris Robinson
15ad5245bf Move the FPU mode declarations to a separate header
Also don't use inheritance with FPUCtl.
2018-01-11 08:44:52 -08:00
Chris Robinson
81b13f78ea Move the CPU capability flags to a separate header 2018-01-11 07:19:19 -08:00
Daniel Scharrer
46b9efc5a2 Fix build on Gentoo FreeBSD with freebsd-lib 9.1 2017-09-21 17:37:10 +02:00
Chris Robinson
bc386af5c5 Manually save and restore the FPU rounding mode on Windows
Apparently there is a bug with at least MinGW-W64 where fegetenv and fesetenv
do not properly save and restore the FPU rounding mode, resulting in the
rounding mode remaining as round-to-zero after certain function calls. I do not
know if this also affects MSVC, but better safe than sorry for now.
2017-09-19 03:42:00 -07:00
Chris Robinson
e9a7218a06 Remove the fastf2u conversion function 2017-06-27 07:25:08 -07:00
Chris Robinson
55c329b462 Clean up some messy rounding code 2017-06-26 06:54:45 -07:00
rdb
39e4756b37 Implement GetProcPath for FreeBSD 2017-06-09 15:19:03 +02:00
Chris Robinson
f94fa5d5cf Use separate atomic macros for pointers 2017-04-14 17:47:55 -07:00
Chris Robinson
26144ca9df Rename al_string_* functions to alstr_* 2017-04-04 06:58:53 -07:00
Chris Robinson
5a50c46c22 Make ALsourceProps' Send array dynamically sized
ALsourceProps' Send[] array is placed at the end of the struct, and given an
indeterminate size. Extra space is allocated at the end of each struct given
the number of auxiliary sends set for the device.
2017-02-14 19:59:39 -08:00
Chris Robinson
7cc8ba99f0 Properly capitalize NEON 2017-02-07 18:33:12 -08:00
Chris Robinson
317d135b96 Clear trailing whitespace from the cpu features string 2017-02-07 11:19:41 -08:00
Chris Robinson
8f581c0e66 Use separate macros for atomics that don't take a memory order 2016-12-20 20:49:37 -08:00
Chris Robinson
a0e4696f55 Include wtypes.h for defining Windows' property keys 2016-10-04 11:20:01 -07:00
Chris Robinson
b21e481827 Only WARN if GetProcPath fails to find the binary 2016-09-08 11:56:25 -07:00
Chris Robinson
c3c283a0b5 Properly check if /proc/cpuinfo opened 2016-09-08 02:02:09 -07:00
Chris Robinson
a52cfc8048 Check for run-time NEON support by reading /proc/cpuinfo
Less than ideal since documentations warn it may not list 'neon' even if it's
really supported. However, the "proper" APIs to check for NEON extensions don't
seem to exist in my toolchain.
2016-09-07 09:57:40 -07:00
Dmytry Lavrov
6b7e14f11f mmdevapi: Allow specifying output device by it's audio endpoint GUID or by the device id string (Oculus VR api requires you to play back on a specific device). 2016-09-06 19:25:44 -05:00
Chris Robinson
e01c337921 Add some helper wrappers to mmap files 2016-08-31 08:14:50 -07:00
Chris Robinson
5e11a738c6 Combine VECTOR_RESIZE and VECTOR_RESERVE 2016-07-26 12:02:03 -07:00
Chris Robinson
b047eda1cb Avoid passing NULL to a parameter that must not be NULL 2016-07-26 04:53:25 -07:00
Chris Robinson
0477d61599 Look in the executable's dir for another config file
On Windows it'll look for alsoft.ini, and elsewhere is alsoft.conf. This
applies after the user-local settings and before ALSOFT_CONF.
2016-06-04 10:45:44 -07:00
Chris Robinson
70a105c22c Remove unnecessary VECTOR_INSERT 2016-05-30 00:05:10 -07:00
Chris Robinson
2e7ec3979a Avoid using realloc in a number of places 2016-05-21 03:27:51 -07:00
Chris Robinson
f4ff5fc106 Shorten VECTOR_ITER_ macros to VECTOR_ 2016-04-15 12:22:54 -07:00
Chris Robinson
f7efa0aff7 Avoid double slashes when constructing paths 2016-04-07 02:59:26 -07:00
Chris Robinson
2ccc1d1d8a Move the aligned malloc functions to the common lib 2016-03-29 00:44:58 -07:00
Chris Robinson
b6824ca716 Add and use a copy-range string function 2016-02-24 04:53:32 -08:00
Chris Robinson
68a2ae4024 Replace the hrtf_tables option with hrtf-paths 2016-02-23 10:56:06 -08:00
Chris Robinson
e7ed3e2f72 Remove an unused function 2016-02-23 07:41:17 -08:00
Chris Robinson
8f26ad4ba2 Avoid using scandir/alphasort
They require POSIX 2008, which is a bit too "new" for my current liking. We can
do well enough with opendir/readdir/closedir and qsort.
2016-01-21 04:42:22 -08:00
Chris Robinson
26f8676b9b Fix slashes on the local path on Windows 2015-12-08 19:43:00 -08:00