1071 Commits

Author SHA1 Message Date
Chris Robinson
b43fd6dca7 Always lock the device state when querying device attributes 2021-11-16 16:44:58 -08:00
Chris Robinson
7062de0337 Handle SPA_CHOICE_None for sample rates from PipeWire 2021-11-14 12:47:06 -08:00
Chris Robinson
eac427dff7 Report unexpected types for the sample rate from PipeWire 2021-11-14 11:43:33 -08:00
Chris Robinson
cf85ffd22f Support "enum" choices for sample rates with PipeWire 2021-11-14 05:58:39 -08:00
Chris Robinson
bbff1efa2a Update some in-progress extension types 2021-11-10 01:21:49 -08:00
Chris Robinson
e3168c9112 Add an extension to request stereo UHJ output 2021-11-08 16:56:05 -08:00
Chris Robinson
b81fa0dc90 Don't trace unused metadata properties and node types
As useful as it may sometimes be to see what's being provided, at least under
kwin_wayland a not-insignificant number of video-related nodes and metadata
properties are sent through normal use of the system (most notably when
hovering over the taskbar to see window thumbnails).
2021-10-26 09:40:10 -07:00
Chris Robinson
4de789ba68 Don't change the requested format when it's usable with WASAPI 2021-10-25 06:37:48 -07:00
Chris Robinson
49a36334bd Use a tri-state optional for the stereo output mode 2021-10-24 11:51:39 -07:00
Chris Robinson
096bed35fa Pass a parameter to aluInitRenderer to specify UHJ output 2021-10-23 11:37:46 -07:00
Chris Robinson
1a448b2e92 Fix a double-release 2021-10-23 07:57:17 -07:00
Chris Robinson
d0e5e138e2 Use a flag to indicate headphone-like output 2021-10-23 07:51:06 -07:00
Chris Robinson
0e93fc53f4 Don't reset the ambisonic layout and scale with stereo output 2021-10-23 05:48:47 -07:00
Chris Robinson
d5dc2828bf Don't pass the whole decoder to InitDistanceComp 2021-10-23 03:57:49 -07:00
Chris Robinson
aa92c6c0a8 Fix the ambisonic scaling used by custom decoders 2021-10-23 03:24:51 -07:00
Chris Robinson
f963a2c543 Remove some lingering mentions of surround51rear 2021-10-21 07:38:57 -07:00
Chris Robinson
15827b2887 Don't declare functions outside of where they're used 2021-10-21 06:03:37 -07:00
Chris Robinson
e70f3e97b3 Remove the last external uses of GetConfigValue 2021-10-21 05:54:03 -07:00
Devin Braune
0e9ce1aa83
Fix cone angle calculation (#605) 2021-10-14 11:18:54 -07:00
Chris Robinson
92b65fa15f Avoid manually prefixing EventType_ enums
And use a better fitting type that matches how it's used
2021-10-10 05:07:31 -07:00
Chris Robinson
e3b8f8fe27 Make a construct_at method amd use it 2021-10-08 11:05:36 -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
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
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
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