Commit Graph

85 Commits

Author SHA1 Message Date
Chris Robinson f5194a9d8e Use an ATOMIC_INIT macro instead of ATOMIC_LOAD_UNSAFE 2014-08-03 00:26:21 -07:00
Chris Robinson 659b340716 Use the right type for atomic compare-exchange 2014-08-01 02:47:46 -07:00
Chris Robinson 1c1e878be7 Add some casts for inline assembly atomics
And remove an unnecessary void cast
2014-08-01 02:40:25 -07:00
Chris Robinson 87423f046e Use atomics for the device and context list heads 2014-08-01 02:04:40 -07:00
Chris Robinson cdfc5a4d31 Remove an unused function 2014-07-31 04:44:39 -07:00
Chris Robinson ce046d2f03 Rename ATOMIC_COMPARE_EXCHANGE to ATOMIC_COMPARE_EXCHANGE_STRONG 2014-07-31 04:34:46 -07:00
Chris Robinson 6ce464aed8 Avoid a CPU memory fence, and better order memory barriers to accesses
Code produced by GCC 4.9's C11 atomic implementation does not seem to add a
CPU memory fence even with memory_order_seq_cst. Unnecessary memory fences
will be a detriment to performance, so they should only be added if needed.
2014-07-31 04:19:33 -07:00
Chris Robinson 7c847e62c3 Change Windows-based atomics for non-C99 compilers 2014-07-27 19:34:32 -07:00
Chris Robinson 38e8dc8540 Use a full memory barrier for Windows 2014-07-27 18:31:10 -07:00
Chris Robinson 531c0d8e6b Explicitly pass the address of atomics and parameters that can be modified 2014-07-26 03:00:49 -07:00
Chris Robinson a3dbe08c8b Support C11 atomics 2014-07-23 06:36:34 -07:00
Chris Robinson e4b779c492 Use generic atomics in more places 2014-07-22 18:57:51 -07:00
Chris Robinson a3b1d4a5e2 Implement RefCount as a generic atomic type 2014-07-22 18:18:14 -07:00
Chris Robinson 5a339a2a5b Add macros for generic atomic functionality 2014-07-22 00:20:28 -07:00
Chris Robinson 5de7271bcd AL_SOFT_source_length is complete 2014-07-05 04:25:37 -07:00
Chris Robinson fda5bc2bd2 AL_SOFT_MSADPCM is functionally complete 2014-07-03 20:59:44 -07:00
Chris Robinson 933f51a8bf Only define struct timespec if _TIMESPEC_DEFINED isn't set
This matches what the mingw-w64 headers define with the struct.
2014-05-31 17:41:10 -07:00
Chris Robinson 1d45c439b8 Add extern "C" to common headers. 2014-05-29 04:22:30 -07:00
Chris Robinson 73614f228e Add methods to exchange and compare-exchange RefCount values 2014-05-27 15:48:15 -07:00
Chris Robinson f0b65aa6b7 Implement condition variables for Windows 2014-05-27 05:22:53 -07:00
Chris Robinson b6e1042e8c Implement condition variables (POSIX only!)
Windows requires Vista or newer to get the CONDITION_VARIABNLE API, but we
currently only require XP.
2014-05-26 03:52:55 -07:00
Chris Robinson 7d997277a0 AL_SOFT_block_alignment is now considered done 2014-05-22 12:27:07 -07:00
Chris Robinson 1d2504d12e Make RefCount a non-integer type
It should only be accessed through the appropriate functions to ensure proper
atomicity.
2014-05-14 02:47:07 -07:00
Chris Robinson 8b7c71e20e Always use unsigned int for RefCount 2014-05-07 23:49:06 -07:00
Chris Robinson a2bddb7b40 Move RWLock and UIntMap implementations to common
This should make the code in common completely self-reliant.
2014-05-07 19:16:49 -07:00
Chris Robinson 1c01e94237 Move the static_assert definition to its own header 2014-05-07 02:28:25 -07:00
Chris Robinson 38b98de78e Check for C99 _Bool support 2014-05-06 23:10:50 -07:00
Chris Robinson 0ea979a262 Move some headers to include/
Note, these are not installed. Only headers in include/AL/ are installed.
2014-05-06 18:29:53 -07:00
Chris Robinson ba52ac9bcd Finalize AL_SOFT_deferred_updates 2013-10-05 06:14:04 -07:00
Chris Robinson 8f14902290 Add ALC_EXT_DEFAULT_FILTER_ORDER to alext.h 2013-05-31 15:40:02 -07:00
Chris Robinson 4a3d36a176 Finalize AL_SOFT_source_latency 2012-10-31 05:09:42 -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 b08bd3746e Add AL_EXT_SOURCE_RADIUS to alext.h 2012-04-26 02:05:49 -07:00
Chris Robinson 39ab0b0aa3 Add AL_EXT_STEREO_ANGLES to alext.h 2012-04-26 01:19:25 -07:00
Chris Robinson 4188a5f3f3 Fix compiling al.h with C++ 2012-04-24 02:51:23 -07:00
Chris Robinson dfa38ed7a5 Reformat alc/h and al.h, and redo the comments 2012-04-21 04:34:08 -07:00
Chris Robinson 66c918c84b Remove export pragmas from headers
Available information suggests it's only useful for Mac OS9 and earlier (not
OSX).
2012-04-20 22:53:47 -07:00
Chris Robinson 7e5b13aabd Finalize ALC_SOFT_loopback 2012-03-15 15:21:15 -07:00
Chris Robinson 1f3c1091d3 Finalize AL_SOFT_direct_channels 2012-03-12 22:46:13 -07:00
Chris Robinson 9166432ccf Fix typo in the "CarpetedHallway" reverb preset 2012-02-01 16:31:37 -08:00
Chris Robinson c605e06e07 Make the EFX preset values explicit floats 2012-01-31 02:57:22 -08:00
Chris Robinson ed037698fd Reorder a couple effect presets 2012-01-29 22:16:39 -08:00
Chris Robinson 706f407ed5 Add some more reverb presets 2012-01-27 23:15:16 -08:00
Chris Robinson 37b17c8c78 Add the ability to specify a preset for forced reverb 2012-01-19 20:02:57 -08:00
Chris Robinson e772fb7d0e Finalize AL_SOFT_buffer_samples 2012-01-10 01:14:02 -08:00
Chris Robinson 84b5311257 Use an explicit 0 for the "no error" enums 2011-12-03 08:27:51 -08:00
Chris Robinson d1011f8d37 Add AL_EXT_MULAW and AL_EXT_ALAW tokens to alext.h 2011-10-01 04:05:39 -07:00
Chris Robinson 0988023d30 Constify some parameters 2011-09-22 00:31:42 -07:00
Chris Robinson 357f841e88 Fix namespacing of EFX filter property values 2011-06-16 10:52:17 -07:00
Chris Robinson 60965e3a6c Determine the function export attribute using CMake 2011-05-17 09:13:55 -07:00