6278 Commits

Author SHA1 Message Date
Chris Robinson
95d19be36b Catch exceptions from backend reset 2019-05-04 20:34:33 -07:00
Chris Robinson
b9592bddbc Add the printf format attribute to backend_exception's constructor 2019-05-04 18:25:59 -07:00
Chris Robinson
5ff8d5ae32 Add an exception class to cover backend creation and opening 2019-05-04 18:03:25 -07:00
Chris Robinson
1607f9c525 Report the threshold limit for the output limiter 2019-05-04 13:53:11 -07:00
Chris Robinson
9eea2e4c73 Use BUFFERSIZE for the reverb loop limit
At 44/48khz, the main delay line comes out to 20k to 22k samples, which gets
rounded up to 32k as the next power of two. This leaves plenty of room for the
full 1k BUFFERSIZE without having to increase the delay line beyond what it
already is.
2019-05-03 12:59:04 -07:00
Chris Robinson
2f2ec2b6e3 Add some assumes and consts 2019-05-03 00:50:47 -07:00
Chris Robinson
a72c47164c Avoid a few more array length assumptions 2019-05-01 11:15:17 -07:00
Chris Robinson
6281f6e85a Avoid masking offsets in the inner reverb loops 2019-04-30 23:28:57 -07:00
Chris Robinson
85439cbd87 Add some missing include directories 2019-04-29 20:03:51 -07:00
Chris Robinson
fb52413a6e Make a number of settings tristate 2019-04-29 19:47:14 -07:00
Chris Robinson
cef7eebed6 Disable NFC by default 2019-04-29 19:47:14 -07:00
Chris Robinson
b42694ea31 Allow NFC filters without HQ decoding
It still requires a proper custom decoder configuration for speakers, so that
proper distances can be specified. Ambisonic output still relies on the
nfc-ref-delay option, and HRTF uses the dataset's distance.
2019-04-29 19:47:14 -07:00
kcat
1ab783c7ac
Merge pull request #285 from ArthurSonzogni/master
Update CMakeLists.txt. Simplify examples build and export PUBLIC headers.
2019-04-29 19:46:39 -07:00
ArthurSonzogni
2eb657f2df CMAKE: export PUBLIC headers of OpenAL.
Remove the cmake function:
  INCLUDE_DIRECTORIES(..)
Replace it by:
  TARGET_INCLUDE_DIRECTORIES(...)

It gives us the opportunity to define whether or not OpenAL dependencies
should be exported or not (using PUBLIC or PRIVATE keywoard).

[user visible changes]
The OpenAL PUBLIC headers are exported. When a target depends on OpenAL,
it will have access to its public headers.

Some small refactor along the way.
2019-04-30 04:17:43 +02:00
Chris Robinson
c7e388873c Increase the period size slider and don't use steps of 64 2019-04-28 22:21:23 -07:00
Chris Robinson
8ca849655f Properly replace sinc4 with cubic in alsoft-config 2019-04-28 21:51:47 -07:00
Chris Robinson
ace7481b8e Only enable NFC with HRTF when hq-mode is enabled 2019-04-28 21:49:10 -07:00
Chris Robinson
9d6619efdc Combine some reverb processing loops
Specifically, the A2B and output mixing, as well as applying the band-pass with
B2A mixing (the latter of which hiding a bug that was overwriting the early
buffer storage).
2019-04-28 08:56:41 -07:00
Chris Robinson
ec869234f7 Remove restrict from in+out parameters 2019-04-28 08:51:50 -07:00
Chris Robinson
014936ceff Be more robust with PulseAudio capture
Particularly, handle "holes" in the record stream and premature end-of-buffer.
Also don't bail out when capturing while disconnected (the extension says it
should provide anything it previously reported available, going to silence for
anything no longer readable).
2019-04-27 21:25:42 -07:00
Chris Robinson
0577028b65 Add missing function pointers 2019-04-27 18:01:26 -07:00
Chris Robinson
c135629eae Remove some ancient PulseAudio KDE/Phonon/Qt hacks
Unfortuantely, the relevant KDE bug still seems to exist (streams are forced to
KDE's default device after opening, even when they're created with a specific
device at user request). I do not know why KDE thinks this is in any way good
behavior (the user doesn't get their desired device, nor does the stream get
the appropriate format for the device its ultimately put on), but making
streams non-movable as a workaround has been a thorn in the side of non-KDE
users for too long. C'mon KDE, it's been nearly (if not more than) 7 years now.
2019-04-27 14:13:07 -07:00
Chris Robinson
150dc92f68 Remove unused pa_threaded* functions 2019-04-27 13:06:39 -07:00
Chris Robinson
f9f34def82 Use a custom PulseAudio mainloop
This allows using RT priority again with the mixer. It also consolidates all
mainloop instances into one.
2019-04-27 12:25:49 -07:00
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