Hello all, I am working on a golang software that aims at dealing (muting and unmuting) with the currently enabled microphone in a Linux system using pulseaudio.
My software is trying to use the DBUs interface to interact with pulseaudio. If the computer has more than one microphone connected to it, I need to find the enabled one by looking at the priority property of my sources. For example this is a trimmed output from the pacmd list-sources command: 4 source(s) available. index: 0 name: <alsa_output.pci-0000_00_1f.3.analog-stereo.monitor> ... priority: 1030 ... index: 1 name: <alsa_input.pci-0000_00_1f.3.analog-stereo> ... priority: 9039 ... index: 2 name: <combined.monitor> ... priority: 1000 ... * index: 4 name: <alsa_input.usb-046d_0825_6C7C2E60-02.mono-fallback> ... priority: 9040 ... In fact, in my system, the source with index 4 is the active one. My problem: I can't find a way to get the priority property out of the DBUs interface. According to the documentation ( https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/Developer/Clients/DBus/), neither the Source nor the Device Objects expose a property named Priority. The only objects having a Priority field are DevicePort and CardProfile. I got the value for those properties but their value doesn't match with the output of pacmd. Can anybody please help me understand what I am missing here? Thanks (also posted on stackoverflow here https://stackoverflow.com/questions/66744027/how-to-get-pulseaudios-device-priority-via-dbus )
_______________________________________________ pulseaudio-discuss mailing list pulseaudio-discuss@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss