Need help: control master volume

Jonathan Riddell jr at jriddell.org
Fri Mar 12 10:43:00 GMT 2004


> On Thursday 11 March 2004 23:30, Mirko Boehm wrote:
> > Hi everybody,
> >
> > I need help with the following issue:
> >
> > Usually, notebooks ship with volume control buttons. Some models rely on
> > software to actually change the module, for example some Sony models. Now
> > in kdeutils/kmilo/kmilo_kvaio/kvaio.cpp, you will find the following
> > method:
> >
> > bool KVaio::modifyVolume(int /* step */)
> > {
> >     // we increase the volume if step is gt zero, and decrease it if
> >     // step is lt zero:
> >     if(mClient.isAttached())
> >     {
> > 	// add a DCOP call here
> >     }
> >     return false;
> > }
> >
> > I tried a couple of ways to implement it, but nothing seems to work
> > relyably. For example, my prefered method (calling kmix via dcop) depends
> > on kmix actually running.

On Fri, Mar 12, 2004 at 11:02:44AM +0100, Benoit Walter wrote:
> Perhaps having a look at the thinkpad milo plugin can help, it is developped 
> by Jonathan Riddell and rely on software volume, too. It is already in CVS.

I just stole the code from the generic kmilo plugin.  It starts kmix
if kmix is not already started and uses that to adjust the volume.

It works well for me but some people prefer not to use kmix (for
example if they use kmixapplet).  It should probably also hide the
mixer window on startup.

What's really needed is a nice interface between kmilo and khotkeys so
you can customise any button to do whatever you want.

Since this code is already duplicated with generic and thinkpad kmilo
plugins it should really be in the core kmilo code so and plugin can
call it.

Jonathan



More information about the kde-core-devel mailing list