[pulseaudio-discuss] pacmd get-default-sink?

David Henningsson launchpad.web at epost.diwic.se
Wed Jan 6 21:11:26 PST 2010


Colin Guthrie wrote:
> 'Twas brillig, and David Henningsson at 06/01/10 11:33 did gyre and gimble:
>> is there a way, e g via pacmd, to get the current default/fallback
>> playback (and record) device? There is no get-default-sink command.
>> List-sinks shows a "priority" item, is this something I can reliably
>> use, i e take the highest value to get the current fallback device?
> 
> pactl stat | grep Default
> 
> But please remember that the pacmd thing is not really a proper
> pulseaudio client, and you should really use pactl for command line
> integration whenever possible (pacmd does expose more stuff for
> development/debugging etc.)

Thanks, turned out some parsing of "pactl stat" and "pactl list" solved
my problem! Now I'll only pray that the output format of these commands
are pretty stable across PA versions...

// David



More information about the pulseaudio-discuss mailing list