[pulseaudio-discuss] Default sources/sinks

Brendon Costa brendon.j.costa at gmail.com
Mon Apr 5 23:48:50 PDT 2010

Hi all,

I have started using pulse audio for some app development. In our
existing application which I am porting to Linux, we ask the OS for a
list of the devices, including which of those devices is the default
device. This information is used to show a list of audio devices to a
user that they can choose one from the list (two seperate lists one
for input and one for output). The list starts with the systems
default device selected initially.

With PA I can successfully enumerate the sources/sinks, however I seem
to find out which source or sink is the system default. For example
there does not seem to be a field in pa_sink_info or pa_source_info
structures for the default device. How can I find which device is the

Note: I understand the usual way to open a stream using the default
device is to pass a NULL for the dev field in say
pa_stream_connect_playback()  and PA selects the default. I need to do
things differently and be able to show the user which device is
default rather than asking PA to open the default.


More information about the pulseaudio-discuss mailing list