[pulseaudio-discuss] Newbie: controlling volume through command line

Jesse Sheidlower jester at panix.com
Tue Aug 23 02:42:31 PDT 2011


Hi. I'm sorry to ask a relatively basic question on what seems like a
pretty high-powered dev list, but I'm having trouble finding the answer
elsewhere. 

I'm using PulseAudio on Debian under Xfce. I want to bind keys to
commands that raise and lower the volume (typically multimedia keys,
though my current keyboard doesn't actually have these). That's it.
There are a few discussions about how to do this online, including

https://bbs.archlinux.org/viewtopic.php?id=46608&p=2 
and
http://crunchbanglinux.org/forums/topic/11392/pulseaudio-volume-control-with-media-keys/

The problem is, these commands only control one sink. I have two USB
audio controllers and the internal sound card (and a virtual device to
play everything together), and would like to be able to control whatever
happens to be playing at any time. (Typically I have a music player
going through a USB controller, and the rest of my system going through
the internal card; I'm not usually listening to both simultaneously, but
this is possible.) So maybe this is more of a question about shell
coding, but either way, I'd think that it's something that would be of
interest to many Pulse users.

I had previously used Ubuntu, where the keyboard volume keys just
worked, but it appears that the Ubuntu install uses amixer as a front
end to everything, and that seems not to apply here.

Thanks, and sorry if I'm missing something obvious.


More information about the pulseaudio-discuss mailing list