857 Commits

Author SHA1 Message Date
Chris Robinson
a5edf487dd Use a macro to handle common case formatting 2018-05-27 01:03:18 -07:00
Chris Robinson
728dd5a4e0 Avoid setting unnecessary variables 2018-05-26 20:43:05 -07:00
Chris Robinson
93de5350b9 Add some LIKELY and ASSUME statements 2018-05-23 19:22:21 -07:00
Chris Robinson
9bf3ee722c Fix a function comment about a return value 2018-05-23 06:10:09 -07:00
Chris Robinson
1782208fde Remove unused function 2018-05-23 05:58:06 -07:00
Chris Robinson
a235259b5e Further clarify a comment about float precision 2018-05-21 06:16:03 -07:00
Chris Robinson
e787a241c0 Add and use a method for fast float rounding
Unlike fastf2i, this keeps the result as a float instead of converting to
integer.
2018-05-12 00:52:09 -07:00
Chris Robinson
75e2cb97f7 Don't assume round-to-zero for fastf2i 2018-05-04 02:09:32 -07:00
Chris Robinson
ac8dbd7a56 Add a specific function for truncating float-to-int conversions 2018-05-03 22:02:32 -07:00
Chris Robinson
e8aaa9cb13 An output device buffer is likely 2018-04-29 18:03:33 -07:00
Chris Robinson
e420752e82 Fix a comment about a float's mantissa 2018-04-28 18:52:40 -07:00
Chris Robinson
b51d30f84d Change some if checks to asserts since they must be true 2018-04-22 02:38:09 -07:00
Chris Robinson
9575eebac4 Move the bnad-splitter filters to a separate source 2018-04-21 23:23:46 -07:00
Chris Robinson
9c5307a48a Rename BiquadState to BiquadFilter 2018-04-04 18:07:46 -07:00
Chris Robinson
4a8c3b50b6 Apply the initial decay and air absorption after gain clamping 2018-03-29 16:11:46 -07:00
Chris Robinson
852ad41176 Pass the azimuth and elevation to CalcPanningAndFilters 2018-03-29 16:11:46 -07:00
Chris Robinson
2b16ff3ca8 Check all buffers to update a source with 2018-03-28 06:28:46 -07:00
Chris Robinson
964723691a Condense an if check 2018-03-26 06:04:11 -07:00
Chris Robinson
2475d4652c Clear mixing target parameters before setting them 2018-03-25 18:02:07 -07:00
Chris Robinson
f3672ab26b Annotate the B-Format rotation/conversion matrix 2018-03-25 08:24:53 -07:00
Chris Robinson
6990478369 Rename ALfilterState/Type to BiquadState/Type 2018-03-23 14:52:59 -07:00
Chris Robinson
091e676db3 Move mixer sources into a sub-directory 2018-03-22 05:06:15 -07:00
Chris Robinson
8eb7a94e1c Apply a distance decay on the source send for the reverb's DecayLFRatio 2018-03-11 22:40:08 -07:00
Chris Robinson
6b35a4534f Comment and clarify some code 2018-03-11 22:18:11 -07:00
Chris Robinson
4e613c5d4b Rename UpdateContextSources for clarity 2018-03-08 17:48:21 -08:00
Chris Robinson
179e1c4dbc Don't check for space in the ringbuffer before trying to write
The write method already checks and returns how much it managed to fit in.
2018-03-03 21:57:42 -08:00
Chris Robinson
bd32a682f7 Use atomic variables instead of volatile 2018-03-02 19:16:55 -08:00
Chris Robinson
4b85104c4f Apply the limiter, distance comp, and others even with no output buffer 2018-03-01 16:16:37 -08:00
Chris Robinson
a1ef5e38b6 Handle source state change events 2018-02-24 09:24:18 -08:00
Chris Robinson
e63e0ee596 Combine multiple functions called sequentially 2018-02-11 22:23:03 -08:00
Chris Robinson
494e9fd61d Don't asynchronously modify the source on disconnect 2018-02-11 16:58:34 -08:00
Chris Robinson
5b11129eaa Use a function pointer for applying the dry mix post-process 2018-02-10 15:50:05 -08:00
Chris Robinson
9b878c64f9 Make the Connected state atomic
Also don't send the Disconnected event more than once.
2018-02-04 00:01:12 -08:00
Chris Robinson
b99e64a0e3 Provide more descriptive messages to disconnection events 2018-02-03 13:54:42 -08:00
Chris Robinson
40bda4d93f Add a disconnected event type 2018-02-03 01:07:06 -08:00
Chris Robinson
bcdc399029 Send buffer completed events when enabled 2018-02-01 01:36:03 -08:00
Chris Robinson
248832b266 Use a voice flag to indicate it being static 2018-01-16 18:07:59 -08:00
Chris Robinson
5deb1df8db Add min/max/clamp functions for size_t 2018-01-16 09:39:28 -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
15ad5245bf Move the FPU mode declarations to a separate header
Also don't use inheritance with FPUCtl.
2018-01-11 08:44:52 -08:00
Chris Robinson
81b13f78ea Move the CPU capability flags to a separate header 2018-01-11 07:19:19 -08:00
Chris Robinson
9b9ec2c21a Move the compressor/limiter declarations to their own header 2018-01-11 06:50:53 -08:00
Chris Robinson
15f9d15ba0 Avoid using macros to access anonymous structures 2018-01-11 03:45:23 -08:00
Chris Robinson
279799ad70 Don't return whether the bsinc filter cuts or not 2018-01-10 19:20:58 -08:00
Chris Robinson
9e2eb5dc23 Rename the device's temp buffer storage to be more generic 2018-01-09 22:01:46 -08:00
Chris Robinson
70973035de Use a separate function to get the cubic value 2018-01-07 17:24:29 -08:00
Chris Robinson
c423b6c8b7 Remove the sinc4 table 2018-01-07 05:58:52 -08:00
Chris Robinson
4cc1c64646 Replace the sinc4 resampler with cubic
Turns out the C version of the cubic resampler is just slightly faster than
even the SSE3 version of the FIR4 resampler. This is likely due to not using a
64KB random-access lookup table along with unaligned loads, both offseting the
gains from SSE.
2018-01-07 05:32:07 -08:00
Chris Robinson
30007263e5 Allow storing multiple buffers in a ALbufferlistitem
This will be to allow buffer layering, multiple buffers of the same format and
sample rate that are mixed together prior to resampling, filtering, and
panning. This will allow composing sounds from individual components that can
be swapped around on different invocations (e.g. layer SoundA and SoundB on one
instance and SoundA and SoundC on a different instance for a slightly different
sound, then just SoundA for a third instance, and so on). The longest buffer
within the list item determines the length of the list item.

More work needs to be done to fully support it, namely the ability to specity
multiple buffers to layer for static and streaming sources. Also the behavior
of loop points for layered static sources should be worked out. Should also
consider allowing each layer to have a sample offset.
2017-12-15 22:59:51 -08:00