Chris Robinson
ada86d2fcf
Hold references in the global device and context lists
2019-06-29 22:38:38 -07:00
Chris Robinson
7303e22d89
Use a FlexArray for a device's contexts
2019-06-29 21:32:36 -07:00
Chris Robinson
ec6fdff0c6
Make the voice count unsigned
2019-06-09 19:27:15 -07:00
Chris Robinson
bc8f206ee1
Use a FlexArray for the context's voices
2019-06-09 18:13:54 -07:00
Chris Robinson
4522a51ea2
Don't log the function or prefix
...
It's ultimately unnecessary since the message is an indicator about where it
was logged from. The message itself is generally more important than where it
was from, too.
2019-06-04 01:37:36 -07: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
995c9649cb
Move some number-related stuff to a separate header
2019-02-11 11:07:06 -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
81e7222633
Use a flexible array for the active effect slots
2019-01-11 07:28:44 -08:00
Chris Robinson
e7d77f5caa
Use a vector for ALeffectslotArray
2019-01-09 18:29:22 -08:00
Chris Robinson
8f35f464a1
Change a true/false ALenum atomic into a bool
2019-01-09 01:06:19 -08:00
Chris Robinson
b49c45d3a4
Add prefixes for ALCdevice and ALCcontext
2019-01-09 00:31:57 -08:00
Chris Robinson
399dfca1e3
Rename ALCdevice_struct and ALCcontext_struct
...
A (possibly contentious?) change in the public headers. Those names were never
part of any specification, and I don't know why the struct names differed from
the actual type name. But with C++, which takes the original struct declaration
as the original name, it was affecting the type's internal symbols.
This shouldn't affect user code since ALCdevice_struct and ALCcontext_struct
were never part of the spec. If issues arise from this change, it should be
reported.
2019-01-01 18:13:33 -08:00
Chris Robinson
4dca2f2ee5
Use a unique_ptr for the AsyncEvents ringbuffer
2018-12-27 10:44:02 -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
f26083e9ed
Make and use a semaphore class
2018-11-27 13:41:30 -08:00
Chris Robinson
07670ed36a
Swap context references in the move assignment
2018-11-27 10:08:25 -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
053599b243
Avoid using the ATOMIC() macro
2018-11-26 14:48:26 -08:00
Chris Robinson
bf4518fe5c
Atuomatically clean up sources with its sublist's destruction
2018-11-25 08:42:43 -08:00
Chris Robinson
7c0605f09e
Properly initialize the sublists' freemask
2018-11-25 07:40:15 -08:00
Chris Robinson
bd8db0d27b
Make GetContextRef return a ContextRef
2018-11-24 14:07:32 -08:00
Chris Robinson
df057d4118
Make the context VoiceCount atomic
2018-11-23 16:16:31 -08:00
Chris Robinson
75213ee6f9
Always use RAII with EffectSlotLock
2018-11-21 05:35:47 -08:00
Chris Robinson
4c64fa1e4e
Make VerifyContext return a context reference
2018-11-21 02:02:53 -08:00
Chris Robinson
8ec25da12e
Rename a method to be clearer about its behavior
2018-11-21 00:40:41 -08:00
Chris Robinson
f9e969a339
Use a standard mutex for the event callback lock
2018-11-20 10:55:57 -08:00
Chris Robinson
191ea90de3
Use atomic_flags and atomic<bools>s where appropriate
2018-11-20 10:45:01 -08:00
Chris Robinson
1e31ac469e
Store effect slots as unique_ptrs
2018-11-20 10:01:20 -08:00
Chris Robinson
1df42c4a0f
Use a unique_ptr for the default effect slot
2018-11-20 05:01:08 -08:00
Chris Robinson
b10e7d08c3
Use a std::thread for the event thread
2018-11-18 18:04:27 -08:00
Chris Robinson
ad82a70a65
Use cleaner constructor/destructor calls for ALCcontext
...
Note that the actual type name is ALCcontext_struct, because of how it's
defined in AL/alc.h (ALCcontext is just an alias to struct ALCcontext_struct).
2018-11-18 05:40:00 -08:00
Chris Robinson
0851dc12b4
Remove an unused typedef
2018-11-18 04:26:28 -08:00
Chris Robinson
7433cb5f4c
Avoid naming a struct member the same as an enum type
2018-11-18 03:39:32 -08:00
Chris Robinson
3eededf5d6
Use a normal vector for auxiliary effect slots
2018-11-18 02:39:27 -08:00
Chris Robinson
7b95712f38
Use a proper vector for the source sublists
2018-11-18 02:15:31 -08:00
Chris Robinson
d7cc9b912b
Use new/delete for ALCcontext objects
2018-11-18 00:38:31 -08:00
Chris Robinson
38d6df9c1d
Store the listener directly in the context
2018-11-17 23:41:11 -08:00
Chris Robinson
fa3c34268d
Move the ALCcontext definition to its own header
2018-11-17 23:02:27 -08:00