3368 Commits

Author SHA1 Message Date
Chris Robinson
e7217760f3 Don't bother with an explicit stop backend method 2018-01-29 01:00:53 -08:00
Chris Robinson
a042dbf305 Call the backend close method in the destructor 2018-01-28 23:32:28 -08:00
Chris Robinson
328fd7329d Combine common initialization code into a function 2018-01-28 18:03:54 -08:00
Chris Robinson
c2710ffe87 Make EnabledEvts atomic 2018-01-28 16:58:41 -08:00
Chris Robinson
dcc5a10c7b Use a fixed array for the effect state factory list 2018-01-28 00:10:12 -08:00
Chris Robinson
cb9fb31214 Store filters in an array of lists 2018-01-27 19:40:47 -08:00
Chris Robinson
e8c268ef09 Store effects in an array of lists 2018-01-27 19:04:32 -08:00
Chris Robinson
6a839600b9 Use a vector to store the effect slot pointers
And make the ID a simple index into it (1-base, to avoid ID 0).
2018-01-27 19:04:32 -08:00
Chris Robinson
031cf24880 Use an array lookup for source IDs
This is now similar to buffers, being stored in groups of 64 in a vector with
the ID providing the array indices.
2018-01-27 14:34:05 -08:00
Chris Robinson
9613b4bfe2 Use a different method for storing and looking up buffers
Rather than each buffer being individually allocated with a generated 'thunk'
ID that's used with a uint:ptr map, buffers are allocated in arrays of 64
within a vector. Each group of 64 has an associated 64-bit mask indicating
which are free to use, and the buffer ID is comprised of the two array indices
which directly locate the buffer (no searching, binary or otherwise).

Currently no buffers are actually deallocated after being allocated, though
they are reused. So an app that creates a ton of buffers once, then deletes
them all and uses only a couple from then on, will have a bit of waste, while
an app that's more consistent with the number of used buffers won't be a
problem. This can be improved by removing elements of the containing vector
that contain all-free buffers while there are plenty of other free buffers.

