[pulseaudio-discuss] command-line control - increase/decrease volume of default output

Colin Guthrie gmane at colin.guthr.ie
Thu Feb 24 04:46:27 PST 2011


'Twas brillig, and Ng Oon-Ee at 24/02/11 12:07 did gyre and gimble:
> Hi all,
> 
> It seems the only way to achieve the above would be to script the
> following:-
> 
> 1. Obtain the default device using pacmd list-sinks | grep "*" or
> similar
> 2. Get that device's current volume using some multi-line parsing of
> pacmd list-sinks or pacmd info (output in %)
> 3. Convert the given % to the hex input expected by pacmd
> set-sink-volume
> 4. Actually set the new volume
> 
> Is there an easier way to do this? pacmd isn't really VERY
> script-friendly. To be fair that's probably not its purpose, I guess,
> but it would be nice if Pulse as a Linux app was as scriptable as most
> older Linux apps.
> 
> Alternatively, is there a 'shortcut' dbus method to do the above?
> 
> And yes, of course I could just use gnome volume control, not all
> systems have gnome installed though (I'm looking at getting it off my
> system actually, since I stopped using the DE itself).

When alsa redirection is available I find that "amixer set Master +5%"
works fine :D

But it would be nice to have a simple cmd-line tool that did some basic
tasks more easily... e.g. change volume of the default or a given sink,
changed the volume of a given stream, changed the device of a given
stream list the devices, list the streams.

If it did all this in a "consume from script" friendly kind of way, then
I'd happily include it and ship it with PA as it's something that does
crop up fairly often.

Patches welcome :D

Col


-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
  Mageia Contributor [http://www.mageia.org/]
  PulseAudio Hacker [http://www.pulseaudio.org/]
  Trac Hacker [http://trac.edgewall.org/]




More information about the pulseaudio-discuss mailing list