7691 Commits

Author SHA1 Message Date
Chris Robinson
04372b3f48 Support getting device latency with PipeWire 2021-08-18 13:01:42 -07:00
Chris Robinson
e197b52564 Track the actual update size used for PipeWire updates 2021-08-18 05:04:07 -07:00
Chris Robinson
c62425fe74 Minor naming and comment typo fix 2021-08-15 07:47:31 -07:00
Chris Robinson
3154684f97 Reduce the JACK and ALSA backend priority
With the increased use of PipeWire, which offers JACK compatibility, the JACK
backend has a higher potential to be auto-selected for users. However, due to
the backend's inability to auto-configure output to the device format, this
creates a less optimal out-of-the-box experience.

Unfortunately this also means the JACK backend won't be used automatically when
a real JACK server is running along with PulseAudio. While not ideal, this is
probably the better of the two options, to have the user explicitly configure
the library to use JACK when they really want to use it, instead of unwantingly
selecting JACK because of PipeWire.
2021-08-14 20:14:12 -07:00
Chris Robinson
4800749c8e Add enumeration support to the PipeWire backend
This does not currently track the default devices, and simply gives which came
up first. More work is needed to find the default source/sink node IDs.
2021-08-14 08:34:58 -07:00
Chris Robinson
dc9b39f419 Implement PipeWire playback
Not yet an auto-selected backend. This doesn't yet support enumeration, or
matching the AL device format to the output.
2021-08-06 21:38:23 -07:00
Chris Robinson
4cc820bb5c Start a PipeWire backend
It's just a copy of the Null backend to start with
2021-08-02 21:03:18 -07:00
Chris Robinson
0a0849db99 Use an optional bool instead of two tri-state enums 2021-07-31 14:24:49 -07:00
Chris Robinson
440b59704c Fix al::optional operator* 2021-07-31 14:21:46 -07:00
Chris Robinson
47c20b283e Use a higher quality all-pass for the UHJ utils 2021-07-30 08:08:16 -07:00
Chris Robinson
29fba79cd5 Avoid 5.1Rear as its own channel configuration
It messes with 5.1 sources using direct channels, and the surround channels are
supposed to map to the side labels. Individual backends can deal with the
channel order/label differences, as they already do to a degree.
2021-07-30 07:38:26 -07:00
Chris Robinson
486eca8ce6 Remove an unused variable 2021-07-30 06:26:53 -07:00
Chris Robinson
3b3df06195 Be more robust with unexpected channel counts 2021-07-30 06:13:54 -07:00
Chris Robinson
1fd4c865fc Use non-block mode for sndio capture 2021-07-30 04:15:00 -07:00
Chris Robinson
620836f173 Simplify channel handling in the sndio backend 2021-07-29 23:23:03 -07:00
Chris Robinson
d766c59d4d Simplify connecting JACK ports 2021-07-25 00:10:15 -07:00
Chris Robinson
02a985e70a Set the CoreAudio stream according to the device channel format 2021-07-24 22:01:53 -07:00
Chris Robinson
510e5fc197 Remove a redundant buffer clear 2021-07-24 19:02:49 -07:00
Chris Robinson
d662cd8761 Don't assume more than stereo for unrequested ALSA channels
If setting the requested format channel count fails, getting anything with 2 or
more channels assumes the first two channels are stereo, leaving the rest
silent.
2021-07-24 18:58:48 -07:00
Chris Robinson
df71e42877 Fix the device sample type in the SDL2 backend 2021-07-24 18:57:18 -07:00
Chris Robinson
fb1ad483d3 Ensure unused output channels are cleared when rendering 2021-07-24 18:15:02 -07:00
Chris Robinson
6406cc6141 Still print a warning when DBus or Qt5 aren't found
This way merely avoids the several lines of spam when the config module isn't
found, which there's otherwise no reasonable way to test for since they're
provided by the package, which you need to use find_package to search for,
which causes the spam. It's still useful to report the packages weren't found
in case they were expected.
2021-07-17 11:47:05 -07:00
Chris Robinson
87894057b2 Silence searching for Qt5 2021-07-17 11:11:26 -07:00
Chris Robinson
7c4e6c8424 Combine a couple similar switch blocks 2021-07-17 10:47:20 -07:00
kcat
5d832751ab
Merge pull request #585 from nift4/master
CMakeLists: add QUIET to Dbus1 find_package()
2021-07-17 10:46:52 -07:00
Nick (nift4)
dd659c9815
CMakeLists: add QUIET to Dbus1 find_package()
* Android doesn't have dbus, logspam is annoying
2021-07-17 11:28:37 +02:00
Chris Robinson
604bf609d0 Use the 2D channel orders for 2- and 3-channel UHJ 2021-07-13 13:56:22 -07:00
Chris Robinson
0977627ca6 Read the channel format from the correct object 2021-07-13 10:03:00 -07:00
Chris Robinson
105abc6513 Fix returned value for AL_AMBISONIC_SCALING_SOFT buffer queries 2021-07-13 06:33:54 -07:00
Chris Robinson
d998c03a27 Add a UHJ-specific coefficient scaling array 2021-07-13 06:31:13 -07:00
Chris Robinson
fb2cb2bd06 Attempt to support capture enumeration with CoreAudio 2021-07-10 00:34:00 -07:00
Chris Robinson
10d782502a Use variables and types when they're defined 2021-07-09 21:25:13 -07:00
Chris Robinson
c8cfdf6ddf Don't define enumeration functions when they're not used 2021-07-09 18:54:23 -07:00
Chris Robinson
955fdebcad Add a utility to encode audio files to UHJ 2021-07-09 09:04:07 -07:00
Anonymous Maarten
9a745292bd
Make OpenALConfig.cmake compatible with CMake's FindOpenAL.cmake (#581)
* Make OpenALConfig.cmake compatible with CMake's FindOpenAL.cmake

