Commit Graph

78 Commits

Author SHA1 Message Date
Chris Robinson abcca1acd1 Add exception protection to the last of the API functions 2019-04-10 17:47:13 -07:00
Chris Robinson 8781a32df5 Copy the voice's ambisonic upsampler state when reallocating 2019-04-01 17:27:31 -07:00
Chris Robinson 2c67ab0d2c Rename ALvoice fields for consistency 2019-03-10 16:29:06 -07:00
Chris Robinson 030b24a40d Improve handling of voice's AmbiScales for upsampling 2019-03-10 15:46:46 -07:00
Chris Robinson 0d295cf811 Don't directly use a buffer for updating source parameters 2019-03-10 11:52:39 -07:00
Chris Robinson 87479b4b32 Play dummy samples and force a fade out on stopping voices 2019-03-09 18:34:00 -08:00
Chris Robinson ef0f335132 Add a Stopping state for voices
This currently doesn't do much, except have the mixer progress it to Stopped.
It's valid to have without a source or buffers, and in the future will allow
fading out when a source is paused or stopped.
2019-03-09 16:48:07 -08:00
Chris Robinson cde4500e24 Increment the active voice count ahead of playing the sources 2019-03-09 15:04:51 -08:00
Chris Robinson d39cfcc7bb Clear the voice's buffer when detaching from source 2019-03-09 13:20:10 -08:00
Chris Robinson 317206e8f3 Remove the FOAOut mixing buffer and associated post-processes 2019-02-22 22:35:37 -08:00
Chris Robinson 169a11dffc Add some preliminary fields for mix-time ambisonic upsampling 2019-02-21 04:57:56 -08:00
Chris Robinson 3966665ca3 Store effect slots in groups of 64
Now that their wet buffers are allocated dynamically, the ALeffectslot object
itself is rather small.
2019-02-20 22:00:26 -08:00
Chris Robinson 69f6f56160 Avoid using internal AL[u]int64 types 2019-02-11 12:16:58 -08:00
Chris Robinson 21aaa18c50 Get rid of the FAM_SIZE macro 2019-02-11 11:14:34 -08:00
Chris Robinson 05cdc2cb30 Use relaxed memory ordering for initializing atomic_flags 2019-02-04 21:28:37 -08:00
Minmin Gong 41b9d473a2 Fix compiling problems on VS2019 with vc142 toolset
Msvc142 in VS2019 preview 2 doesn't allow std::atomic_flag to be initialized by a bool. Call test_and_set in the constructors instead.
2019-02-04 20:03:18 -08:00
Chris Robinson 7757789590 Clean up the NFC filters a bit 2019-01-23 16:32:53 -08:00
Chris Robinson d64eaba322 Use a flexible array for DirectHrtfState and ALvoice 2019-01-12 01:25:33 -08:00
Filip Gawin 4169c6f37d Use c++ headers 2019-01-09 19:42:40 +01:00
Filip Gawin 0d3a0635d9 Avoid using old style casts
To think about:
examples/alffplay.cpp:600
OpenAL32/Include/alMain.h:295
2019-01-08 19:42:44 +01:00
Chris Robinson 4d047e2bc1 Use user-defined literals for 64-bit literals 2019-01-07 04:06:40 -08:00
Chris Robinson 1630a33567 Use standard unique_lock and lock_guard for the backend lock 2019-01-01 16:42:54 -08:00
Chris Robinson 9f5c9a2260 Rename BackendLock to StateLock 2018-12-30 21:38:42 -08:00
Chris Robinson 24e763f2a1 Get rid of ALCdevice_Lock/Unlock 2018-12-29 14:00:34 -08:00
Chris Robinson 4dca2f2ee5 Use a unique_ptr for the AsyncEvents ringbuffer 2018-12-27 10:44:02 -08:00
Chris Robinson d367093c06 Use std::array for appropriate source and listener properties 2018-12-26 22:27:34 -08:00
Chris Robinson a4ac43b602 Avoid a lambda to find a not-null entry in an array 2018-12-26 21:55:39 -08:00
Chris Robinson 8a0295503d Clean up the ring buffer struct and use member functions 2018-12-26 21:22:17 -08:00
Chris Robinson 63df7cd537 Construct AsyncEvent objects directly in the ringbuffer 2018-12-25 09:32:38 -08:00
Chris Robinson fbae41020d Remove extraneous typedef, struct, and enum keywords 2018-12-24 19:29:01 -08:00
Chris Robinson 334b3a905a Clean up some math stuff 2018-12-22 16:01:14 -08:00
Chris Robinson b779ebb512 Fix some MSVC conversion warnings 2018-12-12 21:18:31 -08:00
Chris Robinson 0f24139b57 Use a constructor instead of a macro to initialize AsyncEvent 2018-12-06 22:24:20 -08:00
Chris Robinson 10b39d57d5 Use class methods for the NFC filters 2018-12-05 15:20:52 -08:00
Chris Robinson 31b54eb86a Avoid a few more explicit loops 2018-12-03 01:41:52 -08:00
Chris Robinson 45b65366bb Improve some checks for compiler analysis 2018-12-02 15:29:26 -08:00
Chris Robinson 60254488e9 Add a couple missing source lock guards 2018-12-02 14:36:53 -08:00
Chris Robinson 7b1548af3c Handle source state changed events uniquely in the event loop
To avoid the need of constructing the string in the mixer thread, which is
commonly formatted anyway.
2018-11-30 21:39:59 -08:00
Chris Robinson 4b7ac4a6ed Don't bother making ALvoiceProps dynamically sized 2018-11-30 16:56:23 -08:00
Chris Robinson 364850e8f9 Move a variable declaration to a more appropriate place 2018-11-30 10:08:18 -08:00
Chris Robinson b582f1346a Avoid hard-coding a couple sizes 2018-11-29 22:56:33 -08:00
Chris Robinson 8ca8da30bd Store the source ID with the voice instead of the source pointer 2018-11-29 22:49:01 -08:00
Chris Robinson f26083e9ed Make and use a semaphore class 2018-11-27 13:41:30 -08:00
Chris Robinson d06f76957c Remove althrd_yield 2018-11-26 23:06:49 -08:00
Chris Robinson 2d45ec8dc3 Use a standard mutex for the remaining locks 2018-11-26 22:06:53 -08:00
Chris Robinson 68eef6abb4 Use a standard mutex for the source and effect slot locks 2018-11-26 21:50:48 -08:00
Chris Robinson 2e73c2ca92 Use a standard mutex for the proplock 2018-11-26 21:39:31 -08:00
Chris Robinson d8b9230ee4 Use a standard mutex for the backend lock 2018-11-26 21:39:31 -08:00
Chris Robinson 75b39cafc8 Get rid of some unnecessary functions 2018-11-26 18:25:29 -08:00
Chris Robinson a6923790fa Avoid using ATOMIC_INIT 2018-11-26 14:31:54 -08:00