Chris Robinson
0a6748156d
Make sure the OpenSL capture buffer queue has the correct size
...
The ring buffer size may round up and have more queueable elements than OpenSL
was allocated with, leading to errors when queueing those extra elements. Now
OpenSL allocates the same number of elements that can be written to the ring
buffer.
2019-01-03 18:16:46 -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
5e03941701
Use an atomic bool on things that only take true or false
2018-12-30 21:58:14 -08:00
Chris Robinson
9f5c9a2260
Rename BackendLock to StateLock
2018-12-30 21:38:42 -08:00
Chris Robinson
3df1d185f8
Don't make the backend's lock/unlock methods noexcept
2018-12-29 17:29:52 -08:00
Chris Robinson
24e763f2a1
Get rid of ALCdevice_Lock/Unlock
2018-12-29 14:00:34 -08:00
Chris Robinson
8a84e7b662
Use member functions for the sample and channel converters
2018-12-29 12:26:45 -08:00
Chris Robinson
9b0b722d72
Add missing includes for mem_fn
2018-12-29 03:11:06 -08:00
Chris Robinson
63fc74beaa
Don't bother with an explicit Loopback backend type
2018-12-29 02:21:53 -08:00
Chris Robinson
71a4d6db6f
Return a unique_ptr for the backend
2018-12-29 02:16:16 -08:00
Chris Robinson
3c637d5fd7
Make the backend type an enum class
2018-12-29 01:38:26 -08:00
Chris Robinson
8fd4477215
Get CoreAudio capture samples in one call
2018-12-28 23:19:49 -08:00
Chris Robinson
3d92e8c4df
Convert the backends to use proper inheritence
2018-12-28 22:56:20 -08:00
Chris Robinson
67b874328d
Use static_cast instead of reinterpret_cast where possible
2018-12-28 16:13:28 -08:00
Chris Robinson
01ed98c99b
Finish turning ancillary backend methods into member functions
2018-12-28 15:09:51 -08:00
Chris Robinson
b7f5166d59
Turn even more methods into member functions
2018-12-28 14:06:15 -08:00
Chris Robinson
200e267b81
Turn some more methods into member functions
2018-12-28 12:58:01 -08:00
Chris Robinson
aff58265cb
Make more methods into member functions
2018-12-27 23:37:24 -08:00
Chris Robinson
28308226e7
Turn more methods into member functions
2018-12-27 21:50:54 -08:00
Chris Robinson
885f68268f
Turn more methods into member functions
2018-12-27 20:24:35 -08:00
Chris Robinson
015a4b060b
Make some ancillary methods into member functions
2018-12-27 19:38:02 -08:00
Chris Robinson
0f36459028
Use vectors instead of malloc'd buffers
2018-12-27 18:33:49 -08:00
Chris Robinson
465ab11748
Finish renaming backend struct fields
2018-12-27 17:48:02 -08:00
Chris Robinson
e48b8c4cda
Rename some more struct members for consistency
2018-12-27 17:09:14 -08:00
Chris Robinson
f2c2b7c538
Get rid of the unnecessary STATIC_(UP)CAST macros
2018-12-27 14:27:35 -08:00
Chris Robinson
4782d6107d
Use a proper constructor/destructor for the ALCbackend base
2018-12-27 13:40:43 -08:00
Chris Robinson
7880f27054
Rename DSound class members for consistency
2018-12-27 13:07:14 -08:00
Chris Robinson
1a4387d137
Return unique_ptrs instead of raw pointers
...
For the ring buffer, channel converter, and sample converter.
2018-12-27 12:55:43 -08:00
Chris Robinson
323cf58f02
Simplify resampling with CoreAudio capture
...
The ringbuffer holds the samples from the device, and we use our own converter
for resampling, calling it on demand with data from the ring buffer.
2018-12-27 12:04:18 -08:00
Chris Robinson
be85ab6f82
Rename some ALSA class members for consistency
2018-12-27 10:34:22 -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
6a8c791e3c
Rework the pulseaudio backend to avoid an explicit mixer thread
2018-12-25 16:31:31 -08:00
Chris Robinson
0314370eb5
Cache the process binary path and name
2018-12-25 11:27:22 -08:00
Chris Robinson
208ea76922
Cleanup some includes
2018-12-25 11:09:41 -08:00
Chris Robinson
fbae41020d
Remove extraneous typedef, struct, and enum keywords
2018-12-24 19:29:01 -08:00
Chris Robinson
cd213fe6b7
Avoid using select()
2018-12-24 09:58:48 -08:00
Chris Robinson
10ce121dbd
Use a normal delete instead of ll_ringbuffer_free
...
And use RingBufferPtr in more places
2018-12-22 11:38:38 -08:00
Chris Robinson
0214a11024
Use inline methods for the device format sizes
2018-12-19 05:57:36 -08:00
Chris Robinson
0d73b13f59
Add more casts for MSVC
2018-12-12 21:58:41 -08:00
Chris Robinson
b779ebb512
Fix some MSVC conversion warnings
2018-12-12 21:18:31 -08:00
Chris Robinson
c9f5617f06
Avoid several uses of memset
2018-12-08 14:22:20 -08:00
Chris Robinson
57bb467072
Pass the desired resampler to CreateSampleConverter
2018-11-28 23:19:25 -08:00
Chris Robinson
38f4a0cf2c
Avoid the update size going to 0 with a relatively large device period
2018-11-28 18:45:35 -08:00
Chris Robinson
c3c0a5022a
Don't bother with (really) old pulseaudio headers
2018-11-28 15:09:19 -08:00
Chris Robinson
ff8c694957
Clean up the JACK backend
2018-11-27 20:29:54 -08:00
Chris Robinson
89abbe8d94
Replace last uses of alsem_t with al::semaphore
2018-11-27 14:05:56 -08:00
Chris Robinson
d06f76957c
Remove althrd_yield
2018-11-26 23:06:49 -08:00
Chris Robinson
b108d0acfd
Remove the last remaining uses of althrd_t
2018-11-26 21:39:31 -08:00
Chris Robinson
ecab90802a
Replace some uses of althrd_t with std::thread
2018-11-26 20:06:22 -08:00
Chris Robinson
df3dcc879f
Get rid of the last ATOMIC macro uses
2018-11-26 18:19:58 -08:00