[pulseaudio-discuss] suggested patch: only update level meters when window has focus

Tanu Kaskinen tanu.kaskinen at linux.intel.com
Sun Jul 13 07:19:20 PDT 2014

(added pulseaudio-discuss back to cc)

On Sun, 2014-07-13 at 16:00 +0200, Lukas Kramer wrote:
> I've done some research as well and also came to the conclusion that 
> it's impossible to determine whether the window is visible or not, so 
> I've settled with get_active, which as you pointed out isn't optimal. 
> Offering an option to completely hide the volume meters sounds much 
> better. The checkbox would look rather misplaced if placed above the 
> tabs, below is more appropriate. Another option would be to place it 
> left to the "Show" combobox, although this would imply that the checkbox 
> is related to the currently selected tab. I've taken a look at the 
> pavucontrol.glade and Glade showed a lot of errors when loading the 
> file: (glade:2498): GladeUI-WARNING **: Loading object 'hbox1' with name 
> conflict, renaming to 'hbox2'. I guess the pavucontrol.glade is to be 
> edited manually?

Whatever works. On the rare occasions when I've edited pavucontrol.glade
I have used the graphical design tool, i.e. not edited the file

> Slightly offtopic: The Gtk People changed the looks of 
> GtkNotebook tabs a version or two ago, which makes the borders around 
> the GtkNotebook look out of place. Any issues with removing them?

Go ahead!

> > Bonus points for the following features:
> >   - Instead of just disabling the UI updates, cork the streams when
> > volume meters aren't enabled so that unnecessary audio streaming isn't
> > done.
> >   - Cork the streams also when the volume meter is not being shown, e.g.
> > if the volume meter is on a different tab than the currently active tab.
> >   - Make the volume meter toggle status persistent, i.e. save the state
> > to disk. Without persistent state, the volume meters should be disabled
> > by default, because it would be very annoying if the user wanted to
> > permanently disable them to save CPU, but then they would be again
> > re-enabled when restarting pavucontrol.
> Where to store this bit of information? The proper way would be 
> GSettings, but that seems like an overkill. Maybe a g_key_file is more 
> appropriate?

g_key_file sounds good to me.


More information about the pulseaudio-discuss mailing list