Commit Graph

6104 Commits

Author SHA1 Message Date
Chris Robinson c724798c85 Don't round WASAPI updates to the update size 2019-04-27 08:48:14 -07:00
Chris Robinson dd2c43be42 Update the period size placeholder text 2019-04-26 19:02:18 -07:00
Chris Robinson b502bbaf5c Change the default period size to 20ms 2019-04-26 18:56:54 -07:00
Chris Robinson 9e4ee500b6 Scale the update size with sample rate changes 2019-04-26 18:04:22 -07:00
Chris Robinson b29be3b39e Set the ALSA period size first 2019-04-26 16:20:27 -07:00
Chris Robinson f23ff0394d Specify the buffer size as itself instead of the period count
Certain backends don't need a buffer size to be a strict multiple of the period
count, which allows a little more flexibility. The period/update size simply
acts as the minimum request, which helps control CPU load by determining how
often parameter and other pre-mixing updates are processed.
2019-04-26 15:58:25 -07:00
Chris Robinson 348e01dc4b Work around a 32-bit GCC compiler bug 2019-04-26 07:11:09 -07:00
Chris Robinson 725ceb128e Open the playback device earlier
So we actually have a device name to get the initial settings for. Be aware
that some backends set a format when opening instead of on reset, so such
devices will only set the default format (it can't get a desired format without
the device name, but the format will already be set once that's known). The
affected backends are WinMM, SDL2, and PortAudio (none of which are generally
used). This could be fixed by reopening the device during reset, but it would
need to be done carefully.
2019-04-20 19:29:33 -07:00
Chris Robinson 87e279082f Don't round the PulseAudio write size to the period multiple 2019-04-17 05:51:40 -07:00
Chris Robinson 09dbc4c2da Fix PulseAudio backend initialization 2019-04-16 17:23:28 -07:00
Chris Robinson 61f7e7716c Remove the backend factory deinit method
It was never actually called anywhere, and there's no safe place where it can
be called. It's probably better to let the individual backends worry about
cleaning themselves up anyway.
2019-04-14 04:05:07 -07:00
Chris Robinson 7f52678099 Use a custom message queue for the WASAPI backend 2019-04-14 01:03:36 -07:00
Chris Robinson 629cfa04a3 Fix some integer truncation warnings in MSVC 2019-04-12 19:19:24 -07:00
Chris Robinson 6761fe137f Load buffer data using the current and end pointer 2019-04-12 16:24:11 -07:00
Chris Robinson 4b95d310ae Remove the SZFMT macro
C++11 mandates the %zu/d formatter
2019-04-11 16:01:11 -07:00
Chris Robinson 8215251571 Simplify sorting and initializing the backends 2019-04-11 02:49:13 -07:00
Chris Robinson abcca1acd1 Add exception protection to the last of the API functions 2019-04-10 17:47:13 -07:00
Chris Robinson 1d214dba1e Add exception protection to effect, filter, and buffer functions 2019-04-10 17:33:21 -07:00
Chris Robinson b4a8615ea9 Add exception protection to the listener functions 2019-04-10 14:16:15 -07:00
Chris Robinson 5ad50e4f8e Add exception protection to context state functions 2019-04-10 13:44:46 -07:00
Chris Robinson f39d4598b7 Add exception protection to some AL functions 2019-04-10 13:05:21 -07:00
Chris Robinson d6f72b777a Fix usage of the voice's HRTF accumulation buffer when blending 2019-04-09 22:42:45 -07:00
Chris Robinson 55a3f38405 Don't use a fixed size buffer for printed messages 2019-04-09 22:13:21 -07:00
Chris Robinson 460a01443c Add macros to stop exceptions from leaving API functions
Effectively makes the functions act as noexcept, since there's no meaningful
reason to propogate exceptions from "C" functions. Currently only applied to
ALC functions, but can incrementally be applied to AL functions too. In the
future, this could also handle ALC and AL errors with unique exception types
(functions that utilize this behavior would need to ensure proper cleanup).
2019-04-09 20:48:01 -07:00
Chris Robinson e6daab51e8 Make sure the all-pass filter is cleared before use 2019-04-04 22:57:29 -07:00
Chris Robinson dc5759f80c Fix MSVC error about parenthesized explicit type conversion 2019-04-03 10:32:48 -07:00
Chris Robinson e66632b301 Avoid directly using CalcAmbiCoeffs 2019-04-02 20:23:19 -07:00
Chris Robinson d04f9326c9 Change RealMixParams::ChannelName to better reflect its use 2019-04-02 16:06:45 -07:00
Chris Robinson 9ac3524521 Spread out the ALC extensions like the AL extensions 2019-04-01 21:41:11 -07:00
Chris Robinson 86683264c9 Avoid multiple using statements for the same things 2019-04-01 21:35:52 -07:00
Chris Robinson 8781a32df5 Copy the voice's ambisonic upsampler state when reallocating 2019-04-01 17:27:31 -07:00
Chris Robinson da8494dd8a Use the existing function to get the ambisonic channel count 2019-03-31 22:50:30 -07:00
Chris Robinson 0e0e85af72 Don't bother with a separate reset method for BFormatDec 2019-03-31 22:27:56 -07:00
Chris Robinson 423333c594 Fix use of reverse_copy 2019-03-31 19:09:21 -07:00
Chris Robinson c88b09170c Use phase correction for the front stablizer 2019-03-31 18:54:43 -07:00
Chris Robinson d8c76ba0c0 Remove a couple unused member variables 2019-03-30 23:41:47 -07:00
Chris Robinson 89210cddb7 Don't stop the backend if it's not running 2019-03-30 23:30:15 -07:00
Chris Robinson cc91490b61 Use a temporary buffer for HRTF filter accumulation
Similar to the history buffer, to avoid using the state buffer as a ring
buffer.
2019-03-29 11:33:04 -07:00
Chris Robinson fe7918465e Use a function reference for a template parameter 2019-03-28 10:00:35 -07:00
Chris Robinson dfb81ff42d Avoid using the HRTF history buffer as a ring buffer
The HRTF mixers now get a full input buffer with the history prepended, so the
delay offsets just need to account for the start point and read forward for
each sample.
2019-03-28 09:34:31 -07:00
Chris Robinson e7bfe1ebd0 Simplify applying the field magnitude factor 2019-03-27 11:52:35 -07:00
Chris Robinson 095a0b9beb Set the EARLY_REQUESTS flag for PulseAudio when possible 2019-03-26 17:03:31 -07:00
Chris Robinson 608e4e916e Avoid recreating temporary buffers all the time 2019-03-26 17:01:45 -07:00
Chris Robinson 2960d729ef Fix a return type for accumulation 2019-03-26 13:47:24 -07:00
Chris Robinson 8b0c9fcf30 Require IR dimensions from a SOFA file 2019-03-26 13:45:25 -07:00
Chris Robinson 2446ee0cca Avoid some explicit loops 2019-03-26 12:37:52 -07:00
Chris Robinson a5b442b1a4 Add a missing include for varargs 2019-03-26 11:37:28 -07:00
Chris Robinson bcbe7c493c Remove another unnecessary distance check 2019-03-26 11:04:52 -07:00
Chris Robinson 525b5e65b2 Remove a couple unnecessary duration_casts 2019-03-26 10:20:32 -07:00
Chris Robinson 2c37d4fae1 Move an enum to a more appropriate header 2019-03-26 10:08:26 -07:00