Is it possible to detect if Pipewire is the system audio mixer at runtime?
While building a native Pipewire audio backend for SDL2, we've hit a snag where it would be very helpful to be able to determine whether or not Pipewire is configured as the system audio mixer at runtime. Given the case where the library is built with both native Pipewire and PulseAudio backends, we would want to use the native Pipewire backend if possible and only fall back to the Pulse (or another) backend if Pipewire isn't configured as the system audio mixer. Pipewire is already omnipresent in most modern distros even when not used for audio, so, unlike in most other cases, we can't just rely on the mere presence or absence of the library to determine whether or not to use it.
The obvious first thought is to look for sinks/sources at startup, however they may simply not be connected at that point (a Bluetooth speaker or powered off HDMI device).
The second thought is checking for ALSA/Bluez factory objects, however this assumes that the underlying system is using ALSA or Bluez.
Is there a reliable way to determine if Pipewire is the system audio mixer programmatically?