* Create and install OpenALConfigVersion.cmake

* cmake: drop creating of OpenALConfigVersion.cmake
2021-07-06 00:34:40 -07:00
Chris Robinson
d38c8419c7 Update the 5.1+center decoder and use it by default
The itu5.1-nocenter preset is the same as the previous default, so it can still
be used for people that prefer it. But this new one purportedly has better
panning and positioning responses in listening tests, which initial impressions
concur with.
2021-06-30 15:53:15 -07:00
Chris Robinson
c09c94de25 Allow decoders to specify the coefficient scaling 2021-06-25 08:10:41 -07:00
Chris Robinson
2186c890a3 Handle spaces in the ambdec description 2021-06-24 09:37:01 -07:00
Chris Robinson
41add63728 Don't attenuate spatialized multichannel sources
It's inconsistent behavior with spatialized B-Format sources, and causes a very
apparent gain disparity between such a source on the listener compared to just
barely off-origin. It's also not something an app can easy correct for if it
doesn't want that behavior, since the source gain clamps to 1 by default. In
contrast, an app can attenuate sources as they want with little issue.
2021-06-24 08:21:25 -07:00
Chris Robinson
247a149115 MSVC doesn't like the decltype 2021-06-23 13:30:17 -07:00
Chris Robinson
9a7bca1116 Add wrapper methods for getting device config values 2021-06-23 10:45:24 -07:00
Chris Robinson
5b2489c3e8 Convert AmbDecConf to DecoderConfig for loading
This keeps AmbDecConf uses confined to multi-channel panning initialization,
and avoids spreading conversions and maps all over.
2021-06-23 09:44:58 -07:00
Chris Robinson
2b7c446363 Support built-in 3D ambisonic decoders 2021-06-23 03:22:54 -07:00
Chris Robinson
d28cf80b6f Allow querying ALC_ALL_DEVICES_SPECIFIER from loopback devices
They only return the default/driver name, since loopback devices don't have a
canonical name.
2021-06-22 03:25:31 -07:00
Chris Robinson
8f3148ba53 Don't allocate full buffer lines in each voice
There's now effectively a 16-channel limit for buffers (as determined by the
number of elements in DeviceBase::mSampleData). Any more than that are
ignored when mixing.
2021-06-21 09:04:33 -07:00
Chris Robinson
7584458ecd Avoid mixing extraneous channels 2021-06-21 07:36:47 -07:00
Chris Robinson
1c5a6ad92b Use a unique_ptr to hold raw byte memory 2021-06-21 03:54:49 -07:00
kcat
5b1d9030a1
Merge pull request #578 from alexey-lysiuk/coreaudio_channel_count
Fix getting of device channel count in CoreAudio backend
2021-06-21 03:40:16 -07:00
alexey.lysiuk
375838c473 Fix getting of device channel count in CoreAudio backend
AudioBufferList contains a variable length array of mNumberBuffers elements, so it should not be created with the default constructor like usual class instances.
Unfortunately, Apple developer site documentation is literally empty for this API. There is a bunch of comments in framework's header files.
Here is the correct usage of AudioBufferList pointer from Chromium: 008a1abc57/audio/mac/audio_manager_mac.cc (266)
There were occasional crashes because of memory corruption which was confirmed by address sanitizer
2021-06-21 13:24:45 +03:00
Chris Robinson
04a6e418d7 Fix some size types 2021-06-18 21:03:31 -07:00