Fwding to list, sorry
---------- Forwarded message ---------- From: Daniel. <[email protected]> Date: 2012/10/20 Subject: Re: How do you people handle sound? Show your solution To: Clément DÉMOULINS <[email protected]> 2012/10/19 Clément DÉMOULINS <[email protected]>: > On 19/10/2012 02:42, Juan Antonio Zuloaga Mellino wrote: >> I can't remember if I made it, stole it or both, but this is my ugly >> workaround for pulse audio Why not use amixer?? Any way, your solution is really coll also.. >> >> calling paMuteToggle() doest what you'd expect. >> With no parameters changes all the sinks to the opposite state of the >> first sink. >> You can use a sink as an argument. >> >> HOW TO USE IT: >> >> require("pamute") >> [...] >> awful.key({ }, "XF86AudioMute",function () paMuteToggle() end ), >> >> >> pamute.lua attached. >> > > I write a little program to control the sound volume of pulseaudio: > https://github.com/cdemoulins/pamixer > > % pamixer --help > Allowed options: > -h [ --help ] help message > -s [ --sink ] arg choose a different sink than the default > --source arg choose a different source than the default > --default-source select the default source > --get-volume get the current volume > --set-volume arg set the volume > --increase arg increase the volume > --decrease arg decrease the volume > --toggle-mute switch between mute and unmute > --mute set mute > --unmute unset mute > --get-mute display true if the volume is mute, false otherwise > --list-sinks list the sinks > --list-sources list the sources > > Using this program i create a widget to display the current volume and > add some keybinding to control the volume. > My module “pulseaudio.lua” is for the git version only. > > Clément > > -- > Clef GPG : 0xDD51E028 I have reimplemented my alsactl module, cutting amixer calls by half.. Now when you raise or low volume, the volume and mute state is saved. So you can get this without call amixer again. This solved the "widget is no updated while holding keybinds" problem. I've put a spin lock on the function that calls amixer, I don't know if this is needed, but I have the feeling that when I hold keybinds down, the function is instantiate again before it has chance to return.. So I want to serialize this.. Any information about keybinds and functions calls synchrony?? I'm willing to add the naughty eye candy notifications to this too, I'm just studying how is the best way. I see that every guy here is reimplementing sound handling from scratch, as I guess before sending the first e-mail. Would be cool if there is something "standard" on wiki about this.. The big problem I see is the underling sound system. We have alsa/pulseaudio and pulseaudio people here. Is there someone using jack + awesome? Cheers -- "Do or do not. There is no try" Yoda Master -- "Do or do not. There is no try" Yoda Master -- To unsubscribe, send mail to [email protected].
