7716 Commits

Author SHA1 Message Date
Chris Robinson
8da4eaff29 Add the gnu::malloc attribute to al_malloc and al_calloc
This helps the compiler know the returned pointer won't alias another pointer
or existing object, since it's a fresh allocation, and is unlikely to return
nullptr.
2021-10-07 13:37:47 -07:00
Chris Robinson
c3e2fbef49 Avoid double indirection to access spa_data::datas 2021-10-07 13:36:33 -07:00
Chris Robinson
86abe8dca2 Fix the render step value for WinMM 2021-10-05 03:02:45 -07:00
Chris Robinson
90cfd090d6 Fix inverted macro check 2021-10-04 00:08:39 -07:00
Chris Robinson
1a0287e2a0 Don't call OutputDebugStringW in Release builds 2021-10-03 23:49:06 -07:00
Chris Robinson
f92cc479d8 Silence some static analysis warnings 2021-10-03 08:02:57 -07:00
Chris Robinson
53d9033ec7 Remove a couple unnecessary variables 2021-10-03 06:48:00 -07:00
Chris Robinson
38d3ea3501 Make simpler likely/unlikely functions and use them in some places 2021-10-03 06:41:14 -07:00
Chris Robinson
c66e4f5bd4 Use a constexpr char array instead of duplicating strings 2021-09-19 17:02:10 -07:00
Chris Robinson
52bfe430a3 Replace a hardcoded offset value 2021-09-14 15:09:58 -07:00
Chris Robinson
302d662c0a Wait for the pipewire capture stream to start before returning 2021-09-13 14:30:38 -07:00
Chris Robinson
9c136bb3b4 Track whether nodes are marked as headphones
Newer versions of PipeWire copy the PW_KEY_DEVICE_FORM_FACTOR property to the
sink node, so this should work to detect whether the device should be treated
as headphones or not.
2021-09-12 03:04:46 -07:00
Chris Robinson
c40e7db82a Use a constexpr char array for a reused prefix string 2021-09-12 02:19:38 -07:00
Chris Robinson
2df78e49b1 Use a local unique_ptr array instead of a struct member
For the sndio poll fds.
2021-09-01 20:10:30 -07:00
Chris Robinson
d97ff8f1c4 Remove a leftover debug trace 2021-09-01 20:06:24 -07:00
Chris Robinson
325523b06a Fix when a PipeWire metadata property is being cleared 2021-09-01 20:06:24 -07:00
Andrew Krasavin
a4b0a3d7b3
Fix crashes in SndioCapture::recordProc (#594)
* Fix crashes while capturing audio using openal with sndio backend.

* Proper function for mFds preallocation.
Now it is checked whether the returned value of the sin_nfds() function is not a negative number.
2021-09-01 19:58:12 -07:00
Chris Robinson
602b33fede Always define NOMINMAX on Windows
Clang needs it too, not just MSVC, and it doesn't seem to hurt MinGW.
2021-08-23 11:08:58 -07:00
Chris Robinson
b841ce5e17 Properly check the channel count for WASAPI capture 2021-08-23 00:04:43 -07:00
Chris Robinson
4800dfafce Properly limit the name header comparison length 2021-08-22 19:42:05 -07:00
Chris Robinson
643c1648fb Don't store "OpenAL Soft on " in WASAPI device names
It's still prepended for enumeration, just not part of the name in the DevMap.
2021-08-22 19:26:09 -07:00
Chris Robinson
365ff8302e Add PipeWire capture support 2021-08-21 13:27:14 -07:00
Chris Robinson
b1031459c9 Don't try to get the stream time if there's no stream 2021-08-19 11:55:39 -07:00
Chris Robinson
4b030b7e95 Simplify pwire_load 2021-08-19 06:11:30 -07:00
Chris Robinson
ca2e0e4b2b Track default devices with PipeWire 2021-08-18 18:35:53 -07:00
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