Also, this method can easily be applied to other resources, like sources.
2018-01-27 01:51:01 -08:00
Chris Robinson
5d2196c119 Don't rely on alMain.h in alBuffer.h 2018-01-26 21:32:43 -08:00
Chris Robinson
99f0377ae3 Construct error messages using parameterized values 2018-01-25 15:59:59 -08:00
Chris Robinson
0c9c846522 Report AL_SOFTX_events as an in-progress extension 2018-01-24 19:59:22 -08:00
Chris Robinson
2a7f5aa569 Add a deprecated event type for alDopplerVelocity 2018-01-24 18:47:19 -08:00
Chris Robinson
2ded5547ba Provide messages for the remaining AL errors 2018-01-24 17:07:01 -08:00
Chris Robinson
caa3b4f7f8 Handle event properties
This just implements the event methods insofar as tracked state. No events are
generated/reported yet.
2018-01-23 18:25:59 -08:00
Chris Robinson
2ac0adaebb Use a new proper buffer function with a flags parameter
Rather than hackily combining bit flags with the format, to increase the number
of potential flags. alBufferData now behaves as if calling alBufferStorageSOFT
with a flags value of 0.
2018-01-23 14:33:30 -08:00
Chris Robinson
5f3ae527c9 More cleanup for buffer loading
Don't bother with unnecessary and unused converters, and remove some
unsupported queries.
2018-01-21 23:35:28 -08:00
Chris Robinson
db13af1935 Handle double-precision buffers in the mixer 2018-01-21 18:34:03 -08:00
Chris Robinson
427212705f Remove the old buffer_samples functions
The symbols are still there and exported to retain ABI compatibility, but they
no longer do anything except set an AL_INVALID_OPERATION error. They're also
removed from the function and enum tables, since they're not part of any
supported extension.
2018-01-21 17:19:57 -08:00
Chris Robinson
c2c3846930 Expose a preliminary AL_SOFT_map_buffer extension for testing 2018-01-20 13:37:43 -08:00
Chris Robinson
ab2295b68f Store 8-bit sample types directly as unsigned byte 2018-01-19 20:10:31 -08:00
Chris Robinson
940c6146e8 Remove unnecessary private AL_SOFT_buffer_samples2 definitions 2018-01-19 19:28:23 -08:00
Chris Robinson
884fe40fd1 Store mulaw and alaw samples directly in the buffer
They're now decompressed on the fly in the mixer. This is not a significant
performance issue given that it only needs a 512-byte lookup table, and the
buffer stores half as much data (it may actually be faster, requiring less
overall memory).
2018-01-17 08:49:49 -08:00
Chris Robinson
248832b266 Use a voice flag to indicate it being static 2018-01-16 18:07:59 -08:00
Chris Robinson
273dca2fa0 Avoid using alloca in the CoreAudio backend 2018-01-16 12:54:20 -08:00
Chris Robinson
e80b016cbe Use a global RowMixerFunc 2018-01-16 12:18:59 -08:00
Chris Robinson
8c19497340 Properly cast some parameters for MSVC 2018-01-16 09:40:34 -08:00
Chris Robinson
5deb1df8db Add min/max/clamp functions for size_t 2018-01-16 09:39:28 -08:00
Chris Robinson
14a0df03e8 Do more samples at once with the distortion effect 2018-01-16 08:49:15 -08:00
Chris Robinson
799dfb732b Don't fade the all-pass delay changes 2018-01-15 18:02:11 -08:00
Chris Robinson
813b06a3a4 Fix a comment regarding the T60 filter coefficients 2018-01-15 09:22:28 -08:00
Chris Robinson
47c9b0a17e Simplify preparing the T60 filters 2018-01-15 09:17:15 -08:00
Chris Robinson
44795b8614 Assign the HRTF storage pointers separately 2018-01-15 08:38:25 -08:00
Chris Robinson
682205a3d4 Finalize ALC_SOFT_device_clock 2018-01-15 06:45:53 -08:00
Chris Robinson
7441311e3d Use separate input and outputs for the T60 and allpass processing 2018-01-15 05:37:00 -08:00
Chris Robinson
6f48dac4cc Use a proper type for the T60 decay filter 2018-01-15 05:23:35 -08:00
Chris Robinson
bc078e5158 Separate some anonymous structs into defined structs 2018-01-14 15:42:25 -08:00
Chris Robinson
63416bf28f Avoid unnecessarily using type aliases 2018-01-14 09:02:59 -08:00
Chris Robinson
0152bc0d10 Remove the SAFE_CONST macro
Seems compilers are now allowing a pointer-to-type-array to implicitly convert
to pointer-to-const-type-array.
2018-01-14 08:51:03 -08:00
Chris Robinson
7e491ef2b2 Remove a redundant lower value clamp 2018-01-14 08:25:36 -08:00
Chris Robinson
6f532fa0e5 Don't check the modulation depth for changes multiple times 2018-01-14 07:33:53 -08:00
Chris Robinson
25b3ed3532 Use separate arrays for the T60 filter states 2018-01-14 07:29:18 -08:00
Chris Robinson
7a77a20a67 Use a macro for the number of reverb lines 2018-01-14 07:25:02 -08:00
Chris Robinson
2957d85924 Only pass the needed parameters to LateT60Filter 2018-01-14 05:24:23 -08:00
Chris Robinson
2b968766b9 Pre-apply the T60 filter midgain to the HF filter coeffs 2018-01-13 09:58:47 -08:00
Chris Robinson
78cb70a5f9 Replace some freq_mult variable names with f0norm
The latter is a bit more descriptive as f0 is often used to denote the
reference frequency of a filter, so f0norm indicates the normalized reference
frequency (ref_freq / sample_rate).
2018-01-13 09:14:46 -08: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
bbc4ebecab Use GetProcBinary to get the executable name for PulseAudio 2018-01-13 03:41:56 -08:00
Chris Robinson
71ad3b1715 Use KERN_PROCARGS to get the process path+filename on FreeBSD 2018-01-13 03:38:10 -08:00